[issue14026] test_cmd_line_script should include more sys.argv checks

2012-04-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 22f0044ea366 by Nick Coghlan in branch '3.2': Close issue #14026 by better testing sys.argv handling in test_cmd_line_script (patch by Jason Yeo) http://hg.python.org/cpython/rev/22f0044ea366 New changeset

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-04-22 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Ported _imp.reload() (Python/import.c) to Lib/imp.py. Included is the change to PyImport_ReloadModule() to make it simply a wrapper around the pure Python imp.reload(). There's a good chance I don't have this right or that I have some

[issue14618] remove modules_reloading from the interpreter state

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: patch added to issue13959. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14618 ___ ___

[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Could you please run: $ sh -x ./configure to see what's going on. It might also be interesting to have the output of $ strace -f ./configure Thanks. -- nosy: +neologix ___ Python tracker

[issue14643] Security page out of date

2012-04-22 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: http://www.python.org/news/security/ is completely out of date. Also, the release pages (e.g. http://www.python.org/download/releases/2.7.3/) don't make it clear which versions are affected by the security issues. -- components: None

[issue14643] Security page out of date

2012-04-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14643 ___ ___ Python-bugs-list

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Value returned by random.random() out of valid range - Value returned by random.random() out of valid range on 64-bit ___ Python tracker rep...@bugs.python.org

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: Fix imoprtlib.h build rule to not depend on hg - Fix importlib.h build rule to not depend on hg ___ Python tracker rep...@bugs.python.org

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: A patch for magic and tag. It's not quite finished, but I wanted to see if the approach was palatable. FYI, I'm also trying to push forward the sys.implementation stuff, which would help on the pyc tag. -- Added file:

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14642 ___ ___ Python-bugs-list

[issue1521950] shlex.split() does not tokenize like the shell

2012-04-22 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I believe Dan meant that the behaviour of shlex.split() now is different from what it was when he first raised the issue (in July 2006). Looking at the default branch of CPython, this is what I see: Python 3.3.0a2+ (default:ff6593aa8376,

[issue14644] test_logging failure on OS X Tiger

2012-04-22 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: test_logging always fails on the OS X Tiger buildbot: http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x Traceback (most recent call last): File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/smtplib.py, line 365, in

[issue14644] test_logging failure on OS X Tiger

2012-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +db3l ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14644 ___ ___ Python-bugs-list mailing list

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch should probably come with an unit test. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch with unit test. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591 ___ ___

[issue14474] mishandling of AttributeError in threads

2012-04-22 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Could the while thread._count() c: pass in test_thread.py be changed to this? (as used in other places) while thread._count() c: time.sleep(0.01) It currently hangs in Cython because it doesn't free the

[issue14591] Value returned by random.random() out of valid range on 64-bit

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Dang. Patch now attached. -- Added file: http://bugs.python.org/file25304/random_jumpahead_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14591

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: [Dirkjan] Could we reconsider ARM support at this time? Note that it's just the Linux old ABI (OABI) that needs this patch; ARM / Linux using the new family of ABIs (EABI) should be fine. IIUC, this old ABI is being phased out, but I

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I have used the name secure_compare in the past for such a function. That said, I don't have strong feelings either way about the naming, so I'll yield to the others. I prefer this name too. Wait one day or two (to let others chime

[issue14643] Security page out of date

2012-04-22 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I fixed the 2.7.3 page. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14643 ___ ___

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14642 ___

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: The thing should also do a sanity check on the syntax so as to minimize the chances of freezing code that has no chance of working. -- ___ Python tracker rep...@bugs.python.org

[issue10731] UnicodeDecodeError in OS X tkinter when binding to MouseWheel

2012-04-22 Thread Kevin Walzer
Kevin Walzer wordt...@users.sourceforge.net added the comment: I've added some comments to this on the Tkinter-dev mailing list, but to summarize, the bug is not reproducible on the Tcl side of the bridge, and so I am not clear what changes can be made in Tk's internals. It might e better to

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: To note: _frozen_importlib is a CPython implementation detail -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: After thinking about it, is MAGIC an implementation detail? It certainly reflects changes specific to the CPython interpreter. I'm much more comfortable with leaving implementation details in Python/import.c. On the other hand,

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What do you mean by sanity check on the syntax? The current Makefile rule to build importlib.h already checks the syntax of _bootstrap.py, and fails if there is a syntax error. -- ___ Python

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Sun, Apr 22, 2012 at 12:43, Martin v. Löwis rep...@bugs.python.orgwrote: Martin v. Löwis mar...@v.loewis.de added the comment: What do you mean by sanity check on the syntax? The current Makefile rule to build importlib.h already checks

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4e853913054c by Brett Cannon in branch 'default': Issue #13959: Continue to try to accomodate altsep in importlib by not http://hg.python.org/cpython/rev/4e853913054c --

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Also, what's the issue with a shell script? The current Makefile will rebuild importlib.h if its time stamp is older than the one of _bootstrap.py. That will fail if ./python was not build. So what is the problem to solve? --

[issue1346572] Remove inconsistent behavior between import and zipimport

2012-04-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - wont fix stage: needs patch - committed/rejected status: open - closed versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue14622] Python http.server is dead slow using gethostbyaddr/getfqdn for each request

2012-04-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fe66fb61f199 by Vinay Sajip in branch 'default': Issue #14622: Increased default timeout for SMTPHandler. http://hg.python.org/cpython/rev/fe66fb61f199 -- nosy: +python-dev

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This issue remains as won't fix. ARM is supported; just OABI is not, and never will be. If anybody needs that, they will have to maintain their own fork of Python. -- ___ Python tracker

[issue14644] test_logging failure on OS X Tiger

2012-04-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bdbcb8f48ddd by Vinay Sajip in branch 'default': Issue #14644: Increased default timeout for SMTPHandler. Note: last commit message referred to the wrong issue number. http://hg.python.org/cpython/rev/bdbcb8f48ddd

[issue14622] Python http.server is dead slow using gethostbyaddr/getfqdn for each request

2012-04-22 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- Removed message: http://bugs.python.org/msg158973 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14622 ___

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: There's certainly a problem to be addressed here, but integrating the test into the regular test suite represents a problem in that the test takes around 10 minutes to run, and sometimes completes successfully. I'm not sure a 10-minute

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I don't quite follow. I have no issue with a shell script verifying things by doing an `hg status` to verify certain truths (or something). I said a shell *or* Python script to begin with. -- ___

[issue14645] Generator does not translate linesep characters in certain circumstances

2012-04-22 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: I ran into this while translating a test, but it turns out it is a long standing problem. I presume it has not been an issue because in general in Python2 email messages are read as text with universal newline support, and thus the

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread JohnM
JohnM phlogistonj...@asynchrono.us added the comment: Thank you both for looking at this. I've added an updated version of the patch that incorporates the last two suggestions that Charles-François made. I agree that this test may not be appropriate for the python test suite, due to the

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: There's certainly a problem to be addressed here, but integrating the test into the regular test suite represents a problem in that the test takes around 10 minutes to run, and sometimes completes successfully. I'm not sure a

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ok so now i only get errors for _Fast tests am I correct in assuming that this is because i lack a C implementation? If your errors look like the one below, then yes. ==

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: John: Thanks for the updated patch. Charles-François: Certainly I can reduce the iterations to make the test faster. As it is, I did reproduce the failure on my dev system, but only once, after running John's test script about a dozen

[issue14605] Make import machinery explicit

2012-04-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14605 ___

[issue14646] Require loaders set __loader__ and __package__

2012-04-22 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: As discussed and agreed to on python-dev, it makes sense to require loaders to set __loader__ and __package__ so that they can be relied upon by globally executed code in a module. The following needs to happen to close this bug: * Update

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Make import machinery explicit ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___

[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-04-22 Thread Michael . Elsdörfer
Changes by Michael.Elsdörfer mich...@elsdoerfer.info: -- nosy: +elsdoerfer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13857 ___ ___

[issue14646] Require loaders set __loader__ and __package__

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Yeah, that patch for reload() in issue13959 relies on this. -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14646

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: First off, you should separate the patches for get_magic() and get_tag(). Second, why is there _get_pyc_magic_int() when it is never called? Third, all of this would be greatly simplified if you just had a _RAW_MAGIC_NUMBER of 3220, did the

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Good feedback. The some of that code was the result of directly translating the C. I'll get a new, simpler patch up probably tomorrow night. Thanks. -- ___ Python tracker

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: By the way, I don't think the algorithm used in the current patch is correct. For 'date.from_iso_week(2009, 1)' I get 2009/1/1, which was a Thursday. The documentation seems to indicate that a Monday should be returned. --

[issue14646] Require loaders set __loader__ and __package__

2012-04-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14646 ___

[issue14643] Security page out of date

2012-04-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I fixed the 2.7.3 page. Hmm, I think the changes don't really help: the page now states that 2.7.2 is affected, but the reader doesn't know whether previous versions (at least on the 2.7 branch) were also affected. --

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Mark Dickinson wrote: By the way, I don't think the algorithm used in the current patch is correct. For 'date.from_iso_week(2009, 1)' I get 2009/1/1, which was a Thursday. The documentation seems to indicate that a Monday should be

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-22 Thread Esben Agerbæk Black
Esben Agerbæk Black esbe...@gmail.com added the comment: I somehow re-uploaded an old patch, this one contains buggy c-code, but fixes the python implementation. Any pointers to how to get started on the c bi would be greatly appreciated. -- Added file:

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: My point is: ISTM that everything is already as it should be, I can see no problem in the status quo. If there is a problem, can you please rephrase it? If you want a shell script just to have one, here is one #!/bin/sh make

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: No, I don't want a shell script just to have one. =) The status quo seems to work, but people like Georg think it's partially luck that it does and if hg changes its semantics that will cause us trouble. --

[issue14647] imp.reload() on a package leads to a GC assertion failure

2012-04-22 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: ./python.exe -c import urllib.parse as x; import imp; imp.reload(x) Assertion failed: (gc-gc.gc_refs != 0), function visit_decref, file Modules/gcmodule.c, line 327. zsh: abort ./python.exe -c import urllib.parse as x; import imp;

[issue14647] imp.reload() on a package leads to a segfault or a GC assertion failure

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Segfault: ./python.exe -c import importlib.abc as x; import imp; imp.reload(x) Traceback (most recent call last): File string, line 1, in module File frozen importlib._bootstrap, line

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: How consistent do the semantics of reload() need to remain? (The C version does more type checking than the Python version probably needs to worry about. reload() seems to be one of those bits that doesn't have much test coverage.)

[issue14605] Make import machinery explicit

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Attached is my (failing) attempt at making import explicit. Unfortunately I have four failing tests, 3 of which revolve around __main__ (which is why I added Nick to see if he had any ideas): test_cmd_line_script test_runpy test_threaded_import

[issue14605] Make import machinery explicit

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- keywords: +patch Added file: http://bugs.python.org/file25307/explicit.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14605 ___

[issue14605] Make import machinery explicit

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14605 ___ ___ Python-bugs-list mailing

[issue14605] Make import machinery explicit

2012-04-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1da623513b26 by Brett Cannon in branch 'default': Issue #14605: Expose importlib.abc.FileLoader and http://hg.python.org/cpython/rev/1da623513b26 -- nosy: +python-dev ___

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Loosening the type restrictions is fine. As for testing, that's what the test suite is supposed to do. So if need be just write tests in Python that exercise the C code. -- ___ Python tracker

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: To try and narrow down the issue, I now have separate patches for an explicit sys.meta_path and a sys.path_hooks. Both fail on tests, but for different reasons. The explicit sys.meta_path is still failing on the __main__ issue on three of the

[issue13959] Re-implement parts of imp in pure Python

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: Added file: http://bugs.python.org/file25309/explicit_path_hooks.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13959 ___

[issue3177] Add shutil.open

2012-04-22 Thread Hobs
Hobs hobsonl...@gmail.com added the comment: @eric.araujo, @giampaolo.rodola, (http://bugs.python.org/issue3177#msg140275) I'm not sure I understand why this was moved to shutil.open. It seems appropriate to try to accomplish what os.startfile() does in a cross-platform way. Don't many of