[issue9929] subprocess.Popen unbuffered not work

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Antoine, can you create the patch? I'm not familiar with IO. -- ___ Python tracker ___ ___ Python

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I shall create unit test later. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry, my patch didn't pass test_dynamic_key(test_winreg). (Apologize for not testing on unit test) RegEnumValueA and RegQueryInfoKeyA always returned 0 for required data size if target is HKEY_PERFORMANCE_DATA. The possible fixes I can imagine are... 1.

[issue9289] Skip test_long_key(test_winreg) on win2k + py2.x

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I found workaround for this. (Probably self.deletetree is more handful, though) -- versions: -Python 2.6 Added file: http://bugs.python.org/file19020/py27_fix_test_winreg_long_key.patch ___ Python tracker

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > Note that the original issue (test_tarfile failures on the Windows > buildbots) now seems fixed thanks to the various tarfile and > test_tarfile improvements. Yes, thanks. :-) -- ___ Python tracker

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter added the comment: > Why do you read it into a cStringIO? A cStringIO has the same interface > as a file, so you could simply operate on the file directly. In that particular case, because it isn't actually a file. That workflow was my attempt at simplification to illustrate a po

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Guilherme Polo
Guilherme Polo added the comment: Hi there, I believe I've fixed most of these errors. But I couldn't replicate the last error on the first message, so I guessed what could be the problem. Could you try the patch and see how it works for you ? (Thanks for the nosy addition, I rarely check fo

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Sorry, my mistake, I work in a mixed environment. If there are no objections, I´ll submit this (with fixed whitespace) -- ___ Python tracker _

[issue9951] introduce bytes.hex method

2010-09-25 Thread Arnon Yaari
New submission from Arnon Yaari : Following up on these discussions: http://psf.upfronthosting.co.za/roundup/tracker/issue3532 http://www.gossamer-threads.com/lists/python/dev/863892 I'm submitting a patch to add bytes.hex method in accordance to PEP 358. The code was taken from binascii so it s

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-25 Thread Michael Foord
Michael Foord added the comment: The attached patch fixes the issue (I think...) by tagging the result object. It removes the need for _wrapped_result altogether. The test fails without the change to TestSuite and passes with the change. This could be applied to 2.7-maint and py3k. Uhm... th

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-25 Thread Gregory Nofi
Gregory Nofi added the comment: I'm also creating a test for mailcap (Issue 6484), which is how I found this bug. I'll have an update to that test submitted soon once I implement r.david.murray's helpful suggestions. -- ___ Python tracker

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch compiles fine under Linux, but please don't use tabs for indentation of C files. -- ___ Python tracker ___ __

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: Closing, as suggested by neologix -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue9628] runtests.sh -x doesn't work with more than two args (sed error)

2010-09-25 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, the patch applies cleanly against up-to-date py3k branch: is there anything else to do before committing it? Regards, Sandro -- nosy: +sandro.tosi ___ Python tracker

[issue7110] Output test failures on stderr in regrtest.py

2010-09-25 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, the attached patch seems to do the trick, at least on what I can verify here on my machine. I'd appreciate a bit more of test from more experienced developers, just to catch corner cases I didn't see. Regards, Sandro -- keywords: +patch nosy: +sa

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch fixing the aforementioned issues, and with tests. -- keywords: +patch nosy: +exarkun Added file: http://bugs.python.org/file19015/sendallinterrupt.patch ___ Python tracker

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and an additional bug is that send() can return a successful partial write when it was actually interrupted by a signal. -- ___ Python tracker

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, the patch is enough to suppress the crash, but sendall() behaviour is buggy in another way: EINTR may be received as part of the select() call (on sockets with a timeout), in which case the loop will be exited early instead of retrying, losing track

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: The fix is very simple, but perhaps a test should be added. diff -r af0d7b32d6ce Modules/socketmodule.c --- a/Modules/socketmodule.cFri Sep 24 20:03:12 2010 +0200 +++ b/Modules/socketmodule.cSat Sep 25 21:09:58 2010 +0200 @@ -2581,8 +2581,8 @@ sock_send

[issue9890] Visual C++ Runtime Library Error is there a fix?

2010-09-25 Thread Gösta Huldt
Gösta Huldt added the comment: I get the same error, but only when IDLE is run with the -n flag. In my case, the error occurs when attempting to switch back to the IDLE gui after executing a script that opens a graphics window (using the vtk module). This is with Python 2.6. I have Visual C

[issue9950] socket.sendall() crash when receiving a signal

2010-09-25 Thread Antoine Pitrou
New submission from Antoine Pitrou : This was introduced by r74426 which addressed issue1628205. socket.sendall() calls PyErr_CheckSignals() (and potentially returns to the caller) without having the GIL. >>> import socket >>> c, s = socket.socketpair() >>> s.sendall(b"x"*(100 * 1024**2)) ^C^C

[issue6293] Have regrtest.py echo back sys.flags

2010-09-25 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, I've changed the initial patch to add a CLI option ('-g/--sysflags', '-f' is already used) to enable the echoing of sys.flags. If you need some other changes, just ping me. Regards, Sandro -- nosy: +sandro.tosi Added file: http://bugs.python.org/

[issue9947] Weird locking in logging config system

2010-09-25 Thread Vinay Sajip
Vinay Sajip added the comment: Fix checked into py3k and release27-maint, r85013. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue9945] Improper locking in logging

2010-09-25 Thread Vinay Sajip
Vinay Sajip added the comment: Fix checked into py3k and release27-maint branches, r85012. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue9562] Slightly misleading wording in documentation of dict.update

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: Committed original suggestion as r85011. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue9562] Slightly misleading wording in documentation of dict.update

2010-09-25 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, does the attached patch contains the expected wording? Thanks, Sandro -- nosy: +sandro.tosi Added file: http://bugs.python.org/file19013/issue9562-py3k.patch ___ Python tracker

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gpolo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > Are you sure of that? I don't see how Python behaviour would be different to > a the same program written in C. Could you write a short example written in C > to prove that? I also found this surprising, so I wroke a quick C program to test this (s

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2010-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not use threads so I cannot comment on the technical issue. Since the current behavior is not clearly a bug, I do not think a change would or know that it should be applied to 2.7/3.1. So I suggest that you both 1. Suggest a doc patch on this issue. That

[issue9360] nntplib cleanup

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: And here is a patch integrating doc fixes and updates. -- Added file: http://bugs.python.org/file19011/nntplib_cleanup7.patch ___ Python tracker ___

[issue5412] extend configparser to support mapping access(__*item__)

2010-09-25 Thread Łukasz Langa
Łukasz Langa added the comment: Patch updated: * uses collections because they are built into the executable for 3.2 * uses itertools for the same reasons * in the end doesn't use weakrefs since after recent commits (Raymond removed __del__ from OrderedDict) the reference cycle problem went

[issue5412] extend configparser to support mapping access(__*item__)

2010-09-25 Thread Łukasz Langa
Changes by Łukasz Langa : Removed file: http://bugs.python.org/file18760/issue5412.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1703592] have a way to ignore nonexisting locales in locale.setlocale

2010-09-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Certainly at a minimum, the docs should describe the exception and workaround instead of just: "setlocale() is not thread safe on most systems. Applications typically start with a call of import locale locale.setlocale(locale.LC_ALL, '') This sets

[issue9949] os.path.realpath on Windows does not follow symbolic links

2010-09-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Lib/ntpath.py: # realpath is a no-op on systems without islink support realpath = abspath However, Windows Vista and newer support symbolic links and other Python methods support them. (noticed this through source code inspection; haven't actually te

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher : Removed file: http://bugs.python.org/file19008/find-caller.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher : Added file: http://bugs.python.org/file19009/find-caller.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9948] findCaller is slow and loses case information on Windows

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher : findCaller() on loses case information on the files on Windows and has in general a really bad performance. The attached patch does not depend on filename comparisions and instead compares the object identity of the caller's global namespace against the on

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Well, first, this would only work for large objects. [...] > > Why do you think you might have such duplication in your workload? > > Some of the projects with which I work involve multiple manipulations > of large datasets. Often, we use Python scripts as

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter added the comment: > Well, first, this would only work for large objects. [...] > Why do you think you might have such duplication in your workload? Some of the projects with which I work involve multiple manipulations of large datasets. Often, we use Python scripts as "first and

[issue9947] Weird locking in logging config system

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher : Another case of improper locking in logging. The stopListening() method of the logging config acquires the logging lock, but it doesn't do it early enough. In order for this function to be thread safe it would have to lock before the if. Currently that l

[issue9946] lock use in logging

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: Dupe of #9945, sorry. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ P

[issue9946] lock use in logging

2010-09-25 Thread Georg Brandl
New submission from Georg Brandl : >From logging.Logger: def removeHandler(self, hdlr): """ Remove the specified handler from this logger. """ if hdlr in self.handlers: hdlr.acquire() try: self.handlers.remove(hdlr)

[issue1865] Document bytes alias for 2.7

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r85010. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bug

[issue9896] Introspectable range objects

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > One other thought. If there is a perceived need, I would rather an > alternate approach that unifies a language a bit by letting range() > expose its arguments as a slice and modify its input to accept a slice. This sounds like an obscure complication to me.

[issue9944] Typo in doc for itertools recipe of consume

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r85008. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue9945] Improper locking in logging

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher : I found a a useless lock acquiring in the 27 maintenance branch in logging and a missing one as well: Logger.removeHandler() locks around a handler lock, however the code executed in this lock is not depending on anything of that lock. However there is a

[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2010-09-25 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Sorry for the delay. Before suggesting a doc change to correct/complete the description of the *current* situation, we actually should consider changing this situation. I think this is reasonable and I feel encouraged by Gabriel Genellina: > I see no rea

[issue9783] _elementtree.c warnings under 64-bit Windows

2010-09-25 Thread Jon Anglin
Jon Anglin added the comment: Martin is correct about this patch. > In cases where we really can't propagate Py_ssize_t to (e.g. > XML_Parse), we need to check for an int overflow, and raise > an exception if it does overflow. Is this an appropriate approach? int PySize_AsInt(Py_ssize_t value

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-25 Thread Jon Anglin
Jon Anglin added the comment: > I have the long-term plan to eliminate all CRT usage from Python > on Windows. In this case, there is a straight-forward opportunity > to do so. Oh, OK. If that is the plan then I am on board. I will re-code the patch using the Win32 API directly. >> It may int

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > As long as these errors are reasonably explainable. > If a strange error only occurs when running nmap on an OS X server, > then it might be useful for the user to know that the OS X server > isn't able to service all connections properly due to a bug in

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The point of frameworks such as asyncore and twisted is to hide all > system-specific errors as much as possible and provide a portable > interface across all platforms. As long as these errors are reasonably explainable. If a strange error only occurs when r

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > I'm not convinced hiding operating system bugs is a good idea. Do you propose to let the error raise then? The point of frameworks such as asyncore and twisted is to hide all system-specific errors as much as possible and provide a portable interface acr

[issue8423] tiger buildbot: test_pep277 failures

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +db3l ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +db3l ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue9931] test_ttk_guionly hangs on XP5

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pmoore type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > EAGAIN can be raised too. I never experienced this error condition > myself in pyftpdlib >From the accept() man page: EAGAIN or EWOULDBLOCK The socket is marked nonblocking and no connections are present to be accepted. POSI

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch in attachment makes accept() return None in case no connection takes place and modifies the doc to make this very clear, also providing an example on how an asyncore-based server should be properly set-up . -- versions: +Python 2.6 Added file

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Answering the question as best I can: I don't know how the reference > counter is implemented in CPython, but if it's just a field in a > struct, then madvise could be sent the memory location starting with > the byte immediately following the reference counte

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-25 Thread Geoffrey Bache
Geoffrey Bache added the comment: I think the unhelpful part is mostly that it does not distinguish between argument types any more when the distinction is important in this context. In fact, it could be argued that what it said isn't even true: f() takes exactly 0 arguments (2 given) f() do

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: > My first thought is "Why is the reference counter stored with the object > itself?" Because if you move the reference counter out of the object, you a) add another indirection and b) depending on how you implement it require a certain amount of memory more p

[issue9941] Unify trace and profile interfaces

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: Sounds good to me. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue9940] Strange error reporting with "with" statement

2010-09-25 Thread Georg Brandl
Georg Brandl added the comment: At least not without losing generality, and we don't like that. -- nosy: +georg.brandl ___ Python tracker ___