]> granicus.if.org Git - python/log
python
9 years agoIssue #17753: effective_ids unavailable on Windows.
Berker Peksag [Mon, 16 Feb 2015 02:36:18 +0000 (04:36 +0200)]
Issue #17753: effective_ids unavailable on Windows.

9 years agoFix typo in os.supports_effective_ids documentation.
Berker Peksag [Mon, 16 Feb 2015 01:36:10 +0000 (03:36 +0200)]
Fix typo in os.supports_effective_ids documentation.

9 years agoIssue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
Serhiy Storchaka [Sun, 15 Feb 2015 22:30:43 +0000 (00:30 +0200)]
Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
module.  Original patch by Claudiu Popa.

9 years agoIssue #23146: Fix mishandling of absolute Windows paths with forward slashes in pathlib.
Antoine Pitrou [Sun, 15 Feb 2015 17:03:59 +0000 (18:03 +0100)]
Issue #23146: Fix mishandling of absolute Windows paths with forward slashes in pathlib.

Detected and fixed by Serhiy.

9 years agoIssue #19681: Test the repr of partial with more than one keyword argument.
Serhiy Storchaka [Sun, 15 Feb 2015 14:20:47 +0000 (16:20 +0200)]
Issue #19681: Test the repr of partial with more than one keyword argument.

9 years agoUse pickled data compatible with Python 2 for testing protocols 0-2.
Serhiy Storchaka [Sun, 15 Feb 2015 12:10:03 +0000 (14:10 +0200)]
Use pickled data compatible with Python 2 for testing protocols 0-2.

9 years agoMerge heads
Serhiy Storchaka [Sun, 15 Feb 2015 12:02:15 +0000 (14:02 +0200)]
Merge heads

9 years agoUse os.devnull instead of hardcoded '/dev/null'.
Serhiy Storchaka [Sun, 15 Feb 2015 11:58:23 +0000 (13:58 +0200)]
Use os.devnull instead of hardcoded '/dev/null'.

9 years agoIssue #13637: Improve exception message of a2b_* functions.
Berker Peksag [Sat, 14 Feb 2015 22:31:00 +0000 (00:31 +0200)]
Issue #13637: Improve exception message of a2b_* functions.

Patch by Vajrasky Kok.

9 years agoIssue #13637: Remove outdated versionchanged directives.
Berker Peksag [Sat, 14 Feb 2015 22:05:42 +0000 (00:05 +0200)]
Issue #13637: Remove outdated versionchanged directives.

Patch by Martin Panter.

9 years agoIssue #17753: Skip test_zipfile tests which require write access to test
Serhiy Storchaka [Sat, 14 Feb 2015 21:04:35 +0000 (23:04 +0200)]
Issue #17753: Skip test_zipfile tests which require write access to test
and email.test.

9 years agoIssue #22844: Fized test_gdb failure on Debian Wheezy for Z.
Serhiy Storchaka [Sat, 14 Feb 2015 20:44:35 +0000 (22:44 +0200)]
Issue #22844: Fized test_gdb failure on Debian Wheezy for Z.
Patch by David Edelsohn.

9 years agoavoid reading unallocated memory when argc == 0 (closes #22633)
Benjamin Peterson [Sat, 14 Feb 2015 20:16:32 +0000 (15:16 -0500)]
avoid reading unallocated memory when argc == 0 (closes #22633)

9 years agoIssue #23418: Add missing entries to http.server.__all__.
Berker Peksag [Fri, 13 Feb 2015 18:48:15 +0000 (20:48 +0200)]
Issue #23418: Add missing entries to http.server.__all__.

Patch by Martin Panter.

9 years agoIssue #21849: Ported from 2.7 tests for non-ASCII data.
Serhiy Storchaka [Fri, 13 Feb 2015 13:13:33 +0000 (15:13 +0200)]
Issue #21849: Ported from 2.7 tests for non-ASCII data.

9 years agoasyncio doc: annotate coroutine on coroutine functions and methods
Victor Stinner [Thu, 12 Feb 2015 21:49:18 +0000 (22:49 +0100)]
asyncio doc: annotate coroutine on coroutine functions and methods

9 years agoIssue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting...
Antoine Pitrou [Wed, 11 Feb 2015 18:39:16 +0000 (19:39 +0100)]
Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.

9 years agoFix typo: PyMem_Alloc => PyMem_Malloc
Victor Stinner [Wed, 11 Feb 2015 17:17:56 +0000 (18:17 +0100)]
Fix typo: PyMem_Alloc => PyMem_Malloc

9 years agoIssue #23433: Fix faulthandler._stack_overflow()
Victor Stinner [Wed, 11 Feb 2015 13:23:35 +0000 (14:23 +0100)]
Issue #23433: Fix faulthandler._stack_overflow()

Fix undefined behaviour: don't compare pointers. Use Py_uintptr_t type instead
of void*. It fixes test_faulthandler on Fedora 22 which now uses GCC 5.

9 years agoasyncio: BaseSubprocessTransport.close() doesn't try to kill the process if it
Victor Stinner [Tue, 10 Feb 2015 13:49:32 +0000 (14:49 +0100)]
asyncio: BaseSubprocessTransport.close() doesn't try to kill the process if it
already finished

9 years agoIssue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h.
Serhiy Storchaka [Tue, 10 Feb 2015 06:45:53 +0000 (08:45 +0200)]
Issue #23421: Fixed compression in tarfile CLI.  Patch by wdv4758h.

9 years agomerge 3.3 (#23361)
Benjamin Peterson [Tue, 10 Feb 2015 01:58:52 +0000 (20:58 -0500)]
merge 3.3 (#23361)

9 years agoadd overflow checking (closes #23361)
Benjamin Peterson [Tue, 10 Feb 2015 01:58:12 +0000 (20:58 -0500)]
add overflow checking (closes #23361)

9 years agoAmend b8ebf381390f: find patchlevel.py in extensions.
Martin v. Löwis [Mon, 9 Feb 2015 07:07:12 +0000 (08:07 +0100)]
Amend b8ebf381390f: find patchlevel.py in extensions.

9 years agoIssue #17896: Update msi.py to new externals dir.
Martin v. Löwis [Mon, 9 Feb 2015 06:51:32 +0000 (07:51 +0100)]
Issue #17896: Update msi.py to new externals dir.

9 years agoPost-release updates for Python 3.4.3rc1.
Larry Hastings [Sun, 8 Feb 2015 22:04:36 +0000 (14:04 -0800)]
Post-release updates for Python 3.4.3rc1.

9 years agoAdded tag v3.4.3rc1 for changeset 69dd528ca625
Larry Hastings [Sun, 8 Feb 2015 00:04:55 +0000 (16:04 -0800)]
Added tag v3.4.3rc1 for changeset 69dd528ca625

9 years agoFix a copyright notice that still said 2014. v3.4.3rc1
Larry Hastings [Sun, 8 Feb 2015 00:04:22 +0000 (16:04 -0800)]
Fix a copyright notice that still said 2014.

9 years agoVersion bump for 3.4.3rc1.
Larry Hastings [Sun, 8 Feb 2015 00:00:45 +0000 (16:00 -0800)]
Version bump for 3.4.3rc1.

9 years agoUpdated pydoc topics data for 3.4.3rc1 release.
Larry Hastings [Sat, 7 Feb 2015 23:55:23 +0000 (15:55 -0800)]
Updated pydoc topics data for 3.4.3rc1 release.

9 years agoCorrected typo.
Vinay Sajip [Sat, 7 Feb 2015 10:56:06 +0000 (10:56 +0000)]
Corrected typo.

9 years agoMinor change to documentation on creating venvs.
Vinay Sajip [Sat, 7 Feb 2015 10:52:02 +0000 (10:52 +0000)]
Minor change to documentation on creating venvs.

9 years agoIssue #23399: pyvenv creates relative symlinks where possible.
Barry Warsaw [Fri, 6 Feb 2015 17:00:04 +0000 (12:00 -0500)]
Issue #23399: pyvenv creates relative symlinks where possible.

9 years agoFix definition mismatch for type_is_subtype_base_chain.
Steve Dower [Fri, 6 Feb 2015 16:50:23 +0000 (08:50 -0800)]
Fix definition mismatch for type_is_subtype_base_chain.

9 years agoIssue #23399: pyvenv creates relative symlinks where possible.
Barry Warsaw [Fri, 6 Feb 2015 16:23:58 +0000 (11:23 -0500)]
Issue #23399: pyvenv creates relative symlinks where possible.

9 years agoIssue #23392: Added tests for marshal C API that works with FILE*.
Serhiy Storchaka [Fri, 6 Feb 2015 06:58:56 +0000 (08:58 +0200)]
Issue #23392: Added tests for marshal C API that works with FILE*.

9 years agoIssue #23881: Only use entry-values with gdb 7.4 in tests.
Serhiy Storchaka [Fri, 6 Feb 2015 06:35:20 +0000 (08:35 +0200)]
Issue #23881: Only use entry-values with gdb 7.4 in tests.
Fixes a regression in issue #22765.  Patch by Vinson Lee.

9 years agoFix missing :ref: for idle in doc build.
Ned Deily [Fri, 6 Feb 2015 04:42:06 +0000 (15:42 +1100)]
Fix missing :ref: for idle in doc build.

9 years agofix many custom mro() edge cases and improve code quality (#22735)
Benjamin Peterson [Fri, 6 Feb 2015 03:29:14 +0000 (22:29 -0500)]
fix many custom mro() edge cases and improve code quality (#22735)

Patch by Eldar Abusalimov.

9 years agoIssue #23212: Update OS X installer build OpenSSL to 1.0.1l.
Ned Deily [Fri, 6 Feb 2015 03:13:30 +0000 (14:13 +1100)]
Issue #23212: Update OS X installer build OpenSSL to 1.0.1l.
(currently only used for builds with <= 10.5 deployment targets)

9 years agotest_multiprocessing: tolerate a delta of 30 ms because of bad clock resolution
Victor Stinner [Thu, 5 Feb 2015 13:25:05 +0000 (14:25 +0100)]
test_multiprocessing: tolerate a delta of 30 ms because of bad clock resolution
on Windows

9 years agoIssue #18982: Add tests for CLI of the calendar module.
Serhiy Storchaka [Thu, 5 Feb 2015 13:14:35 +0000 (15:14 +0200)]
Issue #18982: Add tests for CLI of the calendar module.

9 years agoasyncio: BaseEventLoop: rename _owner to _thread_id
Victor Stinner [Thu, 5 Feb 2015 10:45:33 +0000 (11:45 +0100)]
asyncio: BaseEventLoop: rename _owner to _thread_id

9 years agoIssue #23345: Prevent test_ssl failures with large OpenSSL patch level
Ned Deily [Thu, 5 Feb 2015 06:20:13 +0000 (17:20 +1100)]
Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
values (like 0.9.8zc).

9 years agoUpdate pip to 6.0.8
Donald Stufft [Thu, 5 Feb 2015 03:00:17 +0000 (22:00 -0500)]
Update pip to 6.0.8

9 years agoMake the stdlib test suite helper test.script_helper._assert_python no longer
Gregory P. Smith [Thu, 5 Feb 2015 01:10:19 +0000 (17:10 -0800)]
Make the stdlib test suite helper test.script_helper._assert_python no longer
pass -I or -E to the child process by default when the environment is required
for the child process interpreter to function properly.

9 years agoasyncio doc: explain how to display ResourceWarning in the debug mode section
Victor Stinner [Wed, 4 Feb 2015 15:14:33 +0000 (16:14 +0100)]
asyncio doc: explain how to display ResourceWarning in the debug mode section

9 years agoasyncio: Only call _check_resolved_address() in debug mode
Victor Stinner [Wed, 4 Feb 2015 13:51:23 +0000 (14:51 +0100)]
asyncio: Only call _check_resolved_address() in debug mode

* _check_resolved_address() is implemented with getaddrinfo() which is slow
* If available, use socket.inet_pton() instead of socket.getaddrinfo(), because
  it is much faster

Microbenchmark (timeit) on Fedora 21 (Python 3.4, Linux 3.17, glibc 2.20) to
validate the IPV4 address "127.0.0.1" or the IPv6 address "::1":

* getaddrinfo() 10.4 usec per loop
* inet_pton(): 0.285 usec per loop

On glibc older than 2.14, getaddrinfo() always requests the list of all local
IP addresses to the kernel (using a NETLINK socket). getaddrinfo() has other
known issues, it's better to avoid it when it is possible.

9 years agoasyncio: BaseSelectorEventLoop uses directly the private _debug attribute
Victor Stinner [Wed, 4 Feb 2015 13:50:59 +0000 (14:50 +0100)]
asyncio: BaseSelectorEventLoop uses directly the private _debug attribute

Just try to be consistent: _debug was already used in some places, and always
used in BaseProactorEventLoop.

9 years agoFixes issue23390: make profile-opt causes -fprofile-generate and related flags
Gregory P. Smith [Wed, 4 Feb 2015 10:11:56 +0000 (02:11 -0800)]
Fixes issue23390: make profile-opt causes -fprofile-generate and related flags
to end up in distutils CFLAGS.

9 years agoSkip some tests that require a subinterpreter launched with -E or -I when the
Gregory P. Smith [Wed, 4 Feb 2015 08:59:40 +0000 (00:59 -0800)]
Skip some tests that require a subinterpreter launched with -E or -I when the
interpreter under test is being run in an environment that requires the use of
environment variables such as PYTHONHOME in order to function at all.

Adds a private test.script_helper._interpreter_requires_environment() function
to be used with @unittest.skipIf on stdlib test methods requiring this.

9 years agoasyncio, Tulip issue 221: Fix doc of QueueEmpty and QueueFull
Victor Stinner [Tue, 3 Feb 2015 14:09:24 +0000 (15:09 +0100)]
asyncio, Tulip issue 221: Fix doc of QueueEmpty and QueueFull

9 years agoIssue #23358: Add missing BaseServer entry to socketserver.__all__.
Berker Peksag [Tue, 3 Feb 2015 09:55:09 +0000 (11:55 +0200)]
Issue #23358: Add missing BaseServer entry to socketserver.__all__.

Patch by Martin Panter.

9 years agoIssue #23099: Closing io.BytesIO with exported buffer is rejected now to
Serhiy Storchaka [Tue, 3 Feb 2015 00:00:18 +0000 (02:00 +0200)]
Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.

9 years agoIssues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
Serhiy Storchaka [Mon, 2 Feb 2015 23:35:10 +0000 (01:35 +0200)]
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
Used PyMem_New to check overflow.

9 years agoIssues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
Serhiy Storchaka [Mon, 2 Feb 2015 23:34:09 +0000 (01:34 +0200)]
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
Used PyMem_New to check overflow.

9 years agoIssue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
Serhiy Storchaka [Mon, 2 Feb 2015 23:21:08 +0000 (01:21 +0200)]
Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().

9 years agomerge 3.3
Benjamin Peterson [Mon, 2 Feb 2015 22:47:26 +0000 (17:47 -0500)]
merge 3.3

9 years agoreduce memory usage of test (closes #23369)
Benjamin Peterson [Mon, 2 Feb 2015 22:47:07 +0000 (17:47 -0500)]
reduce memory usage of test (closes #23369)

9 years agoadjust for py3k module renaming
Benjamin Peterson [Mon, 2 Feb 2015 19:22:13 +0000 (14:22 -0500)]
adjust for py3k module renaming

9 years ago_clear_type_cache is cpython-only
Benjamin Peterson [Mon, 2 Feb 2015 19:06:11 +0000 (14:06 -0500)]
_clear_type_cache is cpython-only

9 years agoIssue #23353, asyncio: Workaround CPython bug #23353
Victor Stinner [Mon, 2 Feb 2015 17:36:31 +0000 (18:36 +0100)]
Issue #23353, asyncio: Workaround CPython bug #23353

Don't use yield/yield-from in an except block of a generator. Store the
exception and handle it outside the except block.

9 years agorevert lineno and col_offset changes from #16795 (closes #21295)
Benjamin Peterson [Mon, 2 Feb 2015 15:51:20 +0000 (10:51 -0500)]
revert lineno and col_offset changes from #16795 (closes #21295)

9 years agomerge 3.3 (#23364, #23363)
Benjamin Peterson [Mon, 2 Feb 2015 02:35:34 +0000 (21:35 -0500)]
merge 3.3 (#23364, #23363)

9 years agocheck for overflows in permutations() and product() (closes #23363, closes #23364)
Benjamin Peterson [Mon, 2 Feb 2015 02:34:07 +0000 (21:34 -0500)]
check for overflows in permutations() and product() (closes #23363, closes #23364)

9 years agomerge 3.3 (#23365)
Benjamin Peterson [Mon, 2 Feb 2015 02:11:39 +0000 (21:11 -0500)]
merge 3.3 (#23365)

9 years agocheck for overflow in combinations_with_replacement (closes #23365)
Benjamin Peterson [Mon, 2 Feb 2015 02:10:47 +0000 (21:10 -0500)]
check for overflow in combinations_with_replacement (closes #23365)

9 years agomerge 3.3 (#23366)
Benjamin Peterson [Mon, 2 Feb 2015 02:00:15 +0000 (21:00 -0500)]
merge 3.3 (#23366)

9 years agodetect overflow in combinations (closes #23366)
Benjamin Peterson [Mon, 2 Feb 2015 01:59:00 +0000 (20:59 -0500)]
detect overflow in combinations (closes #23366)

9 years agohttps goodness
Benjamin Peterson [Mon, 2 Feb 2015 01:17:22 +0000 (20:17 -0500)]
https goodness

9 years agofix tests on systems that can't validate python.org
Benjamin Peterson [Mon, 2 Feb 2015 01:16:59 +0000 (20:16 -0500)]
fix tests on systems that can't validate python.org

9 years agomerge 3.3
Benjamin Peterson [Sun, 1 Feb 2015 23:02:15 +0000 (18:02 -0500)]
merge 3.3

9 years agoremove extra ws
Benjamin Peterson [Sun, 1 Feb 2015 23:02:09 +0000 (18:02 -0500)]
remove extra ws

9 years agomerge 3.3 (#23369)
Benjamin Peterson [Sun, 1 Feb 2015 22:59:49 +0000 (17:59 -0500)]
merge 3.3 (#23369)

9 years agofix possible overflow in encode_basestring_ascii (closes #23369)
Benjamin Peterson [Sun, 1 Feb 2015 22:53:53 +0000 (17:53 -0500)]
fix possible overflow in encode_basestring_ascii (closes #23369)

9 years agoWhitespace.
Stefan Krah [Sun, 1 Feb 2015 18:46:31 +0000 (19:46 +0100)]
Whitespace.

9 years agoIssue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets
Stefan Krah [Sun, 1 Feb 2015 18:42:12 +0000 (19:42 +0100)]
Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets
are required.

9 years agoIssue #23370: Fix off-by-one error for non-contiguous buffers.
Stefan Krah [Sun, 1 Feb 2015 15:19:23 +0000 (16:19 +0100)]
Issue #23370: Fix off-by-one error for non-contiguous buffers.

9 years agoAdded a cookbook entry on logging audible messages.
Vinay Sajip [Sun, 1 Feb 2015 15:17:34 +0000 (15:17 +0000)]
Added a cookbook entry on logging audible messages.

9 years agoIssue #23212: Update Windows copy of OpenSSL to 1.0.1l
Steve Dower [Sat, 31 Jan 2015 20:19:10 +0000 (12:19 -0800)]
Issue #23212: Update Windows copy of OpenSSL to 1.0.1l

9 years agoIssue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx().
Victor Stinner [Sat, 31 Jan 2015 09:29:47 +0000 (10:29 +0100)]
Issue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx().
At entry, save or swap the exception state even if PyEval_EvalFrameEx() is
called with throwflag=0. At exit, the exception state is now always restored or
swapped, not only if why is WHY_YIELD or WHY_RETURN. Patch co-written with
Antoine Pitrou.

9 years agoIssue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Serhiy Storchaka [Sat, 31 Jan 2015 09:48:52 +0000 (11:48 +0200)]
Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.

9 years agoFix asyncio doc typo.
R David Murray [Fri, 30 Jan 2015 00:53:33 +0000 (19:53 -0500)]
Fix asyncio doc typo.

9 years agoasyncio doc: document the new ResourceWarning warnings
Victor Stinner [Fri, 30 Jan 2015 00:35:14 +0000 (01:35 +0100)]
asyncio doc: document the new ResourceWarning warnings

9 years agoIssue #23347, asyncio: send_signal(), terminate(), kill() don't check if the
Victor Stinner [Fri, 30 Jan 2015 00:20:44 +0000 (01:20 +0100)]
Issue #23347, asyncio: send_signal(), terminate(), kill() don't check if the
transport was closed. The check broken a Tulip example and this limitation is
arbitrary. Check if _proc is None should be enough.

Enhance also close(): do nothing when called the second time.

9 years agoasyncio doc: add a section about task cancellation
Victor Stinner [Thu, 29 Jan 2015 23:55:58 +0000 (00:55 +0100)]
asyncio doc: add a section about task cancellation

9 years agoIssue #21962, asyncio doc: Suggest the usage of wait_for() to replace
Victor Stinner [Thu, 29 Jan 2015 23:37:04 +0000 (00:37 +0100)]
Issue #21962, asyncio doc: Suggest the usage of wait_for() to replace
the lack of timeout parameter for locks and queues.

9 years agoIssue #23347, asyncio: Make BaseSubprocessTransport.wait() private
Victor Stinner [Thu, 29 Jan 2015 23:16:14 +0000 (00:16 +0100)]
Issue #23347, asyncio: Make BaseSubprocessTransport.wait() private

9 years agoasyncio: Fix ResourceWarning in test_subprocess.test_proc_exit()
Victor Stinner [Thu, 29 Jan 2015 23:11:42 +0000 (00:11 +0100)]
asyncio: Fix ResourceWarning in test_subprocess.test_proc_exit()

9 years agoasyncio: sync with Tulip
Victor Stinner [Thu, 29 Jan 2015 23:05:19 +0000 (00:05 +0100)]
asyncio: sync with Tulip

Issue #23347: send_signal(), kill() and terminate() methods of
BaseSubprocessTransport now check if the transport was closed and if the
process exited.

Issue #23347: Refactor creation of subprocess transports. Changes on
BaseSubprocessTransport:

* Add a wait() method to wait until the child process exit
* The constructor now accepts an optional waiter parameter. The _post_init()
  coroutine must not be called explicitly anymore. It makes subprocess
  transports closer to other transports, and it gives more freedom if we want
  later to change completly how subprocess transports are created.
* close() now kills the process instead of kindly terminate it: the child
  process may ignore SIGTERM and continue to run. Call explicitly terminate()
  and wait() if you want to kindly terminate the child process.
* close() now logs a warning in debug mode if the process is still running and
  needs to be killed
* _make_subprocess_transport() is now fully asynchronous again: if the creation
  of the transport failed, wait asynchronously for the process eixt. Before the
  wait was synchronous. This change requires close() to *kill*, and not
  terminate, the child process.
* Remove the _kill_wait() method, replaced with a more agressive close()
  method. It fixes _make_subprocess_transport() on error.
  BaseSubprocessTransport.close() calls the close() method of pipe transports,
  whereas _kill_wait() closed directly pipes of the subprocess.Popen object
  without unregistering file descriptors from the selector (which caused severe
  bugs).

These changes simplifies the code of subprocess.py.

9 years agoIssue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport
Victor Stinner [Thu, 29 Jan 2015 16:50:58 +0000 (17:50 +0100)]
Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport
is not explicitly closed. Close also explicitly transports in test_sslproto.

9 years agoIssue #22668: Remove endianness assumption in test.
Stefan Krah [Thu, 29 Jan 2015 16:33:31 +0000 (17:33 +0100)]
Issue #22668: Remove endianness assumption in test.

9 years agoIssue #22668: Ensure that format strings survive slicing after casting.
Stefan Krah [Thu, 29 Jan 2015 13:27:23 +0000 (14:27 +0100)]
Issue #22668: Ensure that format strings survive slicing after casting.

9 years agoasyncio: sync with Tulip
Victor Stinner [Thu, 29 Jan 2015 13:15:19 +0000 (14:15 +0100)]
asyncio: sync with Tulip

* Cleanup gather(): use cancelled() method instead of using private Future
  attribute
* Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading
  when connection_made() has been called.
* Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the
  transport on error. In debug mode, log errors using call_exception_handler()

9 years agoasyncio doc: document Protocol state machine
Victor Stinner [Thu, 29 Jan 2015 12:33:15 +0000 (13:33 +0100)]
asyncio doc: document Protocol state machine

9 years agoasyncio: sync with Tulip
Victor Stinner [Thu, 29 Jan 2015 01:56:05 +0000 (02:56 +0100)]
asyncio: sync with Tulip

* _SelectorTransport constructor: extra parameter is now optional
* Fix _SelectorDatagramTransport constructor. Only start reading after
  connection_made() has been called.
* Fix _SelectorSslTransport.close(). Don't call protocol.connection_lost() if
  protocol.connection_made() was not called yet: if the SSL handshake failed or
  is still in progress. The close() method can be called if the creation of the
  connection is cancelled, by a timeout for example.

9 years agoasyncio: BaseSubprocessTransport._kill_wait() now also call close()
Victor Stinner [Thu, 29 Jan 2015 01:14:30 +0000 (02:14 +0100)]
asyncio: BaseSubprocessTransport._kill_wait() now also call close()

close() closes pipes, which is not None yet by _kill_wait().

9 years agoAlways #define _PyLong_FromDev as we always need it to compile rather than
Gregory P. Smith [Thu, 29 Jan 2015 00:07:52 +0000 (16:07 -0800)]
Always #define _PyLong_FromDev as we always need it to compile rather than
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.

This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)

9 years agoasyncio: Fix _SelectorSocketTransport constructor
Victor Stinner [Wed, 28 Jan 2015 23:36:51 +0000 (00:36 +0100)]
asyncio: Fix _SelectorSocketTransport constructor

Only start reading when connection_made() has been called:
protocol.data_received() must not be called before protocol.connection_made().

9 years agoasyncio: SSL transports now clear their reference to the waiter
Victor Stinner [Wed, 28 Jan 2015 23:36:35 +0000 (00:36 +0100)]
asyncio: SSL transports now clear their reference to the waiter

* Rephrase also the comment explaining why the waiter is not awaken immediatly.
* SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
  directly, it will be done by Future.set_exception(). The exception is not
  used if the waiter was cancelled or if there is no waiter.