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

2010-09-25 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Martin Lowis do you mean API when you type SDK? When I said SDK examples, then I really meant examples as published in the SDK, not examples as published in the API (and the SDK documentation, in turn, is published on msdn). But yes, the

[issue9940] Strange error reporting with with statement

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: At least not without losing generality, and we don't like that. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9940 ___

[issue9941] Unify trace and profile interfaces

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Sounds good to me. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9941 ___

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-25 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net 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

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com 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:

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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.

[issue9931] test_ttk_guionly hangs on XP5

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pmoore type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9931 ___ ___

[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 pit...@free.fr: -- nosy: +db3l ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list

[issue8423] tiger buildbot: test_pep277 failures

2010-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +db3l ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8423 ___ ___ Python-bugs-list mailing list

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com 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

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue6706] asyncore's accept() is broken

2010-09-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com 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

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

2010-09-25 Thread Jon Anglin
Jon Anglin jang...@fortresgrand.com 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

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

2010-09-25 Thread Jon Anglin
Jon Anglin jang...@fortresgrand.com 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

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

2010-09-25 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke jgehr...@gmail.com 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

[issue9945] Improper locking in logging

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: 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

[issue9944] Typo in doc for itertools recipe of consume

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r85008. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9944

[issue9896] Introspectable range objects

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue1865] Document bytes alias for 2.7

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r85010. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1865 ___

[issue9946] lock use in logging

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

[issue9946] lock use in logging

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Dupe of #9945, sorry. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9946 ___

[issue9947] Weird locking in logging config system

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: 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

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu 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

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-09-25 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: 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

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

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher armin.ronac...@active-4.com: Added file: http://bugs.python.org/file19009/find-caller.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9948 ___

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

2010-09-25 Thread Armin Ronacher
Changes by Armin Ronacher armin.ronac...@active-4.com: Removed file: http://bugs.python.org/file19008/find-caller.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9948 ___

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

2010-09-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: 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

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

2010-09-25 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org 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,

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

2010-09-25 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18760/issue5412.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5412 ___

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

2010-09-25 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl 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

[issue9360] nntplib cleanup

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue9360

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

2010-09-25 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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

[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 neolo...@free.fr 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

[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 pit...@free.fr: -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list

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

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com 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

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

2010-09-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed original suggestion as r85011. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9562

[issue9945] Improper locking in logging

2010-09-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into py3k and release27-maint branches, r85012. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9945

[issue9947] Weird locking in logging config system

2010-09-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into py3k and release27-maint, r85013. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9947

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

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com 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:

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

2010-09-25 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: 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(bx*(100 * 1024**2))

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

2010-09-25 Thread Gösta Huldt
Gösta Huldt ghu...@gmail.com 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.

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

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

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

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com 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 --

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

2010-09-25 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com 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 rep...@bugs.python.org

[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 mar...@v.loewis.de added the comment: Closing, as suggested by neologix -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch compiles fine under Linux, but please don't use tabs for indentation of C files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9910

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

2010-09-25 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com 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. --

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk 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

[issue9951] introduce bytes.hex method

2010-09-25 Thread Arnon Yaari
New submission from Arnon Yaari wiggi...@gmail.com: 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

[issue9910] Add Py_SetPath API for embedding python

2010-09-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com 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 rep...@bugs.python.org

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

2010-09-25 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com 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,

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-25 Thread Kevin Hunter
Kevin Hunter hunt...@earlham.edu 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

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

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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. :-) -- ___

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

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I shall create unit test later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9937 ___