- 01 Sep, 2014 4 commits
-
-
Berker Peksag authored
-
Berker Peksag authored
-
Ned Deily authored
-
Ned Deily authored
Original patch by Josh Lynn.
-
- 31 Aug, 2014 15 commits
-
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Benjamin Peterson authored
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Jason R. Coombs authored
-
Victor Stinner authored
BaseSelectorEventLoop.sock_connect() There is a race condition in create_connection() used with wait_for() to have a timeout. sock_connect() registers the file descriptor of the socket to be notified of write event (if connect() raises BlockingIOError). When create_connection() is cancelled with a TimeoutError, sock_connect() coroutine gets the exception, but it doesn't unregister the file descriptor for write event. create_connection() gets the TimeoutError and closes the socket. If you call again create_connection(), the new socket will likely gets the same file descriptor, which is still registered in the selector. When sock_connect() calls add_writer(), it tries to modify the entry instead of creating a new one. This issue was originally reported in the Trollius project, but the bug comes from Tulip in fact (Trollius is based on Tulip): https://bitbucket.org/enovance/trollius/issue/15/after-timeouterror-on-wait_for This change fixes the race condition. It also makes sock_connect() more reliable (and portable) is sock.connect() raises an InterruptedError.
-
Victor Stinner authored
There is a race condition in create_connection() used with wait_for() to have a timeout. sock_connect() registers the file descriptor of the socket to be notified of write event (if connect() raises BlockingIOError). When create_connection() is cancelled with a TimeoutError, sock_connect() coroutine gets the exception, but it doesn't unregister the file descriptor for write event. create_connection() gets the TimeoutError and closes the socket. If you call again create_connection(), the new socket will likely gets the same file descriptor, which is still registered in the selector. When sock_connect() calls add_writer(), it tries to modify the entry instead of creating a new one. This issue was originally reported in the Trollius project, but the bug comes from Tulip in fact (Trollius is based on Tulip): https://bitbucket.org/enovance/trollius/issue/15/after-timeouterror-on-wait_for This change fixes the race condition. It also makes sock_connect() more reliable (and portable) is sock.connect() raises an InterruptedError.
-
Victor Stinner authored
-
Victor Stinner authored
-
Benjamin Peterson authored
-
Benjamin Peterson authored
-
- 30 Aug, 2014 2 commits
-
-
R David Murray authored
-
R David Murray authored
Without this reset, starttls would fail if a connect/starttls was done after a quit, because smtplib assumed the existing value of emspt_features was accurate, but it gets reset when starttls completes (and the new value does not contain the starttls capability, since tls is already started at that point). (There may be additional places where this lack of reset was an issue as well.) Patch by Milan Oberkirch.
-
- 29 Aug, 2014 9 commits
-
-
Antoine Pitrou authored
Issue #22098: ctypes' BigEndianStructure and LittleEndianStructure now define an empty __slots__ so that subclasses don't always get an instance dict. Patch by Claudiu Popa.
-
Antoine Pitrou authored
Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait() caused by mutation of the waiters queue without holding the lock. Patch by Doug Zongker.
-
Antoine Pitrou authored
Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait() caused by mutation of the waiters queue without holding the lock. Patch by Doug Zongker.
-
Victor Stinner authored
available (unlikely)
-
Victor Stinner authored
QueryPerformanceFrequency() cannot fail on Windows XP and later according to its documentation: raise an exception on error and drop the fallback to the system clock.
-
Victor Stinner authored
Other changes: * The whole _PyTime API is private (not defined if Py_LIMITED_API is set) * _PyTime_gettimeofday_info() also returns -1 on error * Simplify PyTime_gettimeofday(): only use clock_gettime(CLOCK_REALTIME) or gettimeofday() on UNIX. Don't fallback to ftime() or time() anymore.
-
Victor Stinner authored
clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now depends on the librt library on Solaris and on Linux (only with glibc older than 2.17).
-
Berker Peksag authored
Patch by Claudiu Popa.
-
Berker Peksag authored
Patch by Claudiu Popa.
-
- 28 Aug, 2014 2 commits
-
-
Victor Stinner authored
Don't raise a TimeoutError if we reached the timeout and the future completed in the same iteration of the event loop. A side effect of the bug is that Queue.get() looses items.
-
Victor Stinner authored
Don't raise a TimeoutError if we reached the timeout and the future completed in the same iteration of the event loop. A side effect of the bug is that Queue.get() looses items.
-
- 27 Aug, 2014 8 commits
-
-
Gregory P. Smith authored
than a potentially risky preexec_fn=os.setsid call.
-
Gregory P. Smith authored
than a potentially risky preexec_fn=os.setsid call.
-
Victor Stinner authored
-
Victor Stinner authored
descriptor is in blocking mode.
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
Since a new demo can now be loaded while one is running, adjust loadfile to do the same cleanup as stopIt.
-