[issue13405] Add DTrace probes

2012-02-22 Thread Marc Abramowitz
Marc Abramowitz added the comment: With an hg checkout, I don't run into the `offsetof` problem - it fails when it gets to calling dtrace to generate Python/dtrace.o (again -G is the culprit). ``` $ hg clone https://hg.jcea.es/cpython-2011/ $ cd cpython-2011 $ hg update dtrace-issue13405_2.7 $

[issue14073] allow per-thread atexit()

2012-02-22 Thread Tarek Ziadé
Tarek Ziadé added the comment: @grahamd : sometimes you don't own the code that contains the thread, so I think it's better to be able to shutdown properly all flavors of threads. -- ___ Python tracker __

[issue14073] allow per-thread atexit()

2012-02-22 Thread Graham Dumpleton
Graham Dumpleton added the comment: Reality is that the way Python behaviour is defined/implemented means that it will wait for non daemonised threads to complete before exiting. Sounds like the original code is wrong in not setting it to be daemonised in the first place and should be reporte

[issue14073] allow per-thread atexit()

2012-02-22 Thread Tarek Ziadé
Tarek Ziadé added the comment: Is there any good reason not to add this feature ? what would be the problem ? It does seem to be for the best, I don't see any drawbacks -- ___ Python tracker

[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2012-02-22 Thread Georg Brandl
Georg Brandl added the comment: It doesn't really matter if something was *meant* to be subclassed. If it can be in 3.x, and can't be in 3.x+1, that's a sort of backwards compatibility bug we want to avoid pretty strongly because it's gratuitous breakage. -- nosy: +georg.brandl

[issue14084] test_imp resource leak

2012-02-22 Thread Stefan Krah
New submission from Stefan Krah : I tried to reproduce the failure from #14080 using this: ./python -m test -uall -v -F test_imp After around 500 iterations the test fails: == ERROR: test_find_module_encoding (test.test_imp.

[issue14084] test_imp resource leak

2012-02-22 Thread Stefan Krah
Changes by Stefan Krah : -- type: behavior -> resource usage ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
New submission from Stefan Krah : The FreeBSD-9.0 bot shows a couple of warnings because some comparisons in PyUnicode_WRITE are always true: Objects/unicodeobject.c:2598: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2598: warning: comparison is a

[issue5411] Add xz support to shutil

2012-02-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: > So, do you agree that “not automated but not ugly” is better than “automated > with ugly klutches”? Definitely. If we have to add special cases that are almost as long as the original code, the "automation" seems pointless. > Note that there is a way to get f

[issue5411] Add xz support to shutil

2012-02-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: For the "xztar" format, you should also perhaps recognize the ".txz" extension - I've seen this used by FreeBSD. -- ___ Python tracker ___ ___

[issue14073] allow per-thread atexit()

2012-02-22 Thread Graham Dumpleton
Graham Dumpleton added the comment: At the moment you have showed some code which is causing you problems and a vague idea. Until you show how that idea may work in practice it is a bit hard to judge whether what it does and how it does it is reasonable. -- __

[issue14073] allow per-thread atexit()

2012-02-22 Thread Tarek Ziadé
Tarek Ziadé added the comment: Mmm.. you did not say yet why you are against this feature, other than "the lib *should not* use non-daemonized threads" This sounds like "the lib should not use feature X in Python because it will block everything" And now we're proposing to remove the limitat

[issue14086] str(KeyError("Foo")) Unexpected Result

2012-02-22 Thread David
New submission from David : The __str__() method of the KeyError class seems to put quotes around the argument given to the class. This was causing bizarre, escaped quotation marks to appear in my code (where the result of str(e) is often passed as the argument of another Exception), and it to

[issue14056] Misc doc changes for tarfile

2012-02-22 Thread Lars Gustäbel
Lars Gustäbel added the comment: a) Good point, a case of sloppy naming. b) IMO a table is a tad too much. The amount of different compression methods is still quite small. My patch proposes a simpler approach. c) A link to shutil is very useful. BTW, thanks for the effort. -- Added

[issue14073] allow per-thread atexit()

2012-02-22 Thread Graham Dumpleton
Graham Dumpleton added the comment: I haven't said I am against it. All I have done so far is explain on the WEB-SIG how mod_wsgi works and how Python currently works and how one would normally handle this situation by having the thread be daemonised. As for the proposed solution, where is th

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: Can you try to cast value to Py_UCS4 in assertions of PyUnicode_WRITE() macro? For example, replace assert(value <= 0xff); by assert((Py_UCS4)value <= 0xff); -- ___ Python tracker

[issue14073] allow per-thread atexit()

2012-02-22 Thread Tarek Ziadé
Tarek Ziadé added the comment: > Add an actual example here at least of how with the proposed feature your > code would then look. That's the part I am not sure at all about in fact. I don't know at all the internals in the shutdown process in Python and I was hoping Antoine would give us a

[issue14053] Make patchcheck work with MQ

2012-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 179bc7557484 by Nadeem Vawda in branch '2.7': Issue #14053: Fix "make patchcheck" to work with MQ. http://hg.python.org/cpython/rev/179bc7557484 New changeset fc5de19c66e2 by Nadeem Vawda in branch '3.2': Issue #14053: Fix "make patchcheck" to work

[issue14073] allow per-thread atexit()

2012-02-22 Thread Graham Dumpleton
Graham Dumpleton added the comment: Except that calling it at the time of current atexit callbacks wouldn't change the current behaviour. As quoted in WEB-SIG emails the sequence is: wait_for_thread_shutdown(); /* The interpreter is still entirely intact at this point, and the *

[issue14053] Make patchcheck work with MQ

2012-02-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: Committed. Thanks for the patch! > I haven't added NEWS as I thing is easier for the person that applies the > patch to simply write the line directly there instead of merging. Is that ok? Yes, that's fine; usually the NEWS entry is more or less the same as the

[issue14079] Problems with recent test_subprocess changes

2012-02-22 Thread Vinay Sajip
Vinay Sajip added the comment: > Was it one of the buildbots that was failing? No, I was doing some testing with the pythonv branch and ran into this on a Mac running OS X 10.5.8 (Leopard). I'll re-test and close the issue if all is well. -- ___ P

[issue14086] str(KeyError("Foo")) Unexpected Result

2012-02-22 Thread Julian Berman
Julian Berman added the comment: Hey there. Check out #2651 -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: Your suggestion eliminates many warnings, but not all. FreeBSD is still stuck with gcc-4.2, so perhaps this is a good compromise. Getting rid of the remaining warnings might require a more bloated solution. These are the remaining warnings: Objects/unicodeobjec

[issue14034] Add argparse howto

2012-02-22 Thread Éric Araujo
Éric Araujo added the comment: > You might want to coordinate with Issue 13850 a bit - they want a quick > reference table before > the first example (which would therefore mean before this howto which is > replacing the first example). The howto discussed here would be a new file in Doc/howt

[issue13447] Add tests for some scripts in Tools/scripts

2012-02-22 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13447] Add tests for some scripts in Tools/scripts

2012-02-22 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13447] Add tests for some scripts in Tools/scripts

2012-02-22 Thread Éric Araujo
Éric Araujo added the comment: I went for something even simpler: one new file Lib/test/test_tools.py. There is no need to have a file there and more files in Tools/tests, everything can go in test_tools (I’m not worried about file size, we already have a few thousand-liners test modules).

[issue14012] Misc tarfile fixes

2012-02-22 Thread Lars Gustäbel
Lars Gustäbel added the comment: I updated your patch: - I removed the "import as" bit completely and changed all occurrences of _open() to builtins.open() which is more readable and explanatory. - I object to changing the error messages in the 3.2 branch due to backwards compatibility, alth

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: It looks like in the FreeBSD (patched?) gcc version -Wtype-limits is part of -Wall. I can reproduce the same warnings on Ubuntu with: ./configure --with-pydebug CFLAGS=-Wtype-limits So I'm not so sure anymore if this is worth a patch at all. I could also expor

[issue14087] multiprocessing.Condition.wait_for missing

2012-02-22 Thread sbt
New submission from sbt : multiprocessing.Condition is missing a counterpart for the wait_for() method added to threading.Condition in Python 3.2. I will work on a patch. -- components: Library (Lib) messages: 153956 nosy: sbt priority: normal severity: normal status: open title: multi

[issue2377] Replace __import__ w/ importlib.__import__

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: So refactoring the Python code into C code has been done, but it's crashing. =) As usual, manual memory management sucks. I also think that their is still too much C code as it makes the whole thing somewhat brittle to any refactoring of importlib. I am serious

[issue14059] Implement multiprocessing.Barrier

2012-02-22 Thread sbt
sbt added the comment: > Wouldn't it be simpler with a mp.Condition? Well, it is a fair bit shorter than the implementation in threading.py. But that is not a fair comparison because it does implement reset(). I was trying to avoid using shared memory/ctypes since multiprocessing.synchroniz

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: 2012/2/21 Charles-François Natali But in other VMs id() is simply a number that gets assigned to objects that is monotonically increasing. So it can be extremely deterministic if the object creation order is consistent. -- _

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: I think the test is bogus. It would do better to either use str.endswith() or splitting off the various parts of __file__ to verify the filename is correct as is the directory. Otherwise it shouldn't matter if the directory is relative or absolute. --

[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: OK, I guess that this could now be closed, since 13609 has been commited. (It is currently reopened, but the proposed tweaks wouldn't influence the usage in argparse, even if accepted). I'm attaching a patch which updates the tests to the new $COLUMNS logic. Pre

[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek
Changes by Zbyszek Szmek : Removed file: http://bugs.python.org/file23241/patch1.1.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek
Changes by Zbyszek Szmek : Removed file: http://bugs.python.org/file23238/patch1.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek
Changes by Zbyszek Szmek : Removed file: http://bugs.python.org/file24152/patch2.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12806] argparse: Hybrid help text formatter

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: > I suppose here is where I should volunteer to update the patch file... @GraylinKim: do you still intend to work on this? -- ___ Python tracker ___

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Otherwise it shouldn't matter if the directory is relative or absolute. That's not really the issue here, both are relative. I am still baffled at that failure, I don't see why "" would be chosen over "." (which is inserted at the beginning of sys.path by th

[issue13779] os.walk: bottom-up

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: Maybe this could be closed? I'm attaching a small patch with a documentation clarification. (Adds "In either case the list of subdirectories is retrieved before the tuples for the directory and its subdirectories are generated."). -- keywords: +patch Ad

[issue12806] argparse: Hybrid help text formatter

2012-02-22 Thread Graylin Kim
Graylin Kim added the comment: I'd be willing to at some point but I cannot see myself getting around to it in the near future. If someone else wants to offer an implementation that would be great. On Wed, Feb 22, 2012 at 10:42 AM, Zbyszek Szmek wrote: > > Zbyszek Szmek added the comment: >

[issue14084] test_imp resource leak

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Both test_issue9319 and test_find_module_encoding seem to leak file descriptors. -- priority: normal -> high stage: -> needs patch versions: +Python 3.2 ___ Python tracker __

[issue14079] Problems with recent test_subprocess changes

2012-02-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14034] Add argparse howto

2012-02-22 Thread Steven Bethard
Steven Bethard added the comment: Oh ok. Sounds good then! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: Well, if you execute test_imp w/ importlib (-m importlib.test.regrtest test_imp) it still passes. So there is something very odd going on that probably relies on some other test doing something weird. And this might be hard to diagnose until the error triggers

[issue4256] argparse: provide a simple way to get a programmatically useful list of options

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: zsh completion is much more powerful. E.g. for gitlog I see: completing head completing commit object name completing cached file abspath.c git-lost-found.sh README aclocal.m4 git-merge-octopus.sh

[issue14088] sys.executable generating canonical path

2012-02-22 Thread Antonio Ribeiro
New submission from Antonio Ribeiro : Hi all, As it is my first time here, I'll try to explay step-by-step why I'm providing this path, and why I think that it is changing something that I believe that is not correct. First of all, I was trying to run one individual test, as the dev guide say

[issue14079] Problems with recent test_subprocess changes

2012-02-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: Cool, thanks for reporting and debugging the issue :-) -- ___ Python tracker ___ ___ Python-bugs-li

[issue13447] Add tests for some scripts in Tools/scripts

2012-02-22 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14084] test_imp resource leak

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14084] test_imp resource leak

2012-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset cbfd2bf80db0 by Antoine Pitrou in branch '3.2': Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. http://hg.python.org/cpython/rev/cbfd2bf80db0 New changeset fcd0a67e708e by Antoine Pitrou in branch 'default': I

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-02-22 Thread Anton Korobeynikov
Changes by Anton Korobeynikov : -- nosy: +Anton.Korobeynikov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue13370] test_ctypes fails when building python with clang

2012-02-22 Thread Anton Korobeynikov
Changes by Anton Korobeynikov : -- nosy: +Anton.Korobeynikov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue13405] Add DTrace probes

2012-02-22 Thread Marc Abramowitz
Marc Abramowitz added the comment: My understanding of DTrace is extremely shallow, but I think there is a major difference in how USDT probes are created between Solaris and OS X. Whereas on Solaris one generates object code using the -G option of dtrace and then links it in with the applica

[issue13703] Hash collision security issue

2012-02-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I have to amend my suggestion about sys.flags.hash_randomization. It needs to be non-zero even if $PYTHONHASHSEED is given instead of -R. Many other flags that also have envars work the same way, e.g. -O and $PYTHONOPTIMIZE. So hash_randomization has to w

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: OK, on FreeBSD the failure occurs reliably when test_sqlite and test_imp are chained, perhaps because of the import failure of sqlite3: [stefan@freebsd-amd64 ~/hg/cpython]$ ./python -m test -uall test_sqlite test_imp [1/2] test_sqlite test_sqlite skipped -- No mod

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > OK, on FreeBSD the failure occurs reliably when test_sqlite and > test_imp are chained, perhaps because of the import failure > of sqlite3: Mmh, funny, I can't trigger it here. Is there anything special in your sys.path? -- _

[issue13447] Add tests for some scripts in Tools/scripts

2012-02-22 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: > My only concern is communication: how do we tell people working on a tool > that they should write a test in test_tools? I’m not sure they would read > Tools/README; maybe a note at the top of the Python files would work; a note > in the devguide;

[issue14089] Patch to increase fractions lib test coverage

2012-02-22 Thread Oleg Plakhotnyuk
New submission from Oleg Plakhotnyuk : The last few missing bits to complete test coverage of 'fractions.py' library. ./python.exe -E -Wd -m test -v -T -D ../coverage/test_fractions test_fractions lines cov% module (path) 270 100% fractions (/Users/family/Documents/code/python/re

[issue13703] Hash collision security issue

2012-02-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Never mind about sys.hash_seed. See my follow up in python-dev. I consider this issue is closed wrt the 2.6 branch. -- ___ Python tracker _

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-02-22 Thread Michael Foord
Michael Foord added the comment: Note that apple have made gcc available, as part of command line tools for XCode, freely (free developer registration required though) from: https://developer.apple.com/downloads/ See: http://kennethreitz.com/xcode-gcc-and-homebrew.html --

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: No, this is sys.path after sys.path.insert(0, os.curdir): ['.', '', '/usr/local/lib/python33.zip', '/usr/home/stefan/hg/cpython/Lib', '/usr/home/stefan/hg/cpython/Lib/plat-freebsd9', '/usr/home/stefan/hg/cpython/build/lib.freebsd-9.0-RELEASE-amd64-3.3-pydebug']

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: I can confirm the failure when an import fails prior to running test_imp (i.e. trying importing some non-existent module like Stefan did at the top of test_imp). Luckily importlib doesn't fail in this case. =) -- ___

[issue14073] allow per-thread atexit()

2012-02-22 Thread Zvezdan Petkovic
Changes by Zvezdan Petkovic : -- nosy: +zvezdan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27d31f0c4ad5 by Charles-François Natali in branch 'default': Issue #14077: importlib: Fix regression introduced by de6703671386. http://hg.python.org/cpython/rev/27d31f0c4ad5 -- nosy: +python-dev ___ Pyt

[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks

2012-02-22 Thread Petri Lehtinen
Petri Lehtinen added the comment: Yeah. Seems that fixing #12715 automatically also fixed this, so closing as duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> Add symlink support to shutil functions ___ Python tracker

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Charles-François Natali
Charles-François Natali added the comment: I've committed the fix. As for improving the randomness of the temporary file name, I'm not against it (I'm just not convinced it's necessary). -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___

[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x

2012-02-22 Thread STINNER Victor
New submission from STINNER Victor : [241/364/1] test_zlib Fatal Python error: Bus error Current thread 0x2b8f2240d260: File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py", line 96 in test_big_buffer File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel

[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x

2012-02-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: This was already reported as issue 13873. -- nosy: +nadeem.vawda resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> SIGBUS in test_zlib on Debian bigmem buildbot ___ Python t

[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot

2012-02-22 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +haypo, loewis, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: The same test found a bug in Mac OS X kernel: issue #11277. I'm unable to reproduce the crash on Fedora 16 (with 12 GB of RAM). It may depend on zlib version or the kernel version. I'm running Linux 3.2.6-3.fc16.x86_64 with zlib 1.2.5-6.fc16. -- ___

[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: A recent crash: [241/364/1] test_zlib Fatal Python error: Bus error Current thread 0x2b8f2240d260: File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py", line 96 in test_big_buffer File "/var/tmpfs/martin.vonloewis/3.x.

[issue13873] SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot

2012-02-22 Thread STINNER Victor
Changes by STINNER Victor : -- title: SIGBUS in test_zlib on Debian bigmem buildbot -> SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot ___ Python tracker ___

[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: > This was already reported as issue 13873. I searched the issue but I failed to find it because you forgot to mention the test name (test_big_buffer) :-p -- ___ Python tracker

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I can confirm the failure when an import fails prior to running > test_imp (i.e. trying importing some non-existent module like Stefan > did at the top of test_imp). Luckily importlib doesn't fail in this > case. =) I can't reproduce :( Can either of you two

[issue14089] Patch to increase fractions lib test coverage

2012-02-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14088] sys.executable generating canonical path

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is unfortunately wrong since it will fail in the face of symlinks. (if "foo" is a symlink to another directory, then "foo/../bar" is not the same thing as "bar") -- nosy: +pitrou ___ Python tracker

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread Massimo Paladin
New submission from Massimo Paladin : Here is the behavior I am getting only on Python 2.7.2 in a Fedora 16: $ cat /tmp/example.py from subprocess import Popen,PIPE args = "whatever program".split() p = Popen(args) If I run the program with: $ cd /tmp/; python example.py I get following as expe

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce the problem on Fedora 16 with Python 2.7.2. > It hangs until I stop it with ctrl-c Do you get an exception after hiting CTRL+c? -- nosy: +haypo ___ Python tracker

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread Massimo Paladin
Massimo Paladin added the comment: Yes, the expected one: ^CTraceback (most recent call last): File "/tmp/example.py", line 7, in p = Popen(args) File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 12

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread Massimo Paladin
Massimo Paladin added the comment: The line which is mentioned in the exception for the file example.py is 7 because I have something commented out which I didn't past in the text before. -- ___ Python tracker __

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: Could you try to collect more information with gdb? cd ~; gdb -args python /tmp/example.py (gdb) run CTRL+c (gdb) where -- ___ Python tracker __

[issue2377] Replace __import__ w/ importlib.__import__

2012-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: Makes sense to me (your new proposal sounds pretty close to the sketch I posted on the mailing list). It's really only the performance of in-function imports that concerned me and those are almost always going to get hits in sys.modules. -- __

[issue14019] Unify tests for str.format and string.Formatter

2012-02-22 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: I have some questions about this: 1) In Lib/test/string_tests.py it says: “Common tests shared by test_str, test_unicode, test_userstring and test_string” but a) I cannot find test_str b) string is imported and only some constants ascii_letter

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread Massimo Paladin
Massimo Paladin added the comment: $ cd ~; gdb -args python /tmp/example.py GNU gdb (GDB) Fedora (7.3.50.20110722-10.fc16) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change

[issue14019] Unify tests for str.format and string.Formatter

2012-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: At least the first couple of those look like obsolete comments left over from the 2.x branch (we didn't do a mass renaming in the test suite, so many tests still live in their old locations). -- ___ Python tracker <

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: I'd rather get importlib working fast enough that you are okay with bootstrapping it so we can delete the offending code. =) -- ___ Python tracker _

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-02-22 Thread Ned Deily
Ned Deily added the comment: >Note that apple have made gcc available, as part of command line tools >for >XCode, freely (free developer registration required though) from: > https://developer.apple.com/downloads >See: >http://kennethreitz.com/xcode-gcc-and-homebrew.html No. The new version o

[issue13405] Add DTrace probes

2012-02-22 Thread Marc Abramowitz
Marc Abramowitz added the comment: I noticed that jcea already had some commented out stuff for OS X in his configure.in. I tried it out and stuff builds and works in a basic way, although it might not be fully functional. ``` ~/src/python-hg/cpython-2011$ hg diff configure.in diff -r b50130

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: Here's a minimal test case for now. It only fails if called as -m test: $ ./python Lib/test/test_dot.py # OK $ ./python Lib/test/regrtest.py test_dot # OK [1/1] test_dot Warning -- sys.path was modified by test_dot $ ./python -m test test_dot [1/1]

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: > (gdb) where > #0  0x0039d3a0e8e0 in __connect_nocancel () from /lib64/libpthread.so.0 > #1  0x7095c678 in ?? () from > /usr/lib64/python2.7/lib-dynload/_socketmodule.so > #2  0x7095d524 in ?? () from > /usr/lib64/python2.7/lib-dynload/_so

[issue14091] python subprocess hangs if script called from another directory

2012-02-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14088] sys.executable generating canonical path

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: We can use realpath() if the function is available. Something similar is already done for sys.argv[0]. We should also use GetFullPathNameW() on Windows. -- nosy: +haypo Added file: http://bugs.python.org/file24607/sys_executable_realpath.patch ___

[issue14088] sys.executable generating canonical path

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #13402. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14088] sys.executable generating canonical path

2012-02-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We can use realpath() if the function is available. Something similar > is already done for sys.argv[0]. We should also use GetFullPathNameW() > on Windows. GetFullPathName() is an abspath() equivalent. For realpath() you want GetFinalPathNameByHandle(), aka.

[issue14080] Sporadic test_imp failure

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: Antoine, what is your gcc version? The test case I posted fails with Debian/gcc-4.3.2 and Ubuntu/gcc-4.4.3. The two affected buildbots have gcc-4.2.x. But the test case passes on Fedora/gcc-4.6. -- ___ Python tracker

[issue14088] sys.executable generating canonical path

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: > GetFullPathName() is an abspath() equivalent. For realpath() you > want GetFinalPathNameByHandle(), aka. _nt.getfinalpathname(). Ah? ntpath.realpath() uses nt._getfullpathname(). Is it a bug in ntpath? -- ___ Pyth

[issue14092] __name__ inconsistently applied in class definition

2012-02-22 Thread Lex Berezhny
New submission from Lex Berezhny : The following behavior doesn't make sense, especially since it works correctly for other special attributes: >>> class F: __name__ = "Foo" >>> F.__name__ 'F' >>> F().__name__ 'Foo' >>> F.__name__ = 'Foo' >>> F.__name__ 'Foo' Works fine for __module_

[issue14093] Mercurial version information not appearing in Windows builds

2012-02-22 Thread Vinay Sajip
New submission from Vinay Sajip : Currently, the Mercurial revision information is not appearing in Windows builds - they always appear to be "default". This appears to be because the relevant information is not passed to getbuildinfo.c. The attached patch rectifies this, making the assumption

  1   2   >