[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)
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 Yanov Aknin's ssc() utility and the issue 6507 updates to dis.dis() -- assignee: ncoghlan components: Library (Lib) messages: 109161 nosy: ncoghlan priority: normal severity: normal status: open title: dis.show_code() variant that accepts source strings (and returns rather than prints) type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6507] Enhance dis.dis to autocompile codestrings
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: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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. sys.modules['multiprocessing._multiprocessing'] is None. Now, on Windows, for some reason, from ._multiprocessing import win32 is used. In 2.6, this used to work. In 2.7, due to r81380, it stopped working (i.e. if I revert r81380, it works again). Adding Brett to the nosy list, as he made this change. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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 because, as a result of the bug fixed in r81380, from ._multiprocessing was falling back to this form anyway. -- nosy: +pmoore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)
Mark Dickinson dicki...@gmail.com added the comment: Yes, please! -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
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: maybe... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
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\█ C:\temp\█dir Le volume dans le lecteur C s'appelle Disque dur Le numéro de série du volume est D4BA-260C Répertoire de C:\temp\█ 03/07/2010 11:10REP . 03/07/2010 11:10REP .. 08/06/2010 09:1344 a.py 08/06/2010 14:2111 b.py 2 fichier(s) 55 octets 2 Rép(s) 58 733 801 472 octets libres C:\temp\█c:\Python31\python.exe a.py Traceback (most recent call last): File a.py, line 3, in module import b; ImportError: No module named b C:\temp\█notepad a.py [Replaced encoding with utf-8, then save and quit] C:\temp\█c:\Python31\python.exe a.py Traceback (most recent call last): File a.py, line 2, in module import b; ImportError: No module named b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
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 too many FFFDs so long as it doesn't munch valid sequences. However it would be very nice to get an explicit message about surrogates. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
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. For what it's worth, the code looks fine to me, and I've tested thoroughly; I can't see any reasons this could cause problems. Raising priority to release blocker just to alert Benjamin to the issue, and get his permission to go ahead (or not) before the release. -- assignee: - mark.dickinson nosy: +benjamin.peterson priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
Changes by Mark Dickinson dicki...@gmail.com: -- type: crash - security ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
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? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4945] json checks True/False by identity, not boolean value
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4945] json checks True/False by identity, not boolean value
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
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 program. Does it behave the same on Unix? Is there any way to replace current process on Windows so that references to calling parent process are not lost and it could wait for execution to complete? -- components: Library (Lib) messages: 109176 nosy: techtonik priority: normal severity: normal status: open title: os.execve puts process to background on windows versions: Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1576313] os.execvp[e] on win32 fails for current directory
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 specify just filename, but os.execv() doesn't work in this way - is that right and the issue is to make behavior of os.execv() like on windows? The current behavior definitely needs to be documented. -- nosy: +d...@python, techtonik versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1576313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
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 Windows, except than using subprocess.Popen(), and exit the script when the subprocess terminates. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9144] Import error for multiprocessing in 2.7rc2 on Windows
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 http://bugs.python.org/issue9144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9149] colorsys.py function rgb_to_hls
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 status: open title: colorsys.py function rgb_to_hls type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
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 track. A frame includes left and right channels. -- assignee: mark.dickinson - haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7673] audioop: check that length is a multiple of the size
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1576313] os.execvp[e] on win32 fails for current directory
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 documented (a full or relative path), but a footnote that this differs from the msvcrt behavior would probably be a useful addition. So I'm changing this to a doc bug. (I have verified that ./ works, I have not verified the msvcrt behavior.) -- assignee: - d...@python components: +Documentation -Windows nosy: +r.david.murray stage: unit test needed - needs patch type: feature request - behavior versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1576313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used
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: IDLE should not save trailing whitespace after strip trailing whitespace has been used type: behavior versions: Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9150 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5468] urlencode does not handle bytes and could easily handle alternate encodings
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 the bug report and patch. -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed title: urlencode does not handle bytes, and could easily handle alternate encodings - urlencode does not handle bytes and could easily handle alternate encodings ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping
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 () ... -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9094] Make python-m pickletools do something useful
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 command line. Similarly, I cannot find tests for any module's command line behavior to base -m pickletools testing on. -- nosy: +mark.dickinson resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9094] Make python-m pickletools do something useful
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9094] Make python-m pickletools do something useful
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9151] Demo/classes/Dates.py does not work in 3.x
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9151] Demo/classes/Dates.py does not work in 3.x
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9149] colorsys.py function rgb_to_hls
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9093] Tools/README is out of date
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 rep...@bugs.python.org http://bugs.python.org/issue9093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9093] Tools/README is out of date
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9093] Tools/README is out of date
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9151] Demo/classes/Dates.py does not work in 3.x
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r82517. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9151] Demo/classes/Dates.py does not work in 3.x
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: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9020] 2.7: eval hangs on AIX
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9020] 2.7: eval hangs on AIX
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 http://bugs.python.org/issue9020 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9086] Wrong linking terminology in windows FAQ
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 'load-time linking'. But that could just be .lib linking versus .dll linking, which is crystal clear. Can you write an alternative paragraph or two that you think is better? -- nosy: +loewis, tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9091] str.capitalize() should not lower the rest of the string
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 describing a process applied to only the first char, then is it not clear that something else (the inverse operation) is done to the rest. This additional would complete the description of the operation. With that addition, 'only' could be removed, so it reads Return a copy of the string with its first character capitalized and the rest lowered. or 'lower-cased' or 'lowercased' as the editor prefers. Loading 'only' to mean 'and the rest lowered' is a bit much and not necessary. -- keywords: +patch nosy: +tjreedy resolution: invalid - stage: committed/rejected - patch review status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9101] reference json format in file formats chapter
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 languages or are related to e-mail. PATCH 1: I am quite sure that 'or are related to e-mail' should be replaced by 'and are not related to email'. In any case, this is not the place to add a specific comment about json. Perhaps you meant that in 13.2. configparser — Configuration file parser, the following could be added to the end of the first paragraph. PATCH 2: The json module is also used for this purpose. -- keywords: +patch nosy: +tjreedy stage: - patch review versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9101 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9106] remove numbers from 3-.. level entries in docs toc
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 see an alternative before I would say yes to changing that. I do wish the page/section for each module had a section toc with links so I could see what subsections there are and jump without scrolling. I gather that would be a sphinx tracker issue too. -- nosy: +tjreedy resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9152] Dead code in datetime module
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)) { PyErr_Format(PyExc_TypeError, tzinfo.tzname() must return None or a string, not '%s', Py_TYPE(result)-tp_name); Py_DECREF(result); result = NULL; } else if (!PyUnicode_Check(result)) { PyObject *temp = PyUnicode_FromObject(result); Py_DECREF(result); result = temp; } -- assignee: belopolsky components: Extension Modules keywords: easy messages: 109203 nosy: belopolsky priority: normal severity: normal status: open title: Dead code in datetime module type: resource usage versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9152] Dead code in datetime module
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 rep...@bugs.python.org http://bugs.python.org/issue9152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9118] help() on a property descriptor launches interactive help
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: +request, = args +except ValueError: is to make help() work the same as now without defaulting request to None. However, I believe that it will change help(1,2) to being the same as help() instead raising TypeError. I do not think that that API change is desirable. This can be avoided by instead creating a private sentinel. The alternate replacement would be +__GoInteractive = object() +def __call__(self, request=__GoInteractive): +if request is not __GoInteractive: -if request is not None: with the rest of code the unchanged. -- nosy: +tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9118] help() on a property descriptor launches interactive help
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 certainly better. Attaching issue9118a.diff. -- assignee: - belopolsky resolution: - accepted stage: patch review - commit review versions: +Python 3.2 -Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17852/issue9118a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9132] Documentation for comparing dictionaries is out of date
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 text suggests something that is not true. Instead fix the text and remove 4. I verified both behavior claims with 3.1: d1 = {1+1j: 2, 1+2j: 3} d2 = {1+1j: 2, 1+2j: 3} d1 == d2 True d1 d2 Traceback (most recent call last): File pyshell#14, line 1, in module d1 d2 TypeError: unorderable types: dict() dict() PATCH suggestion: Replace the current entry with Mappings (dictionaries) compare equal if and only if they have the same key, value) pairs. Order comparision raise TypeError. Remove footnotes 4 and 5. Comparisons other than equality testing raise a TypeError. is not quite correct because 'comparisons' include 'is' and 'in' which do work as expected. -- keywords: +patch nosy: +tjreedy type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue960821] Add an updating load function in pickle
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 rep...@bugs.python.org http://bugs.python.org/issue960821 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9132] Documentation for comparing dictionaries is out of date
É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 pretty much free of 2.x references. Which is to say, they are a fresh start with 3.0 as the base.“ True. That said, I would leave footnote 4, since it provides a useful information for people caring about performance, and may interest them in digging into the details of the implementation. It may need an explicit mention “in CPython”, though. “So I would also remove footnote 5.” I don’t know. It’s an historical note about an implementation detail; it does no harm (apart maybe taking space for no gain) and may be interesting to some people. Does a core dev have an opinion on that (Georg?). “Footnote 4 is currently needed because the text suggests something that is not true.” I can’t say if the text is inaccurate or just difficultly readable. “Mappings (dictionaries) compare equal if and only if they have the same key, value) pairs. Order comparision raise TypeError.” I’ll even say “the same (key, value) pairs, irregardless of their order”. Is the term “order comparisons” used in the doc? If not, its meaning is non-obvious, and I’d like to find something clearer. “Comparisons other than equality testing raise a TypeError. is not quite correct because 'comparisons' include 'is' and 'in' which do work as expected.” I thought “is” was clearly identity and “in” membership or containement testing in the doc. Can you support your claim? Cheers -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9101] reference json format in file formats chapter
É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 purposes, not only config files. -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9101 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com