[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-07-03 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Add a new API in the dis module that: 1. Works like show_code() but returns a string rather than printing to stdout 2. Accepts source strings directly, similar to the dis.dis() changes for 3.2 Tentative name: get_code_info() Inspired by

[issue6507] Enhance dis.dis to autocompile codestrings

2010-07-03 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Committed (with some minor modifications) in r82471. Inspired by Yanov Aknin's ssc() tool, I've opened a new RFE (issue 9147) for a similarly enhanced show_code() implementation. -- stage: patch review - committed/rejected status:

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Here is the problem: there is no module multiprocessing._multiprocessing; _multiprocessing is a global module. However, multiprocessing/__init__.py imports _multiprocessing, providing multiprocessing._multiprocessing as a valid attribute.

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Paul Moore
Paul Moore p.f.mo...@gmail.com added the comment: Martin's analysis (and the description of the commit he refers to) indicates that the correct fix is Cuiseppe's suggestion to change the relative imports to absolute: from _multiprocessing import ... as the previous code was only working

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Paul Moore
Paul Moore p.f.mo...@gmail.com added the comment: Here's a patch implementing the suggested change. test_multiprocessing passes. I am just running the full test suite now. -- keywords: +patch Added file: http://bugs.python.org/file17849/mp.diff ___

[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-07-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Yes, please! -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___

[issue8988] import + coding = failure (3.1.2/win32)

2010-07-03 Thread gonegown
gonegown nomedo...@gmail.com added the comment: @Amaury: Removing #coding lines or replacing them with #coding: utf-8 makes this test case working, at least on 4 computers I have been able to test this. My initial program was consisting of roughly ten files and utf-8 made it work. @haypo:

[issue8988] import + coding = failure (3.1.2/win32)

2010-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is what I did, on a machine running Windows XP, with python 3.1.1: - I used 7-zip to extract the attached zip file, in the c:\temp directory. - Then I opened a command prompt, here is an exact copy of the session: C:cd \temp\█

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Paul Moore
Paul Moore p.f.mo...@gmail.com added the comment: Full test suite also looks OK. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9144 ___ ___

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-07-03 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: About the E0 80 81 61 problem: my interpretation is that you are correct, the 80 is not valid in the current state (start byte == E0), so no look-ahead, three FFFDs must be issued followed by 0061. I don't really care about issuing

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The new patch looks fine to me. This is rather last minute for 2.7, and I'm very uncomfortable committing anything substantial this close to the release. Still, if it's really a security vulnerability then it would be good to get it in.

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- type: crash - security ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The following error messages looks strange to me: +if (((len / size) 1) != 0) { +PyErr_SetString(AudioopError, not a whole number of frames); +return NULL; +} Perhaps you meant not an even number of frames? --

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Well, that would depend on how you define a 'frame', I guess. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___

[issue4945] json checks True/False by identity, not boolean value

2010-07-03 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Successfully ran test_json for Python 2.6.5 on Windows Vista. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4945 ___

[issue4945] json checks True/False by identity, not boolean value

2010-07-03 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Successfully ran test_json for Python 2.6.5 on Windows Vista. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4945 ___

[issue9148] os.execve puts process to background on windows

2010-07-03 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: os.execve() is said to replace current process with new program. Unfortunately, when you try to call script that contains os.execve() on windows - that script spawns background process and control is immediately returned to the calling

[issue1576313] os.execvp[e] on win32 fails for current directory

2010-07-03 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: There should be one uniform behavior on all platforms if Python is crossplatoform. As far as I can understand this issue - unix os.execv() requires ./ to be present to execute anything from current directory. On windows it is enough to

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: the patch looks good to me - unless someone beats me to it, I'm going to commit it shortly to fix 2.7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9144

[issue9148] os.execve puts process to background on windows

2010-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: on Windows, exec() does not really replace the current process. It creates a new process (with a new pid), and exits the current one. Hence the calling program only sees that the script has terminated. I don't see any easy solution on

[issue9144] Import error for multiprocessing in 2.7rc2 on Windows

2010-07-03 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Pushed it in r82489 - worked for me on Linux and OS/X. Please let me know if anything else comes up. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file15823/audioop_check_length.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___

[issue9149] colorsys.py function rgb_to_hls

2010-07-03 Thread David Hood
New submission from David Hood thoughtfulbl...@gmail.com: colorsys.py function rgb_to_hls will crash on the RGB color (0,2,1) on line 68 with a division by zero error. 68 else: s = (maxc-minc) / (2.0-maxc-minc) -- messages: 109181 nosy: David.Hood priority: normal severity: normal

[issue9148] os.execve puts process to background on windows

2010-07-03 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Does that mean that windows doesn't allow process replacement at all? I remember the time then game NoCD loaders were somehow able to load, patch and execute main program in their address space. --

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is a security vulnerability referenced as CVE-2010-2089. Fixed in 2.7 (r82492), 2.6 (r82494), 3.2 (r82495) and 3.1 (r82496). -- Perhaps you meant not an even number of frames? Hum, no: the input data is a stereo sound

[issue7673] audioop: check that length is a multiple of the size

2010-07-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___

[issue1576313] os.execvp[e] on win32 fails for current directory

2010-07-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The unix model should be followed (requiring an explicit reference to the current directory if it is not already in PATH), rather than the insecure Windows behavior, and this is indeed the current situation. The current behavior is

[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-07-03 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Small correction to my first message: that would be Yaniv Aknin (not Yanov) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-03 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___

[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-07-03 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___ ___ Python-bugs-list

[issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used

2010-07-03 Thread Ryan Hodin
New submission from Ryan Hodin ryan201...@ymail.com: I commonly use IDLE to create very large files. this annoys me a little, but it takes up hard disk space and is unnessesary -- components: IDLE messages: 109186 nosy: rhprogrammer priority: normal severity: normal status: open title:

[issue5468] urlencode does not handle bytes and could easily handle alternate encodings

2010-07-03 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Fixed and Committed revision 82510 (py3k) and revision 82511 (release31-maint). This fixes urlencode issue. parse_qs and parse_qsl can have the same capabilities. It will be done subsequently (in another commit or issue) Thanks Dan for

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Just a nitpick: I think the code will be clearer if you switch on args' length rather than catch IndexError: nargs = len(args) if nargs 2: ... self = args[0] other = args[1] if nargs == 2 else () ... --

[issue9094] Make python-m pickletools do something useful

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I would like to commit this. Any objections? Changes only affect running pickletools as __main__. Does this need to be documented in pickletools.rst? I noticed that dis.rst does not describe running dis.py from

[issue9094] Make python-m pickletools do something useful

2010-07-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In 'run self-test suit', I suppose you mean 'suite'. Otherwise, looks ok. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9094 ___

[issue9094] Make python-m pickletools do something useful

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r82514. I don't think this appropriate for 3.1, but will not block it yet if someone thinks it should be merged. -- stage: patch review - committed/rejected status: open - pending

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: belopolsky components: Demos and Tools nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Demo/classes/Dates.py does not work in 3.x type: behavior versions: Python 3.2

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: I am attaching a minimal patch to make included test pass. -- keywords: +easy, patch stage: needs patch - patch review Added file: http://bugs.python.org/file17850/issue9151.diff

[issue9149] colorsys.py function rgb_to_hls

2010-07-03 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- components: +Library (Lib) stage: - unit test needed type: crash - behavior versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9149

[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Non-existing tools removed by Mark in r82515. There are still tools (see '-' lines above that need a README entry.) -- nosy: +mark.dickinson ___ Python tracker

[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Also I believe 2to3 deserves to be mentioned in README. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9093 ___

[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9093 ___

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r82517. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9151 ___

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed some minor modernization changes in r82521. Given that datetime.py is in the works (see issue7989), I don't think there is any reason to polish this demo further. -- resolution: - accepted status:

[issue9020] 2.7: eval hangs on AIX

2010-07-03 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: 2.7 final works fine on AIX. This issue can be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9020 ___

[issue9020] 2.7: eval hangs on AIX

2010-07-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: 2.7 final works fine on AIX. This issue can be closed. Ok. Thanks for your reports! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9086] Wrong linking terminology in windows FAQ

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 3.1 docs say same. For *nix, I would agree with your view of 'static', but perhaps MS uses a different terminology. Martin? Or maybe the doc writer is using a local def of static simply as a terse, if potentially confusing, alternative to

[issue9091] str.capitalize() should not lower the rest of the string

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I disagree and recommend adding and the rest lowered. 'lower' could be marked as a reference to the .lower method. If one interprets 'capitalized' as an adjective describing the result, then it is fairly clear. If one interprets it as

[issue9101] reference json format in file formats chapter

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Specific suggested text and location for doc changes are more likely to get action. File Formats is chapter 13 in 3.x. The only text now is The modules described in this chapter parse various miscellaneous file formats that aren’t markup

[issue9106] remove numbers from 3-.. level entries in docs toc

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 'Invalid' because invalid for this tracker and moved to sphinx tracker (there is no option for 'wrong tracker'). On Windows help-format docs, there are no numbers on the left. There are in the chapter TOC in the chapter pages. I would have to

[issue9152] Dead code in datetime module

2010-07-03 Thread Alexander Belopolsky
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: Apparently introduced by a wholesale elimination of PyString_ in r57374, the else clause in the following snippet from call_tzname is redundant: if (!PyUnicode_Check(result)) {

[issue9152] Dead code in datetime module

2010-07-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- keywords: +patch nosy: +mark.dickinson resolution: - accepted stage: - commit review Added file: http://bugs.python.org/file17851/issue9152.diff ___ Python tracker

[issue9118] help() on a property descriptor launches interactive help

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I agree that help(None) should return help on None but suggest a change to the patch. I understand that the point of changing -def __call__(self, request=None): to the somewhat opaque +def __call__(self, *args): +try: +

[issue9118] help() on a property descriptor launches interactive help

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Yes, I realized that 2+ arguments would be equivalent to none, but was too lazy to handle that case. (Falling into interactive help may actually be better than an error message for some users.) Terry's solution is

[issue9132] Documentation for comparing dictionaries is out of date

2010-07-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The RefMan section is 5.9. Comparisons. The 3.x docs are by design pretty much free of 2.x references. Which is to say, they are a fresh start with 3.0 as the base. So I would also remove footnote 5. Footnote 4 is currently needed because the

[issue960821] Add an updating load function in pickle

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On the second reading, OP's request has nothing to do with pickle.load(). In fact, there is no coherent request here. -- status: pending - closed ___ Python tracker

[issue9132] Documentation for comparing dictionaries is out of date

2010-07-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for tackling this Terry. Did you include a patch, i.e. a diff file? If not, the “patch” keyword does not apply, IIUC. Plain English suggestions are helpful but they’re reviewed in a different way than a diff. “The 3.x docs are by design

[issue9101] reference json format in file formats chapter

2010-07-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 1: Agreed. Alternate short formulation: “nor related to email”. 2: Agreed with Anatoly. json should be linked from the File Formats section, since it’s a file format unrelated to [SGML] markup languages or email, and it’s used for a variety of