]> granicus.if.org Git - python/log
python
7 years agoUpdates PCBuild/readme.txt (#3418)
Steve Dower [Fri, 8 Sep 2017 03:10:29 +0000 (20:10 -0700)]
Updates PCBuild/readme.txt (#3418)

7 years agobpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (#1363)
Christian Heimes [Fri, 8 Sep 2017 01:07:00 +0000 (18:07 -0700)]
bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (#1363)

* bpo-29136: Add TLS 1.3 support

TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3
cipher suites don't overlap with cipher suites from TLS 1.2 and earlier.
Since Python sets its own set of permitted ciphers, TLS 1.3 handshake
will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common
AES-GCM and ChaCha20 suites.

Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with
OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3
now.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agooptimize all_name_chars (#3442)
Benjamin Peterson [Fri, 8 Sep 2017 01:06:23 +0000 (18:06 -0700)]
optimize all_name_chars (#3442)

Remove redundant PyUnicode_Check call. Use a static table for checking chars.

7 years agobpo-31036: Allow sphinx and blurb to be found automatically (#3440)
Ned Deily [Fri, 8 Sep 2017 00:17:53 +0000 (17:17 -0700)]
bpo-31036: Allow sphinx and blurb to be found automatically (#3440)

Rather than requiring the path to blurb and/or sphinx-build to be specified to the make rule, enhance the Doc/Makefile to look for each first in a virtual environment created by make venv and, if not found, look on the normal process PATH. This allows the Doc/Makefile to take advantage of an installed spinx-build or blurb and, thus, do the right thing most of the time. Also, make the directory for the venv be configurable and document the `make venv` target.

7 years agobpo-31344: Per-frame control of trace events (GH-3417)
Nick Coghlan [Fri, 8 Sep 2017 00:14:16 +0000 (10:14 +1000)]
bpo-31344: Per-frame control of trace events (GH-3417)

f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events

These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.

7 years agobpo-22635: Update the getstatusoutput docstring. (#3435)
Gregory P. Smith [Thu, 7 Sep 2017 23:11:02 +0000 (16:11 -0700)]
bpo-22635: Update the getstatusoutput docstring. (#3435)

To match the documentation updates already made.
Also renames the local variable used within to match
what it actually holds.

7 years agobpo-27340: Use memoryview in SSLSocket.sendall() (#3384)
Christian Heimes [Thu, 7 Sep 2017 21:18:21 +0000 (14:18 -0700)]
bpo-27340: Use memoryview in SSLSocket.sendall() (#3384)

* bpo-27340: Use memoryview in SSLSocket.sendall()

SSLSocket.sendall() now uses memoryview to create slices of data. This fix
support for all bytes-like object. It is also more efficient and avoids
costly copies.

Signed-off-by: Christian Heimes <christian@python.org>
* Cast view to bytes, fix typo

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-28958: Improve SSLContext error reporting. (#3414)
Christian Heimes [Thu, 7 Sep 2017 21:14:00 +0000 (14:14 -0700)]
bpo-28958: Improve SSLContext error reporting. (#3414)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-31270: Modification of Pr 3200 (#3427)
Raymond Hettinger [Thu, 7 Sep 2017 21:01:44 +0000 (14:01 -0700)]
bpo-31270: Modification of Pr 3200 (#3427)

* bpo-31270: Simplify documentation of itertools.zip_longest

* Use repeat(). Track num_active.

7 years agoUpdate copyright PSF to 2001-2017 (#3421)
Christian Heimes [Thu, 7 Sep 2017 20:59:13 +0000 (13:59 -0700)]
Update copyright PSF to 2001-2017 (#3421)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (#3229)
Pablo Galindo [Thu, 7 Sep 2017 20:53:13 +0000 (21:53 +0100)]
bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (#3229)

* Fix ZeroMQSocketListener and ZeroMQSocketHandler examples

* Use send_json and recv_json to simplify pyzmq interfacing

* Add News entry

7 years agobpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (#3272)
Elena Oat [Thu, 7 Sep 2017 20:06:45 +0000 (23:06 +0300)]
bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (#3272)

Also provide a solution if the user wants to keep multiple blank lines.

7 years agobpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)
Steve Dower [Thu, 7 Sep 2017 18:49:23 +0000 (11:49 -0700)]
bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632)

7 years agobpo-31373: fix undefined floating-point demotions (#3396)
Benjamin Peterson [Thu, 7 Sep 2017 18:13:59 +0000 (11:13 -0700)]
bpo-31373: fix undefined floating-point demotions (#3396)

7 years agoremove current_filename optimization from marshal (#3423) (closes bpo-31384)
Benjamin Peterson [Thu, 7 Sep 2017 17:49:12 +0000 (10:49 -0700)]
remove current_filename optimization from marshal (#3423) (closes bpo-31384)

7 years agobpo-31370: Remove support for threads-less builds (#3385)
Antoine Pitrou [Thu, 7 Sep 2017 16:56:24 +0000 (18:56 +0200)]
bpo-31370: Remove support for threads-less builds (#3385)

* Remove Setup.config
* Always define WITH_THREAD for compatibility.

7 years agoAdd props file for nuget packages (#3410)
Steve Dower [Thu, 7 Sep 2017 02:29:10 +0000 (19:29 -0700)]
Add props file for nuget packages (#3410)

7 years agoUpdate multissl test helper (#3349)
Christian Heimes [Thu, 7 Sep 2017 01:59:22 +0000 (18:59 -0700)]
Update multissl test helper (#3349)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoAvoid UB in test selection macro. (#3407)
Devin Jeanpierre [Thu, 7 Sep 2017 01:00:47 +0000 (18:00 -0700)]
Avoid UB in test selection macro. (#3407)

This fixes the gcc "warning: this use of "defined" may not be portable [-Wexpansion-to-defined]"

See discussion in http://bugs.python.org/issue29505

7 years agobpo-22635: subprocess.getstatusoutput doc update. (#3398)
Gregory P. Smith [Thu, 7 Sep 2017 00:39:23 +0000 (17:39 -0700)]
bpo-22635: subprocess.getstatusoutput doc update. (#3398)

The `subprocess.getstatusoutput` API was inadvertently changed
in Python 3.3.4.  Document the change, it is too late to undo the
API change now as it has shipped in many stable releases.

7 years agobpo-31358: Pull zlib out of the repository (GH-3375)
Zachary Ware [Thu, 7 Sep 2017 00:29:37 +0000 (17:29 -0700)]
bpo-31358: Pull zlib out of the repository (GH-3375)

Also enable building externals by default on Windows, use PCbuild\build.bat's -E option to disable it.

7 years agobpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800)
Łukasz Langa [Thu, 7 Sep 2017 00:27:58 +0000 (17:27 -0700)]
bpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800)

For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.

7 years agoCreate PULL_REQUEST_TEMPLATE.md (GH-3404)
Mariatta [Thu, 7 Sep 2017 00:27:05 +0000 (17:27 -0700)]
Create PULL_REQUEST_TEMPLATE.md (GH-3404)

Explain that backport PR should include branch name and the original PR number.

7 years agobpo-14191 Add parse_intermixed_args. (#3319)
R. David Murray [Thu, 7 Sep 2017 00:25:40 +0000 (20:25 -0400)]
bpo-14191 Add parse_intermixed_args. (#3319)

This adds support for parsing a command line where options and positionals are intermixed as is common in many unix commands. This is paul.j3's patch with a few tweaks.

7 years agobpo-21649: Add RFC 7525 and Mozilla server side TLS (#3387)
Christian Heimes [Wed, 6 Sep 2017 23:19:56 +0000 (16:19 -0700)]
bpo-21649: Add RFC 7525 and Mozilla server side TLS (#3387)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoRemove all mention of Windows IA-64 support (GH-3389)
Zachary Ware [Wed, 6 Sep 2017 22:45:25 +0000 (15:45 -0700)]
Remove all mention of Windows IA-64 support (GH-3389)

It was mostly removed long ago.

7 years agobpo-27584: New addition of vSockets to the python socket module (#2489)
caavery [Wed, 6 Sep 2017 22:18:10 +0000 (18:18 -0400)]
bpo-27584: New addition of vSockets to the python socket module (#2489)

* bpo-27584: New addition of vSockets to the python socket module

Support for AF_VSOCK on Linux only

* bpo-27584: Fixes for V2

Fixed syntax and naming problems.
Fixed #ifdef AF_VSOCK checking
Restored original aclocal.m4

* bpo-27584: Fixes for V3

Added checking for fcntl and thread modules.

* bpo-27584: Fixes for V4

Fixed white space error

* bpo-27584: Fixes for V5

Added back comma in (CID, port).

* bpo-27584: Fixes for V6

Added news file.
socket.rst now reflects first Linux introduction of AF_VSOCK.
Fixed get_cid in test_socket.py.
Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c
Got rid of extra AF_VSOCK #define.
Added sockaddr_vm to sock_addr.

* bpo-27584: Fixes for V7

Minor cleanup.

* bpo-27584: Fixes for V8

Put back #undef AF_VSOCK as it is  necessary when vm_sockets.h is not installed.

7 years agoFixes Tix build by correcting the directories used by Tcl and Tk. (#3391)
Steve Dower [Wed, 6 Sep 2017 20:55:42 +0000 (13:55 -0700)]
Fixes Tix build by correcting the directories used by Tcl and Tk. (#3391)

7 years agobpo-30912: Don't check the content of ffi.h (GH-2687)
Shlomi Fish [Wed, 6 Sep 2017 20:19:19 +0000 (23:19 +0300)]
bpo-30912: Don't check the content of ffi.h (GH-2687)

Various platforms have various methods of handling multiarch libffi which probably won't match the previously looked-for defines.  Now we just make sure that ffi.h is available.

7 years agobpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878)
Devin Jeanpierre [Wed, 6 Sep 2017 18:15:35 +0000 (11:15 -0700)]
bpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878)

Add basic fuzz tests for a few common builtin functions.

This is an easy place to start, and these functions are probably safe.
We'll want to add more fuzz tests later.  Lets bootstrap using these.

While the fuzz tests are included in CPython and compiled / tested on a
very basic level inside CPython itself, the actual fuzzing happens as
part of oss-fuzz (https://github.com/google/oss-fuzz). The reason to
include the tests in CPython is to make sure that they're maintained
as part of the CPython project, especially when (as some eventually
will) they use internal implementation details in the test.

(This will be necessary sometimes because e.g. the fuzz test should
never enter Python's interpreter loop, whereas some APIs only expose
themselves publicly as Python functions.)

This particular set of changes is part of testing Python's builtins,
tracked internally at Google by b/37562550.

The _xxtestfuzz module that this change adds need not be shipped with binary distributions of Python.

7 years agobpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) ...
Steve Dower [Wed, 6 Sep 2017 17:01:38 +0000 (10:01 -0700)]
bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311)

7 years agoRevert "pytime: include winsock2, so we can have a complete timeval type (#3377)...
Antoine Pitrou [Wed, 6 Sep 2017 11:31:09 +0000 (13:31 +0200)]
Revert "pytime: include winsock2, so we can have a complete timeval type (#3377)" (#3383)

This reverts commit 833860615bedfd2484ac0623d6f01ff0578ba09f, as it broke Windows builds.

7 years agobpo-31178: Avoid concatenating bytes with str in subprocess error (#3066)
Ammar Askar [Wed, 6 Sep 2017 06:41:30 +0000 (02:41 -0400)]
bpo-31178: Avoid concatenating bytes with str in subprocess error (#3066)

Avoid concatenating bytes with str in the typically rare subprocess error path (exec failed). Includes a mock based unittest to exercise the codepath.

7 years agobpo-29781: Fix SSLObject.version before handshake (#3364)
Christian Heimes [Wed, 6 Sep 2017 04:55:40 +0000 (21:55 -0700)]
bpo-29781: Fix SSLObject.version before handshake (#3364)

SSLObject.version() now correctly returns None when handshake over BIO has
not been performed yet.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoStop test_xmlrpc from writing to sys.stderr (#3359)
Christian Heimes [Wed, 6 Sep 2017 04:43:46 +0000 (21:43 -0700)]
Stop test_xmlrpc from writing to sys.stderr (#3359)

One test case of test_xmlrpc uses HTTPServer with a subclass of
BaseHTTPRequestHandler. The BaseRequestHandler class logs to
sys.stderr by default. Override log_message() to not clobber
test output.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoRevert "bpo-30860: Consolidate stateful runtime globals." (#3379)
Eric Snow [Wed, 6 Sep 2017 04:43:08 +0000 (21:43 -0700)]
Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)

Windows buildbots started failing due to include-related errors.

7 years agopytime: include winsock2, so we can have a complete timeval type (#3377)
Benjamin Peterson [Wed, 6 Sep 2017 03:45:48 +0000 (20:45 -0700)]
pytime: include winsock2, so we can have a complete timeval type (#3377)

7 years agocorrect initialization code (#3376)
Benjamin Peterson [Wed, 6 Sep 2017 03:19:12 +0000 (20:19 -0700)]
correct initialization code (#3376)

Explicitly initialize struct members rather than relying on compiler extensions.

7 years agobpo-30860: Consolidate stateful runtime globals. (#2594)
Eric Snow [Wed, 6 Sep 2017 01:26:16 +0000 (18:26 -0700)]
bpo-30860: Consolidate stateful runtime globals. (#2594)

* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).

7 years agobpo-31355: Travis CI: remove the macOS job (#3367)
Victor Stinner [Wed, 6 Sep 2017 00:57:14 +0000 (02:57 +0200)]
bpo-31355: Travis CI: remove the macOS job (#3367)

7 years agobpo-31350: Optimize get_event_loop and _get_running_loop (#3347)
jimmylai [Wed, 6 Sep 2017 00:36:59 +0000 (17:36 -0700)]
bpo-31350: Optimize get_event_loop and _get_running_loop (#3347)

* call remove_done_callback in finally section

* Optimize get_event_loop and _get_running_loop

* rename _loop_pid as loop_pid and add blurb news

* rename _loop_pid as loop_pid and add blurb news

* add back _RunningLoop

* Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst

* Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst

7 years agobpo-31320: No traceback to sys.stderr in test_ssl (#3360)
Christian Heimes [Tue, 5 Sep 2017 23:37:09 +0000 (16:37 -0700)]
bpo-31320: No traceback to sys.stderr in test_ssl (#3360)

In case PROTOCOL_TLS_SERVER is used for both client context and server
context, the test thread dies with OSError. Catch OSError to avoid
traceback on sys.stderr

Signed-off-by: Christian Heimes <christian@python.org>
7 years agolink to legacy doc on the non-legacy website (#3362)
Benjamin Peterson [Tue, 5 Sep 2017 23:24:39 +0000 (16:24 -0700)]
link to legacy doc on the non-legacy website (#3362)

7 years agobpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)
Jonathan Eunice [Tue, 5 Sep 2017 23:23:49 +0000 (19:23 -0400)]
bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)

* fixed OrderedDict.__init__ docstring re PEP 468

* tightened comment and mirrored to C impl

* added space after period per marco-buttu

* preserved substituted for stable

* drop references to Python 3.6 and PEP 468

7 years ago_pickle: Fix whichmodule() (#3358)
Victor Stinner [Tue, 5 Sep 2017 21:30:16 +0000 (23:30 +0200)]
_pickle: Fix whichmodule() (#3358)

_PyUnicode_FromId() can return NULL: replace Py_INCREF() with
Py_XINCREF().

Fix coverity report: CID 1417269.

7 years agoLink to blurb on PyPI in the NEWS.d READMEs. (#3323)
Gregory P. Smith [Tue, 5 Sep 2017 17:38:05 +0000 (10:38 -0700)]
Link to blurb on PyPI in the NEWS.d READMEs. (#3323)

7 years agoConceptually, roots is a set. Also searching it as a set is a tiny bit faster (...
Raymond Hettinger [Tue, 5 Sep 2017 16:40:44 +0000 (09:40 -0700)]
Conceptually, roots is a set.  Also searching it as a set is a tiny bit faster (#3338)

7 years agobpo-31343: Include sys/sysmacros.h (#3318)
Christian Heimes [Tue, 5 Sep 2017 13:53:09 +0000 (15:53 +0200)]
bpo-31343: Include sys/sysmacros.h (#3318)

Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-30102: Call OPENSSL_add_all_algorithms_noconf (#3112)
Christian Heimes [Tue, 5 Sep 2017 13:47:11 +0000 (15:47 +0200)]
bpo-30102: Call OPENSSL_add_all_algorithms_noconf (#3112)

The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on
OpenSSL < 1.1.0. The function detects CPU features and enables optimizations
on some CPU architectures such as POWER8. Patch is based on research from
Gustavo Serra Scalet.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoPrevent a few make suspicious warnings. (#3341)
Ned Deily [Tue, 5 Sep 2017 08:34:47 +0000 (01:34 -0700)]
Prevent a few make suspicious warnings. (#3341)

7 years agoInclude additional changes to support blurbified NEWS (#3340)
Ned Deily [Tue, 5 Sep 2017 07:10:31 +0000 (00:10 -0700)]
Include additional changes to support blurbified NEWS (#3340)

7 years agoSimplify NEWS entry to prevent suspicious warnings. (#3339)
Ned Deily [Tue, 5 Sep 2017 06:23:04 +0000 (23:23 -0700)]
Simplify NEWS entry to prevent suspicious warnings. (#3339)

7 years agobpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not be null...
Benjamin Peterson [Tue, 5 Sep 2017 05:23:42 +0000 (22:23 -0700)]
bpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not be null (#3329)

Passing NULL as the second argument to to memcpy is undefined behavior even if the size is 0.

7 years agoRevert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit...
Neil Schemenauer [Tue, 5 Sep 2017 05:13:17 +0000 (22:13 -0700)]
Revert "bpo-17852: Maintain a list of BufferedWriter objects.  Flush them on exit. (#1908)" (#3337)

This reverts commit e38d12ed34870c140016bef1e0ff10c8c3d3f213.

7 years agobpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. (#1908)
Neil Schemenauer [Tue, 5 Sep 2017 03:18:38 +0000 (20:18 -0700)]
bpo-17852: Maintain a list of BufferedWriter objects.  Flush them on exit. (#1908)

* Maintain a list of BufferedWriter objects.  Flush them on exit.

In Python 3, the buffer and the underlying file object are separate
and so the order in which objects are finalized matters.  This is
unlike Python 2 where the file and buffer were a single object and
finalization was done for both at the same time.  In Python 3, if
the file is finalized and closed before the buffer then the data in
the buffer is lost.

This change adds a doubly linked list of open file buffers.  An atexit
hook ensures they are flushed before proceeding with interpreter
shutdown.  This is addition does not remove the need to properly close
files as there are other reasons why buffered data could get lost during
finalization.

Initial patch by Armin Rigo.

* Use weakref.WeakSet instead of WeakKeyDictionary.

* Simplify buffered double-linked list types.

* In _flush_all_writers(), suppress errors from flush().

* Remove NEWS entry, use blurb.

7 years agoFix terminology in comment and add more design rationale. (#3335)
Raymond Hettinger [Tue, 5 Sep 2017 01:54:16 +0000 (18:54 -0700)]
Fix terminology in comment and add more design rationale. (#3335)

* Fix terminology in comment and add more design rationale.

* Fix extra space

7 years agoAdd comment to explain the implications of not sorting keywords (#3331)
Raymond Hettinger [Tue, 5 Sep 2017 00:47:53 +0000 (17:47 -0700)]
Add comment to explain the implications of not sorting keywords (#3331)

In Python 3.6, sorted() was removed from _make_key() for the lru_cache and instead rely on guaranteed keyword argument order preservation.  This makes keyword argument handling faster but it also causes multiple callers with a different keyword argument order to be cached as separate items.  Depending on your point of view, this is either a performance regression (increased number of cache misses) or a performance enhancement (faster computation of keys).

7 years agobpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)
Victor Stinner [Mon, 4 Sep 2017 23:58:08 +0000 (01:58 +0200)]
bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)

* bpo-31170: Update libexpat from 2.2.3 to 2.2.4

Fix copying of partial characters for UTF-8 input (libexpat bug 115):
https://github.com/libexpat/libexpat/issues/115

* Add NEWS entry.

7 years agobpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)
Eric Snow [Mon, 4 Sep 2017 23:54:09 +0000 (17:54 -0600)]
bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)

sys.modules is the one true source.

7 years agorandom_triangular: sqrt() is more accurate than **0.5 (#3317)
Raymond Hettinger [Mon, 4 Sep 2017 23:51:06 +0000 (16:51 -0700)]
random_triangular:  sqrt() is more accurate than **0.5 (#3317)

7 years agoTravis: use ccache (#3307)
Christian Heimes [Mon, 4 Sep 2017 23:48:54 +0000 (01:48 +0200)]
Travis: use ccache (#3307)

7 years agoremove IRIX support (closes bpo-31341) (#3310)
Benjamin Peterson [Mon, 4 Sep 2017 23:36:05 +0000 (16:36 -0700)]
remove IRIX support (closes bpo-31341) (#3310)

See PEP 11.

7 years agoCode clean-up. Remove unnecessary pre-increment before the loop starts. (#3312)
Raymond Hettinger [Mon, 4 Sep 2017 23:07:06 +0000 (16:07 -0700)]
Code clean-up.  Remove unnecessary pre-increment before the loop starts. (#3312)

7 years agoRegen Moduls/clinic/_ssl.c.h (GH-3320)
Zachary Ware [Mon, 4 Sep 2017 22:45:18 +0000 (15:45 -0700)]
Regen Moduls/clinic/_ssl.c.h (GH-3320)

Broken in GH-2079

7 years agobpo-30502: Fix handling of long oids in ssl. (#2909)
Serhiy Storchaka [Mon, 4 Sep 2017 22:28:53 +0000 (01:28 +0300)]
bpo-30502: Fix handling of long oids in ssl. (#2909)

7 years agoCache externals, depending on changes to PCbuild (#3308)
Zachary Ware [Mon, 4 Sep 2017 21:59:02 +0000 (14:59 -0700)]
Cache externals, depending on changes to PCbuild (#3308)

7 years agobpo-30622: Change NPN detection: (#2079)
Melvyn Sopacua [Mon, 4 Sep 2017 21:35:15 +0000 (23:35 +0200)]
bpo-30622: Change NPN detection: (#2079)

* Change NPN detection:

Version breakdown, support disabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined ->
False/False
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will be defined -> True/False

Version breakdown support enabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True

* Refine NPN guard:

- If NPN is disabled, but ALPN is available we need our callback
- Make clinic's ssl behave the same way

This created a working ssl module for me, with NPN disabled and ALPN
enabled for OpenSSL 1.1.0f.

Concerns to address:
The initial commit for NPN support into OpenSSL [1], had the
OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG
guard. The question is if that ever made it into a release.
This would need an ugly hack, something like:

#if defined(OPENSSL_NO_NEXTPROTONEG) && \
!defined(OPENSSL_NPN_NEGOTIATED)
# define OPENSSL_NPN_UNSUPPORTED 0
# define OPENSSL_NPN_NEGOTIATED 1
# define OPENSSL_NPN_NO_OVERLAP 2
#endif

[1] https://github.com/openssl/openssl/commit/68b33cc5c7

7 years agoWhat's New for bpo-1198569 (#3303)
Barry Warsaw [Mon, 4 Sep 2017 21:29:27 +0000 (17:29 -0400)]
What's New for bpo-1198569 (#3303)

7 years agoFixes doc/make.bat to properly handle quoted paths. (#3302)
Steve Dower [Mon, 4 Sep 2017 21:26:27 +0000 (14:26 -0700)]
Fixes doc/make.bat to properly handle quoted paths. (#3302)

7 years agoremove configure.ac support for SGI_ABI (#3294)
Benjamin Peterson [Mon, 4 Sep 2017 21:05:32 +0000 (14:05 -0700)]
remove configure.ac support for SGI_ABI (#3294)

7 years agoremote note about IRIX in aifc (#3299)
Benjamin Peterson [Mon, 4 Sep 2017 20:32:34 +0000 (13:32 -0700)]
remote note about IRIX in aifc (#3299)

This comment hasn't been true since Python 3.0.

7 years agobpo-1198569: Allow string.Template braced pattern to be different (#3288)
Barry Warsaw [Mon, 4 Sep 2017 20:32:10 +0000 (16:32 -0400)]
bpo-1198569: Allow string.Template braced pattern to be different (#3288)

* bpo-1198569: Allow the braced pattern to be different

``string.Template`` subclasses can optionally define ``braceidpattern`` if
they want to specify different placeholder patterns inside and outside the
braces.  If None (the default) it falls back to ``idpattern``.

7 years agoBlurbify master branch. (#3298)
larryhastings [Mon, 4 Sep 2017 20:30:19 +0000 (13:30 -0700)]
Blurbify master branch. (#3298)

Blurbify master branch.

7 years agobpo-25674: remove sha256.tbs-internet.com ssl test (#3297)
Christian Heimes [Mon, 4 Sep 2017 20:26:01 +0000 (22:26 +0200)]
bpo-25674: remove sha256.tbs-internet.com ssl test (#3297)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoClarify nature of parse_args 'args' argument. (#3292)
R. David Murray [Mon, 4 Sep 2017 20:17:26 +0000 (16:17 -0400)]
Clarify nature of parse_args 'args' argument. (#3292)

Patch by Paul.j3.  Includes an unrelated but useful addition to the
optparse porting section.

7 years agoAdd references to modules I am responsible for (#3291)
Raymond Hettinger [Mon, 4 Sep 2017 19:31:15 +0000 (12:31 -0700)]
Add references to modules I am responsible for (#3291)

7 years agoUse a team to maintain the email related packages. (#3290)
Barry Warsaw [Mon, 4 Sep 2017 19:19:26 +0000 (15:19 -0400)]
Use a team to maintain the email related packages. (#3290)

7 years agoImprove clarity (and small speed-up) by using tuple unpacking (#3289)
Raymond Hettinger [Mon, 4 Sep 2017 18:47:58 +0000 (11:47 -0700)]
Improve clarity (and small speed-up) by using tuple unpacking (#3289)

7 years agoremove check for bug last seem in Solaris 9 (#3285)
Benjamin Peterson [Mon, 4 Sep 2017 17:52:51 +0000 (10:52 -0700)]
remove check for bug last seem in Solaris 9 (#3285)

7 years agoChange code owners for hashlib and ssl to the crypto team (#3284)
Alex Gaynor [Mon, 4 Sep 2017 17:40:45 +0000 (13:40 -0400)]
Change code owners for hashlib and ssl to the crypto team (#3284)

* Change code owners for hashlib and ssl to the crypto team

* Include the core CSPRNG for the crypto-team

7 years agobpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208)
Zhiming Wang [Mon, 4 Sep 2017 17:37:24 +0000 (01:37 +0800)]
bpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208)

Fix fileinput with inplace=True to accept pathlib.Path objects.

7 years agoremove autoconf check for select() (#3283)
Benjamin Peterson [Mon, 4 Sep 2017 17:21:42 +0000 (10:21 -0700)]
remove autoconf check for select() (#3283)

We never actually check HAVE_SELECT.

7 years agoremove configure check for 'volatile' (#3281)
Benjamin Peterson [Mon, 4 Sep 2017 17:09:12 +0000 (10:09 -0700)]
remove configure check for 'volatile' (#3281)

This is a required feature is C99, which we require.

7 years agoAdd missing _sha3 module to Setup.dist (#2395)
Segev Finer [Mon, 4 Sep 2017 16:28:14 +0000 (19:28 +0300)]
Add missing _sha3 module to Setup.dist (#2395)

7 years agobpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278)
Ned Deily [Mon, 4 Sep 2017 04:00:21 +0000 (00:00 -0400)]
bpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278)

Used in macOS framework builds.

7 years agobpo-9146: add the missing NEWS entry. (#3275)
Gregory P. Smith [Sun, 3 Sep 2017 21:08:48 +0000 (14:08 -0700)]
bpo-9146: add the missing NEWS entry. (#3275)

7 years agoFix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270)
Antoine Pitrou [Sun, 3 Sep 2017 13:09:23 +0000 (15:09 +0200)]
Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270)

7 years agobpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)
Serhiy Storchaka [Sun, 3 Sep 2017 05:10:14 +0000 (08:10 +0300)]
bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)

7 years agoremove a redundant lower in urllib.parse.urlsplit (#3008)
Oren Milman [Sun, 3 Sep 2017 04:51:39 +0000 (07:51 +0300)]
remove a redundant lower in urllib.parse.urlsplit (#3008)

7 years agobpo-31323: Fix reference leak in test_ssl (#3263)
Victor Stinner [Fri, 1 Sep 2017 22:26:17 +0000 (00:26 +0200)]
bpo-31323: Fix reference leak in test_ssl (#3263)

Store exceptions as string rather than object to prevent reference
cycles which cause leaking dangling threads.

7 years agobpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)
Victor Stinner [Fri, 1 Sep 2017 22:25:39 +0000 (00:25 +0200)]
bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)

Call doCleanups() to close the loop after calling
executor.shutdown(wait=True): see TestCase.set_event_loop() of
asyncio.test_utils.

Replace also gc.collect() with support.gc_collect().

7 years agobpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)
Victor Stinner [Fri, 1 Sep 2017 22:25:11 +0000 (00:25 +0200)]
bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)

* bpo-31326: ProcessPoolExecutor waits for the call queue thread

concurrent.futures.ProcessPoolExecutor.shutdown() now explicitly
closes the call queue. Moreover, shutdown(wait=True) now also join
the call queue thread, to prevent leaking a dangling thread.

* Fix for shutdown() being called twice.

7 years agobpo-27144: concurrent.futures as_complete and map iterators do not keep reference...
Grzegorz Grzywacz [Fri, 1 Sep 2017 16:54:00 +0000 (18:54 +0200)]
bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (#1560)

* bpo-27144: concurrent.futures as_complie and map iterators do not keep
reference to returned object

* Some nits.  Improve wordings in docstrings and comments, and avoid relying on
sys.getrefcount() in tests.

7 years agobpo-31250, test_asyncio: fix dangling threads (#3252)
Victor Stinner [Fri, 1 Sep 2017 12:46:06 +0000 (14:46 +0200)]
bpo-31250, test_asyncio: fix dangling threads (#3252)

* Explicitly call shutdown(wait=True) on executors to wait until all
  threads complete to prevent side effects between tests.
* Fix test_loop_self_reading_exception(): don't mock loop.close().
  Previously, the original close() method was called rather than the
  mock, because how set_event_loop() registered loop.close().

7 years agobpo-31217: Fix regrtest -R for small integer (#3260)
Victor Stinner [Fri, 1 Sep 2017 11:05:27 +0000 (13:05 +0200)]
bpo-31217: Fix regrtest -R for small integer (#3260)

Use a pool of integer objects toprevent false alarm when checking for
memory block leaks. Fill the pool with values in -1000..1000 which
are the most common (reference, memory block, file descriptor)
differences.

Co-Authored-By: Antoine Pitrou <pitrou@free.fr>
7 years agobpo-30096: Use ABC in abc reference examples (#1220)
Eric Appelt [Wed, 30 Aug 2017 22:47:52 +0000 (17:47 -0500)]
bpo-30096: Use ABC in abc reference examples (#1220)

Use base class rather than metaclass in examples.

7 years agobpo-30737: Update DevGuide links to new URL (GH-3228)
Lisa Hewus Fresh [Wed, 30 Aug 2017 16:37:43 +0000 (09:37 -0700)]
bpo-30737: Update DevGuide links to new URL (GH-3228)

Update old devguide links from https://docs.python.org/devguide to https://devguide.python.org

7 years ago[Trivial] Remove now redundant assert (#3245)
Antoine Pitrou [Wed, 30 Aug 2017 14:57:12 +0000 (16:57 +0200)]
[Trivial] Remove now redundant assert (#3245)

7 years agoFix the indentation in Extending Python code example (GH-3244)
Sergey Fedoseev [Wed, 30 Aug 2017 14:50:40 +0000 (19:50 +0500)]
Fix the indentation in Extending Python code example (GH-3244)

Code was indented with three spaces.
Fixed using four spaces.

7 years agoRemoved noop branch from ctypes code (#3234)
Alex Gaynor [Wed, 30 Aug 2017 11:43:14 +0000 (07:43 -0400)]
Removed noop branch from ctypes code (#3234)