[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-03-01 Thread Vilnis Termanis
Vilnis Termanis added the comment: Hi Meador, I apologise: I really shouldn't have called it a patch. It's just to show one way that I've found fixes the problem (but presumably reduces performance in other cases, hence the suggestion & wait for feedback on the issue). I'm not really experie

[issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates

2010-03-01 Thread Brian Curtin
Brian Curtin added the comment: I've uploaded the patch to http://codereview.appspot.com/223088 -- ___ Python tracker ___ ___ Python-b

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-03-01 Thread Vilnis Termanis
Vilnis Termanis added the comment: Quick though (last one I promise): Maybe put() could have an argument to indicate whether to be thread-blocking (i.e. guaranteeing the object to be sent in its current state) or not. The (current) non-thread-blocking mode will have better performance for the

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-03-01 Thread Vilnis Termanis
Vilnis Termanis added the comment: More notes: - Reason for non-atmoic behaviour is due to queue _feeder thread sending the object after the put() method has already exited. Hence changing the object straight after put() can result in the modified object being sent instead. - Reproduced under

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-03-01 Thread Vilnis Termanis
New submission from Vilnis Termanis : If an object, which as been put() in the multiprocessing.Queue is changed immediately after the put() call then changed version may be added to the queue which I assume is not the expected behaviour: >>> from multiprocessing import Queue >>> q = Queue() >>

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2010-03-01 Thread Phillip J. Eby
Phillip J. Eby added the comment: Will I be able to do what? I have a kludgy test and a patch in my checkout, I was just waiting for word back from you (since Feb 19) on whether that would be ok. -- ___ Python tracker

[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2010-03-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I can't come up with a good way to test this either. :( I'm just going to apply the suggested change and we'll have to test it in 2.6.5 rc 1. PJE, will you be able to do that? -- ___ Python tracker

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: Thanks for the clarification of 'beforehand'--I had understood from your description that this would be some sort of preprocessing step. I agree that the TypeError is a bit much, though I'm biased of course. If you'd like my input on things you come up wit

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: Also, it may be that some of r73858 needs to be reverted; going from accepting non-ints and longs in 2.6 to a TypeError in 2.7 is a bit much; there should have at least been a DeprecationWarning. I need to find some time to look at this properly, and work o

[issue3892] bsddb: test01_basic_replication fails sometimes

2010-03-01 Thread R. David Murray
R. David Murray added the comment: Applied skip patch to trunk in r78558, and 2.6 in 78560. -- status: open -> languishing ___ Python tracker ___

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: More or less, yes: when trying to pack a non-integer `x` (i.e. something that's not an instance of int or long) with an integer format code (one of 'bBhHiIlLqQ', or 'P'), `x.__index__()` would be called to convert `x` to an integer, and that integer would be

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: AFAICS, __index__ would be fine. To make sure I understand your proposed solution correctly: You'd go through the argument list beforehand and cast everything that's not a number type or str to int by means of __index__? -- __

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Mark Dickinson
Mark Dickinson added the comment: I'd be open to re-allowing use of __int__ (and __long__) consistently for all integer packing codes in 2.7, as a temporary measure; I'd really prefer not to allow this for 3.x. What would make more sense, IMO, would be to allow use of the __index__ method (

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-01 Thread Andreas Kloeckner
Andreas Kloeckner added the comment: The fix breaks my package PyCUDA, which relies on handing struct something that can be cast to long. (i.e. not a float, but something representing a memory address on a GPU) Am I out of luck? -- nosy: +inducer

[issue6500] urllib2 maximum recursion depth exceeded

2010-03-01 Thread Jeremy Hylton
Jeremy Hylton added the comment: Ok. I'll take a look, too. Jeremy On Sat, Feb 27, 2010 at 4:30 AM, Ezio Melotti wrote: > > Changes by Ezio Melotti : > > > -- > nosy: +orsenthil > status: pending -> open > > ___ > Python tracker >

[issue5802] The security descriptors of python binaries in Windows are not strict enough

2010-03-01 Thread Brian Curtin
Brian Curtin added the comment: Even if we changed the ACL of the executable, any user could still add malicious code to be executed on import, as the C:\PythonXY directory doesn't require specific privileges for writing to it, and it shouldn't by default. When installed to "C:\Program Files"

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread Vinay Sajip
Vinay Sajip added the comment: Hi Victor, A couple of points: 1. On Windows, you can't rename files which are open, so the strategy of closing after renaming doesn't work. 2. Using the alternative strategy (on failure, open the file with the current mode, else open with 'w') - if the except

[issue7573] Position independent include of Python.h

2010-03-01 Thread instigate_team
instigate_team added the comment: Ok, this can be considered as a future request as Ubuntu 9.10 not so common operating system nowdays. Please note that the error was noticed only on Ubuntu 9.10, where glibc library version is 2.10.1. Python works OK with GNU C library versions less than 2.10

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread STINNER Victor
STINNER Victor added the comment: I forgot something: to avoid trying to file rotation at each log message, the rotation should be disabled at the first error. For RotatingFileHandler, it can be something like: try: ... except: self.maxBytes=0 raise For TimedRotatingFileHandler, a fla

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread STINNER Victor
New submission from STINNER Victor : My server is running as root and is writing logs into /var/log/nucentral.log. I tried to run it under a different user ("nucentral"), and I changed /var/log/nucentral.log file permissions. I'm using: MAX_LOG_FILESIZE = 5 * 1024 * 1024 MAX_LOG_FILES =

[issue7849] Improve "test_support.check_warnings()"

2010-03-01 Thread Florent Xicluna
Florent Xicluna added the comment: > Antoine Pitrou added the comment: > > "lazy" sounds like a bad name for that parameter. It makes me think of lazy > evaluation, not error checking. > "check_warnings(quiet=True)" sounds good? > There's also the problem that check_py3k_warnings() will che