[issue14026] test_cmd_line_script should include more sys.argv checks

2012-04-22 Thread Roundup Robot
Roundup Robot 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 ff6593aa8376 by Nick Coghlan in branch 'd

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-04-22 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed versions: -Python 2.7 ___ Python tracker ___ _

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

2012-04-22 Thread Eric Snow
Eric Snow 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 reference leak. I haven't

[issue14618] remove modules_reloading from the interpreter state

2012-04-22 Thread Eric Snow
Eric Snow added the comment: patch added to issue13959. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[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 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 : 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 messages: 158954

[issue14643] Security page out of date

2012-04-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2012-04-22 Thread STINNER Victor
Changes by STINNER Victor : -- title: Value returned by random.random() out of valid range -> Value returned by random.random() out of valid range on 64-bit ___ Python tracker _

[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 : -- title: Fix imoprtlib.h build rule to not depend on hg -> Fix importlib.h build rule to not depend on hg ___ Python tracker __

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

2012-04-22 Thread Eric Snow
Eric Snow 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: http://bugs.python.org/file25303/iss

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

2012-04-22 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

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

2012-04-22 Thread Vinay Sajip
Vinay Sajip 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, Apr 22 2012, 12:39:08)

[issue14644] test_logging failure on OS X Tiger

2012-04-22 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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 getreply line =

[issue14644] test_logging failure on OS X Tiger

2012-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +db3l ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

2012-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should probably come with an unit test. -- nosy: +pitrou ___ Python tracker ___ ___ Pytho

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

2012-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Patch with unit test. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14474] mishandling of AttributeError in threads

2012-04-22 Thread Stefan Behnel
Stefan Behnel 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 GIL during the plain C loop

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

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

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

2012-04-22 Thread Mark Dickinson
Mark Dickinson 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 have no idea what the

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

2012-04-22 Thread Charles-François Natali
Charles-François Natali 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 in if they w

[issue14643] Security page out of date

2012-04-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: I fixed the 2.7.3 page. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2012-04-22 Thread Brett Cannon
Brett Cannon 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 __

[issue10731] UnicodeDecodeError in OS X tkinter when binding to

2012-04-22 Thread Kevin Walzer
Kevin Walzer 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 proceed with implementing a fix

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-22 Thread Brett Cannon
Brett Cannon added the comment: To note: _frozen_importlib is a CPython implementation detail -- ___ Python tracker ___ ___ Python-bu

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

2012-04-22 Thread Eric Snow
Eric Snow 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, there's already no small amount of

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

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis 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 tracker

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

2012-04-22 Thread Brett Cannon
Brett Cannon added the comment: On Sun, Apr 22, 2012 at 12:43, Martin v. Löwis wrote: > > Martin v. Löwis 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 i

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

2012-04-22 Thread Roundup Robot
Roundup Robot 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 -- ___ Python tracker

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

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis 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 : -- resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker _

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

2012-04-22 Thread Roundup Robot
Roundup Robot 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 ___ Python tracker

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

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis 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 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 -- nosy: +python-dev ___

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

2012-04-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- Removed message: http://bugs.python.org/msg158973 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Vinay Sajip
Vinay Sajip 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 extension of the time take

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

2012-04-22 Thread Brett Cannon
Brett Cannon 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. -- ___ Python tracker

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

2012-04-22 Thread R. David Murray
New submission from R. David Murray : 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 linesep characters get

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread JohnM
JohnM 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 length and non-determinism of the

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Charles-François Natali
Charles-François Natali 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 extens

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

2012-04-22 Thread Mark Dickinson
Mark Dickinson 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. == ERROR: test_fro

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-22 Thread Vinay Sajip
Vinay Sajip 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 times: every other time, it

[issue14605] Make import machinery explicit

2012-04-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14646] Require loaders set __loader__ and __package__

2012-04-22 Thread Brett Cannon
New submission from Brett Cannon : 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 PEP 302 to say __lo

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Make import machinery explicit ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2012-04-22 Thread Michael . Elsdörfer
Changes by Michael.Elsdörfer : -- nosy: +elsdoerfer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14646] Require loaders set __loader__ and __package__

2012-04-22 Thread Eric Snow
Eric Snow added the comment: Yeah, that patch for reload() in issue13959 relies on this. -- nosy: +eric.snow ___ Python tracker ___ _

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

2012-04-22 Thread Brett Cannon
Brett Cannon 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 bytes object creatio

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

2012-04-22 Thread Eric Snow
Eric Snow 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 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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14643] Security page out of date

2012-04-22 Thread Antoine Pitrou
Antoine Pitrou 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 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 returned. Tr

[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 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: http://bugs.python.org/file25306/isodates.patch _

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

2012-04-22 Thread Martin v . Löwis
Martin v. Löwis 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 Python/importlib.h -- _

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

2012-04-22 Thread Brett Cannon
Brett Cannon 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. -- ___ Pytho

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

2012-04-22 Thread Brett Cannon
New submission from Brett Cannon : > ./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; imp.reload(x)" I

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

2012-04-22 Thread Brett Cannon
Brett Cannon added the comment: Segfault: > ./python.exe -c "import importlib.abc as x; import imp; imp.reload(x)" > Traceback (most recent call last): File "", line 1, in File "", line 611, in load_module File "", line 271, in module

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

2012-04-22 Thread Eric Snow
Eric Snow 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.) Also, what's the best way to e

[issue14605] Make import machinery explicit

2012-04-22 Thread Brett Cannon
Brett Cannon 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 test_zipimport_s

[issue14605] Make import machinery explicit

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

[issue14605] Make import machinery explicit

2012-04-22 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14605] Make import machinery explicit

2012-04-22 Thread Roundup Robot
Roundup Robot 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 ___ Python tracker

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

2012-04-22 Thread Brett Cannon
Brett Cannon 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 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 tests and for thr

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

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

[issue3177] Add shutil.open

2012-04-22 Thread Hobs
Hobs 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 the other os.* calls do