Re: [Python-Dev] Windows build - fixing compile warnings before VS2010

2012-02-22 Thread shibturn

On 22/02/2012 3:32am, Brian Curtin wrote:

1. Is anyone opposed to moving up to Level 4 warnings?


At that level I think it complains about common things like the "do 
{...} while (0)" idiom, and the unreferenced self parameter of builtin 
functions.


Presumably you would have to disable those specific warnings and any 
other overly annoying ones?


sbt

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] cpython: Make AcquirerProxy.acquire() support timeout argument

2012-05-06 Thread shibturn

On 06/05/2012 5:07pm, Antoine Pitrou wrote:

On Sun, 06 May 2012 17:56:55 +0200

summary:
   Make AcquirerProxy.acquire() support timeout argument


Should it have a Misc/NEWS entry? (and a doc addition perhaps?)


Since proxies for locks/semaphores are supposed to work the same way as 
the proxied object from threading, one could argue that the lack of 
support in 3.2 was a bug.


I notice now that multiprocessing.*.acquire() and threading.*.wait() 
treat negative timeouts as zero timeouts.  On the other hand, 
threading.*.acquire() treat negative timeouts as infinite.


Maybe these inconsistencies should be documented or eliminated?

As currently implemented AcquirerProxy.acquire() treats negative 
timeouts as infinite.


Cheers

Richard

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: Fix potential NameError in multiprocessing.Condition.wait()

2012-06-05 Thread shibturn

On 05/06/2012 6:59am, Eli Bendersky wrote:

Can you add a testcase for this?
...


OK.

BTW, I should have written UnboundLocalError not NameError:

>>> import multiprocessing as mp
[81047 refs]
>>> c = mp.Condition()
[88148 refs]
>>> with mp.Condition() as c: c.wait()
...

Traceback (most recent call last):
  File "C:\Repos\cpython-dirty\lib\multiprocessing\synchronize.py", 
line 219, in wait

ret = self._wait_semaphore.acquire(True, timeout)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Repos\cpython-dirty\lib\multiprocessing\synchronize.py", 
line 227, in wait

return ret
UnboundLocalError: local variable 'ret' referenced before assignment
[88218 refs]

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com