]> granicus.if.org Git - python/log
python
7 years ago[3.6] bpo-31662: Fix typos in uploadrelease.bat script (#3858)
Miss Islington (bot) [Mon, 2 Oct 2017 16:20:28 +0000 (09:20 -0700)]
[3.6] bpo-31662: Fix typos in uploadrelease.bat script (#3858)

(cherry picked from commit efb560eee28b6b2418e1231573ca62574d6dc07b)

7 years ago[3.6] bpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()...
Miss Islington (bot) [Fri, 29 Sep 2017 22:07:01 +0000 (15:07 -0700)]
[3.6] bpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()` (GH-3830) (#3831)

This was possible before.  GH-1560 introduced a regression after 3.6.2 got
released where only sequences were accepted now.  This commit addresses this
problem.
(cherry picked from commit 574562c5ddb2f0429aab9af762442e6f9a3f26ab)

7 years ago[3.6] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3699)
Zachary Ware [Fri, 22 Sep 2017 18:26:19 +0000 (13:26 -0500)]
[3.6] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3699)

Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
(cherry picked from commit da9b4cfb488119f2493a762fcb1d85c58494f51d)

7 years agoFix build issues in Doc/make.bat (#3663)
Steve Dower [Tue, 19 Sep 2017 21:40:48 +0000 (14:40 -0700)]
Fix build issues in Doc/make.bat (#3663)

7 years agoBump to 3.6.3rc1 v3.6.3rc1
Ned Deily [Tue, 19 Sep 2017 03:18:48 +0000 (23:18 -0400)]
Bump to 3.6.3rc1

7 years agoUpdate pydoc topics and NEWS blurbs for 3.6.3rc1
Ned Deily [Tue, 19 Sep 2017 03:04:41 +0000 (23:04 -0400)]
Update pydoc topics and NEWS blurbs for 3.6.3rc1

7 years ago[3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)
Miss Islington (bot) [Mon, 18 Sep 2017 12:48:23 +0000 (05:48 -0700)]
[3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)

* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash

xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffcd91b21ce82026ec8c8381d34a16209)

7 years ago[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (GH-3635) (#3637)
Miss Islington (bot) [Mon, 18 Sep 2017 01:10:54 +0000 (18:10 -0700)]
[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (GH-3635) (#3637)

(cherry picked from commit 55679e0ec76ee3b30ca609948f47bb02a8e0a078)

7 years ago[3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634...
Miss Islington (bot) [Mon, 18 Sep 2017 00:39:24 +0000 (17:39 -0700)]
[3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (#3636)

This reverses a never-released regression resulting from bpo-31287.
(cherry picked from commit 0efc7c67a2f8a184e93f9a491305c81ef2e24250)

7 years agobpo-31487: Update F-strings doc example (GH-3627) (GH-3628)
Miss Islington (bot) [Sun, 17 Sep 2017 14:57:08 +0000 (07:57 -0700)]
bpo-31487: Update F-strings doc example (GH-3627) (GH-3628)

Shorten the comment to: "using integer format specifier"
(cherry picked from commit 63c591c0b0b57870a606e8edc59afe6264e7504d)

7 years ago[3.6] bpo-31493: Fix code context update and font update timers. (GH-3622) (#3623)
Miss Islington (bot) [Sun, 17 Sep 2017 06:01:53 +0000 (23:01 -0700)]
[3.6] bpo-31493: Fix code context update and font update timers. (GH-3622) (#3623)

Canceling timers prevents a warning message when test_idle completes.
(This is the minimum fix needed before upcoming releases.)
(cherry picked from commit a6bb313c70f8619e6dc4af5cef7d73fa3bbd59ca)

7 years agobpo-31487: Improve f-strings documentation (GH-3604) (GH-3619)
Miss Islington (bot) [Sat, 16 Sep 2017 19:01:32 +0000 (12:01 -0700)]
bpo-31487: Improve f-strings documentation (GH-3604) (GH-3619)

Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f3618970690b08ed88e430ba8017859b4fafc3f9)

7 years agobpo-31458: Clarify that Changelog is built from Misc/NEWS.d directory (GH-3617) ...
Miss Islington (bot) [Sat, 16 Sep 2017 18:44:27 +0000 (11:44 -0700)]
bpo-31458: Clarify that Changelog is built from Misc/NEWS.d directory (GH-3617) (GH-3618)

(cherry picked from commit 0ec8c4bd10dcfd8e580628868efdd3df91038898)

7 years agobpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3607)
Michael Seifert [Sat, 16 Sep 2017 11:29:33 +0000 (13:29 +0200)]
bpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3607)

(cherry picked from commit da67e0d644bd3185efdaa4d15cc2ac0828ca83f9)

7 years ago[3.6] bpo-31488: IDLE - update former extensions when options change. (GH-3612) ...
Miss Islington (bot) [Sat, 16 Sep 2017 06:14:34 +0000 (23:14 -0700)]
[3.6] bpo-31488: IDLE - update former extensions when options change. (GH-3612) (#3613)

When apply ConfigDialog changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
(cherry picked from commit 5777ecc438790f3d324d52f2ccdad56e667e0cb3)

7 years ago[3.6] bpo-31234: Join threads in tests (#3589)
Victor Stinner [Fri, 15 Sep 2017 23:55:47 +0000 (16:55 -0700)]
[3.6] bpo-31234: Join threads in tests (#3589)

* bpo-31234: Join threads in tests (#3572)

Call thread.join() on threads to prevent the "dangling threads"
warning.

(cherry picked from commit 18e95b4176256f100429a806d0455406df98f984)

* bpo-31234: Join threads in test_hashlib (#3573)

* bpo-31234: Join threads in test_hashlib

Use thread.join() to wait until the parallel hash tasks complete
rather than using events. Calling thread.join() prevent "dangling
thread" warnings.

* test_hashlib: minor PEP 8 coding style fixes

(cherry picked from commit 8dcf22f442320e4c1a5408e67b4c9002ad105f17)

* bpo-31234: Join threads in test_threading (#3579)

Call thread.join() to prevent the "dangling thread" warning.

(cherry picked from commit b8c7be2c523b012e57915182543d06657161057f)

* bpo-31234: Join threads in test_queue (#3586)

Call thread.join() to prevent the "dangling thread" warning.

(cherry picked from commit 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5)

* bpo-31234: Join timers in test_threading (#3598)

Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.

(cherry picked from commit da3e5cf961f9bcc4bb376386cfe7a2865325086c)

7 years ago[3.6] bpo-314777: IDLE - improve rstrip entry in doc (GH-3602) (#3605)
Terry Jan Reedy [Fri, 15 Sep 2017 19:09:17 +0000 (15:09 -0400)]
[3.6] bpo-314777: IDLE - improve rstrip entry in doc (GH-3602) (#3605)

'Strip trailing whitespace' is not limited to spaces.  Wording caters to beginners who
do know know the meaning of 'whitespace'.  Multiline string literals are not skipped.
(cherry picked from commit ff70289)

7 years ago[3.6] bpo-31462: IDLE - remove trailing whitespaces (GH-3564) (#3594)
Terry Jan Reedy [Fri, 15 Sep 2017 02:52:16 +0000 (22:52 -0400)]
[3.6] bpo-31462: IDLE - remove trailing whitespaces (GH-3564) (#3594)

Reproduction of Idlelib changes in Serhiy's 3.7 patch.

7 years ago[3.6] bpo-31480: IDLE - fix tests to pass with zzdummy extension disabled. (GH-3590...
Miss Islington (bot) [Fri, 15 Sep 2017 00:34:42 +0000 (17:34 -0700)]
[3.6] bpo-31480: IDLE - fix tests to pass with zzdummy extension disabled. (GH-3590) (#3591)

Enabled by default was a temporary expedient.  The fix is to add a user override to enable.
(cherry picked from commit d384a81f557dab0b142bfcc9850bc68df46496ef)

7 years ago[3.6] bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (GH-3545) ...
Miss Islington (bot) [Thu, 14 Sep 2017 23:13:21 +0000 (16:13 -0700)]
[3.6] bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (GH-3545) (#3585)

* Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.

* Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
(cherry picked from commit c8d8e15bfc24abeeaaf3d8be9073276b0c011cdf)

7 years ago[3.6] bpo-28556: typing.get_type_hints: better globalns for classes and modules ...
Miss Islington (bot) [Thu, 14 Sep 2017 20:52:05 +0000 (13:52 -0700)]
[3.6] bpo-28556: typing.get_type_hints: better globalns for classes and modules (GH-3582) (#3583)

This makes the default behavior (without specifying `globalns` manually) more
predictable for users, finds the right globalns automatically.

Implementation for classes assumes has a `__module__` attribute and that module
is present in `sys.modules`.  It does this recursively for all bases in the
MRO.  For modules, the implementation just uses their `__dict__` directly.

This is backwards compatible, will just raise fewer exceptions in naive user
code.

Originally implemented and reviewed at https://github.com/python/typing/pull/470.
(cherry picked from commit f350a268a7071ce7d7a5bb86a9b1229782d4963b)

7 years ago[3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case...
Miss Islington (bot) [Thu, 14 Sep 2017 19:56:31 +0000 (12:56 -0700)]
[3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env has a bad keys() method. (GH-3580) (#3584)

(cherry picked from commit 0b3a87ef54a0112b74e8a1d8c6f87d10db4239ab)

7 years ago[3.6] bpo-31457: Allow for nested LoggerAdapter objects (GH-3551) (#3576)
Miss Islington (bot) [Thu, 14 Sep 2017 17:10:25 +0000 (10:10 -0700)]
[3.6] bpo-31457: Allow for nested LoggerAdapter objects (GH-3551) (#3576)

Some of the proxied methods use internal Logger state which isn't proxied,
causing failures if an adapter is applied to another adapter.

This commit fixes the issue, adds a new test for the use case.
(cherry picked from commit 1bbd482bcf6ea36bfe488f868810ffe110238ae1)

7 years agoImprove code examples in hashlib cookie signing (GH-3562) (GH-3566)
Miss Islington (bot) [Thu, 14 Sep 2017 13:45:31 +0000 (06:45 -0700)]
Improve code examples in hashlib cookie signing (GH-3562) (GH-3566)

The `blake2b` function does not take the `data` keyword argument.
The hex digest returned by sign was a string, whereas compare_digest expects bytes-like objects.
Typo fix: compare_digesty -> compare_digest
(cherry picked from commit 312ffead1eb272535e021e248b5d74ab04b2e72e)

7 years ago[3.6] _ssl_: Fix compiler warning (GH-3559) (#3569)
Christian Heimes [Thu, 14 Sep 2017 09:15:07 +0000 (11:15 +0200)]
[3.6] _ssl_: Fix compiler warning (GH-3559) (#3569)

Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559fb0776a9a0f08294ec9003cea13940430)

7 years ago[3.6] bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an...
Miss Islington (bot) [Thu, 14 Sep 2017 06:41:39 +0000 (23:41 -0700)]
[3.6] bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__ attribute. (GH-3539) (#3556)

(cherry picked from commit f6e61df01536493f1280cd07639c7ff9bffb2cdc)

7 years ago[3.6] bpo-30246: fix several error messages which only mention bytes in struct (...
Xiang Zhang [Thu, 14 Sep 2017 03:22:23 +0000 (11:22 +0800)]
[3.6] bpo-30246: fix several error messages which only mention bytes in struct (#3561)

7 years ago[3.6] bpo-31458: Update Misc/NEWS link in What's New page (GH-3555) (GH-3560)
Mariatta [Thu, 14 Sep 2017 02:40:32 +0000 (19:40 -0700)]
[3.6] bpo-31458: Update Misc/NEWS link in What's New page (GH-3555) (GH-3560)

Update the link from Misc/NEWS to Misc/NEWS.d
(cherry picked from commit 1b8f612e1800b6e58472113f4abe8ee7c31f4db7)

7 years ago[3.6] bpo-28556: Minor updates to typing module (GH-3550) (#3558)
Miss Islington (bot) [Thu, 14 Sep 2017 00:10:53 +0000 (17:10 -0700)]
[3.6] bpo-28556: Minor updates to typing module (GH-3550) (#3558)

* Copy changes to typing from upstream repo
* Add NEWS entry
(cherry picked from commit 65bc62052fe5d550cb14c0033e8a2550618fb7b9)

7 years ago[3.6] bpo-31234: Fix dangling thread in test_ftp/poplib (#3554)
Victor Stinner [Wed, 13 Sep 2017 22:56:14 +0000 (15:56 -0700)]
[3.6] bpo-31234: Fix dangling thread in test_ftp/poplib (#3554)

* bpo-31234: Fix dangling thread in test_ftp/poplib (#3540)

Explicitly clear the server attribute in test_ftplib and test_poplib
to prevent dangling thread.

(cherry picked from commit d403a29c0055de6b03ed5ae7a5c564e1c95a5950)

* bpo-31234: Fix dangling thread in test_ftplib (#3544)

Clear also self.server_thread attribute in TestTimeouts.tearDown().

(cherry picked from commit b157ce1e58b03988ce4340a55d0b856125833cc5)

7 years ago[3.6] bpo-31234, socket.create_connection(): Fix ref cycle (GH-3546) (#3552)
Miss Islington (bot) [Wed, 13 Sep 2017 22:54:34 +0000 (15:54 -0700)]
[3.6] bpo-31234, socket.create_connection(): Fix ref cycle (GH-3546) (#3552)

(cherry picked from commit acb9fa79fa6453c2bbe3ccfc9cad2837feb90093)

7 years ago[3.6] bpo-31448, test_poplib: Fix ResourceWarning (GH-3542) (#3543)
Miss Islington (bot) [Wed, 13 Sep 2017 13:09:44 +0000 (06:09 -0700)]
[3.6] bpo-31448, test_poplib: Fix ResourceWarning (GH-3542) (#3543)

Call POP3.close(), don't close close directly the sock attribute.
(cherry picked from commit d165e14e29b45a22450263722f5c2c386c3a748a)

7 years ago[3.6] bpo-31234: test_httpservers joins the server thread (GH-3188) (#3536)
Miss Islington (bot) [Wed, 13 Sep 2017 10:27:54 +0000 (03:27 -0700)]
[3.6] bpo-31234: test_httpservers joins the server thread (GH-3188) (#3536)

(cherry picked from commit 830d7d2936434ace113822294acce82f62cde41b)

7 years ago[3.6] bpo-31234: test_threaded_import: fix test_side_effect_import() (GH-3189) (...
Miss Islington (bot) [Wed, 13 Sep 2017 10:27:45 +0000 (03:27 -0700)]
[3.6] bpo-31234: test_threaded_import: fix test_side_effect_import() (GH-3189) (#3537)

* Don't leak the module into sys.modules
* Avoid dangling thread
(cherry picked from commit 41bbd82b6b6a887e893974fa5cdaae7782ae6cac)

7 years ago[3.6] bpo-31323: Fix reference leak in test_ssl (GH-3263) (#3538)
Miss Islington (bot) [Wed, 13 Sep 2017 10:27:34 +0000 (03:27 -0700)]
[3.6] bpo-31323: Fix reference leak in test_ssl (GH-3263) (#3538)

Store exceptions as string rather than object to prevent reference
cycles which cause leaking dangling threads.
(cherry picked from commit 868710158910fa38e285ce0e6d50026e1d0b2a8c)

7 years ago[3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527)
Miss Islington (bot) [Wed, 13 Sep 2017 04:55:23 +0000 (21:55 -0700)]
[3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527)

(cherry picked from commit b8d1b9d7c697dd0401491b6d43047acbaf425f02)

7 years ago[3.6] bpo-31394: Clarify documentation about token type attribute (GH-3469) (GH-3525)
Mariatta [Wed, 13 Sep 2017 03:43:04 +0000 (20:43 -0700)]
[3.6] bpo-31394: Clarify documentation about token type attribute (GH-3469) (GH-3525)

Make it clear that Ellipsis tokens also have type attribute set to token.OP..
(cherry picked from commit 5f8fbf917ebf2398aa75a1f271617e2e50ab7c88)

7 years ago[3.6] bpo-31249: Fix test_concurrent_futures dangling thread (GH-3521) (#3522)
Miss Islington (bot) [Wed, 13 Sep 2017 00:43:44 +0000 (17:43 -0700)]
[3.6] bpo-31249: Fix test_concurrent_futures dangling thread (GH-3521) (#3522)

ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue
and joins its thread, to prevent leaking a dangling thread.
(cherry picked from commit 3bcf157c115ba3e48bce62ac8cb13c703475a113)

7 years ago[3.6] bpo-31234: Enhance test_thread.test_forkinthread() (GH-3516) (#3519)
Miss Islington (bot) [Tue, 12 Sep 2017 23:14:09 +0000 (16:14 -0700)]
[3.6] bpo-31234: Enhance test_thread.test_forkinthread() (GH-3516) (#3519)

* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
  346cbd351ee0dd3ab9cb9f0e4cb625556707877e (bpo-16500,
  os.register_at_fork(), os.fork() cannot fail anymore with
  RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
  the platform.
(cherry picked from commit a15d155aadfad232158f530278505cdc6f326f93)

7 years ago[3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0...
Victor Stinner [Tue, 12 Sep 2017 23:09:44 +0000 (16:09 -0700)]
[3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518)

* bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)

(cherry picked from commit d73a960c575207539c3f9765cff26d4fff400b45)

* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)

(cherry picked from commit f432a3234f9f2ee09bd40be03e06bf72865ee375)

* bpo-31275: Small refactoring to silence a fall-through warning. (#3206)

(cherry picked from commit 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b)

7 years ago[3.6] bpo-31250: test_asyncio: fix dangling threads (#3517)
Victor Stinner [Tue, 12 Sep 2017 21:18:23 +0000 (14:18 -0700)]
[3.6] bpo-31250: test_asyncio: fix dangling threads (#3517)

* 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().

(cherry picked from commit 16432beadb8eba079c9786cc0c0eaacfd9fd2f7b)

* 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().

(cherry picked from commit e8a533fbc734af6eeb389202ba6c6e9c2548027f)

7 years ago[3.6] bpo-31421: Document how IDLE runs tkinter programs. (GH-3513) (#3514)
Miss Islington (bot) [Tue, 12 Sep 2017 13:44:59 +0000 (06:44 -0700)]
[3.6] bpo-31421: Document how IDLE runs tkinter programs. (GH-3513) (#3514)

IDLE calls tcl/tk update in the background in order to make live
interaction and experimentatin with tkinter applications much easier.
(cherry picked from commit 98758bc67fb39b74bab368bef8ff3b34554c77c8)

7 years ago[3.6] bpo-27099: Finish updating IDLE doc and help text. (GH-3510) (#3511)
Miss Islington (bot) [Tue, 12 Sep 2017 12:23:38 +0000 (05:23 -0700)]
[3.6] bpo-27099: Finish updating IDLE doc and help text. (GH-3510) (#3511)

As needed for the conversion of extensions to features.
(cherry picked from commit adb4cd2a2a59019ac6955e0fd531c9fec9258962)

7 years ago[3.6] bpo-31416: Fix assertion failures in case of a bad warnings.filters or warnings...
Serhiy Storchaka [Tue, 12 Sep 2017 06:48:27 +0000 (09:48 +0300)]
[3.6] bpo-31416: Fix assertion failures in case of a bad warnings.filters or warnings.defaultaction. (GH-3496) (#3509)

Patch by Oren Milman..
(cherry picked from commit 9d984fd2b097c8c29479d1c3eb740995fe1ccb0d)

7 years ago[3.6] bpo-31373: remove overly strict float range checks (GH-3486) (#3495)
Benjamin Peterson [Tue, 12 Sep 2017 06:08:49 +0000 (23:08 -0700)]
[3.6] bpo-31373: remove overly strict float range checks (GH-3486) (#3495)

This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
(cherry picked from commit 2bb69a5b4e7f96cb35d1b28aa7b7b3974b351f59)

7 years ago[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-09-11. (GH-3503) (#3504)
Miss Islington (bot) [Mon, 11 Sep 2017 21:50:40 +0000 (14:50 -0700)]
[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-09-11. (GH-3503) (#3504)

(cherry picked from commit 8239fd704637d7cbf59273883fbe487fc0f568fc)

7 years ago[3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (#3502)
Miss Islington (bot) [Mon, 11 Sep 2017 20:34:11 +0000 (13:34 -0700)]
[3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (#3502)

Adding to an int entry is not the same as deleting and inserting
because int('') will fail.
(cherry picked from commit 667522efa8fedfb57fd89d7335d7dfd270f274d5)

7 years ago[3.6] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not...
Serhiy Storchaka [Mon, 11 Sep 2017 07:01:47 +0000 (10:01 +0300)]
[3.6] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not a dictionary. (GH-3485). (#3494)

(cherry picked from commit 252033d50effa08046ac34fcc406bc99796ab88b)

7 years ago[3.6] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166...
Serhiy Storchaka [Mon, 11 Sep 2017 06:26:15 +0000 (09:26 +0300)]
[3.6] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166). (#3491)

(cherry picked from commit 2e6bb4484ee1b0da67d1dfcf0816c58602daa5a0)

7 years ago[3.6] bpo-30781: IDLE: Fix help button on configdialog (GH-3238) (#3489)
Miss Islington (bot) [Mon, 11 Sep 2017 03:19:35 +0000 (20:19 -0700)]
[3.6] bpo-30781: IDLE: Fix help button on configdialog (GH-3238) (#3489)

This fixes an omission in the ttk conversion patch for this issue, hence no new news.
Patch by Cheryl Sabella.
(cherry picked from commit 3866d9bbcf808cea98b3d00007f9f246b83858ce)

7 years agoBackport docstring improvements to OrderedDict. (GH-3470)
Henk-Jaap Wagenaar [Mon, 11 Sep 2017 01:11:18 +0000 (02:11 +0100)]
Backport docstring improvements to OrderedDict. (GH-3470)

7 years ago[3.6] bpo-27099: IDLE - Convert built-in extensions to regular features (GH-2494...
Terry Jan Reedy [Mon, 11 Sep 2017 00:30:46 +0000 (20:30 -0400)]
[3.6] bpo-27099: IDLE - Convert built-in extensions to regular features (GH-2494) (#3487)

About 10 IDLE features were implemented as supposedly optional
extensions.  Their different behavior could be confusing or worse for
users and not good for maintenance.  Hence the conversion.

The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly.  Now, editing a binding
in a keyset only affects its value in the keyset.  All bindings are
defined together in the system-specific default keysets in config-
extensions.def.  All custom keysets are saved as a whole in config-
extension.cfg.  All take effect as soon as one clicks Apply or Ok.

The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'.  Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.

Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
(cherry picked from commit 58fc71c)

7 years agobpo-29136: Fix versionchange for TLS 1.3 changes (#3483)
Christian Heimes [Sun, 10 Sep 2017 19:14:34 +0000 (21:14 +0200)]
bpo-29136: Fix versionchange for TLS 1.3 changes (#3483)

Thanks Arfrever!

Signed-off-by: Christian Heimes <christian@python.org>
7 years ago[3.6] bpo-31406: Fix crash due to lack of type checking in subclassing. (GH-3477...
Miss Islington (bot) [Sun, 10 Sep 2017 16:46:49 +0000 (09:46 -0700)]
[3.6] bpo-31406: Fix crash due to lack of type checking in subclassing. (GH-3477) (#3479)

(cherry picked from commit 3cedf46cdbeefc019f4a672c1104f3d5e94712bd)

7 years ago[3.6] Improve IncrementalEncoder documentation (GH-2746) (GH-3475)
Miss Islington (bot) [Sun, 10 Sep 2017 13:26:42 +0000 (06:26 -0700)]
[3.6] Improve IncrementalEncoder documentation (GH-2746) (GH-3475)

getstate and setstate are instance methods, same as encode and reset.
(cherry picked from commit 30644dee0c14af6c1c61d44166a97cec8245300b)

7 years ago[3.6] Clarify nature of parse_args 'args' argument. (GH-3292) (GH-3325)
R. David Murray [Sun, 10 Sep 2017 05:54:05 +0000 (01:54 -0400)]
[3.6] Clarify nature of parse_args 'args' argument. (GH-3292) (GH-3325)

Patch by Paul.j3.  Includes an unrelated but useful addition to the
optparse porting section.
(cherry picked from commit 0c7983e4adf9604d0ac93757a45d14be06c27696)

7 years ago[3.6] Make `json.dumps()` example to be PEP-8 compliant. (GH-3472) (GH-3473)
Miss Islington (bot) [Sat, 9 Sep 2017 17:26:49 +0000 (10:26 -0700)]
[3.6] Make `json.dumps()` example to be PEP-8 compliant. (GH-3472) (GH-3473)

(cherry picked from commit a7fbad96c8631070c1db137635d5bdd5e2aaac50)

7 years ago[3.6] bpo-31400: Improve SSL error handling on Windows (GH-3463) (#3466)
Christian Heimes [Sat, 9 Sep 2017 15:22:11 +0000 (08:22 -0700)]
[3.6] bpo-31400: Improve SSL error handling on Windows (GH-3463) (#3466)

* bpo-31392: Improve SSL error handling on Windows

* Remove unnecessary Windows mention in NEWS.
(cherry picked from commit e6eb48c10dc389d1d70657593de6a6cb3087d3d1)

7 years ago[3.6] bpo-26669: Fix nan arg value error in pytime.c (GH-3085) (GH-3467)
Miss Islington (bot) [Sat, 9 Sep 2017 04:53:04 +0000 (21:53 -0700)]
[3.6] bpo-26669: Fix nan arg value error in pytime.c (GH-3085) (GH-3467)

* Modify NaN check function and error message
* Fix pytime.c when arg is nan
* fix whitespace
(cherry picked from commit 829dacce4fca60fc3c3367980e75e21dfcdbe6be)

7 years ago[3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405)
Miss Islington (bot) [Fri, 8 Sep 2017 22:44:33 +0000 (15:44 -0700)]
[3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405)

(cherry picked from commit 34b54873b51a1ebee2a3c57b7205537b4f33128d)

7 years ago[3.6] Fixes reference leak (GH-3457) (#3460)
Miss Islington (bot) [Fri, 8 Sep 2017 21:26:27 +0000 (14:26 -0700)]
[3.6] Fixes reference leak (GH-3457) (#3460)

(cherry picked from commit af8d6b90723daa943c5cd0a38ee7564790d8687a)

7 years ago[3.6] bpo-31393: Fix the use of PyUnicode_READY(). (GH-3451). (#3453)
Serhiy Storchaka [Fri, 8 Sep 2017 07:43:54 +0000 (10:43 +0300)]
[3.6] bpo-31393: Fix the use of PyUnicode_READY(). (GH-3451). (#3453)

(cherry picked from commit e3b2b4b8d9e751b49e3550cb83ba39b54fdc377c)

7 years ago[3.6] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3444)
Christian Heimes [Fri, 8 Sep 2017 03:23:52 +0000 (20:23 -0700)]
[3.6] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3444)

* 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>.
(cherry picked from commit cb5b68abdeb1b1d56c581d5b4d647018703d61e3)

7 years ago[3.6] bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and PyEval_Eval...
Zackery Spytz [Fri, 8 Sep 2017 01:17:38 +0000 (19:17 -0600)]
[3.6] bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and PyEval_EvalCodeEx() (GH-2919) (#2964)

k + 1 was calculated with k = NULL..
(cherry picked from commit c6ea8974e2d939223bfd6d64ee13ec89c090d2e0)

7 years ago[3.6] bpo-31036: Allow sphinx and blurb to be found automatically (GH-3440) (#3441)
Miss Islington (bot) [Fri, 8 Sep 2017 00:38:31 +0000 (17:38 -0700)]
[3.6] bpo-31036: Allow sphinx and blurb to be found automatically (GH-3440) (#3441)

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.
(cherry picked from commit 590665c399fc4aa3c4a9f8e7104d43a02e9f3a0c)

7 years ago[3.6] bpo-27340: Use memoryview in SSLSocket.sendall() (GH-3384) (#3434)
Christian Heimes [Thu, 7 Sep 2017 23:59:17 +0000 (16:59 -0700)]
[3.6] bpo-27340: Use memoryview in SSLSocket.sendall() (GH-3384) (#3434)

* 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>.
(cherry picked from commit 888bbdc192ec4db888a294ef758cf5510442dc9a)

7 years ago[3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3432)
Christian Heimes [Thu, 7 Sep 2017 23:45:39 +0000 (16:45 -0700)]
[3.6] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3432)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 17c9ac9)

7 years ago[3.6] bpo-22635: Update the getstatusoutput docstring. (GH-3435) (#3439)
Miss Islington (bot) [Thu, 7 Sep 2017 23:44:58 +0000 (16:44 -0700)]
[3.6] bpo-22635: Update the getstatusoutput docstring. (GH-3435) (#3439)

To match the documentation updates already made.
Also renames the local variable used within to match
what it actually holds.
(cherry picked from commit 2eb0cb4787d02d995a9bb6dc075983792c12835c)

7 years ago[3.6] bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (GH-3229...
Miss Islington (bot) [Thu, 7 Sep 2017 21:27:44 +0000 (14:27 -0700)]
[3.6] bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (GH-3229) (#3430)

* Fix ZeroMQSocketListener and ZeroMQSocketHandler examples

* Use send_json and recv_json to simplify pyzmq interfacing

* Add News entry
(cherry picked from commit 586c0502b5eb9a39cabe0bc2707a8ff63114265c)

7 years ago[3.6] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. ...
Miss Islington (bot) [Thu, 7 Sep 2017 21:18:45 +0000 (14:18 -0700)]
[3.6] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (GH-3272) (GH-3429)

Also provide a solution if the user wants to keep multiple blank lines.
(cherry picked from commit 397c467c49385023de36411194d381ac993bae1a)

7 years ago[3.6] bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler GH-1632 (#3425)
Steve Dower [Thu, 7 Sep 2017 20:58:07 +0000 (13:58 -0700)]
[3.6] bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler GH-1632 (#3425)

7 years ago[3.6] fixes bpo-31373: fix undefined floating-point demotions (GH-3396) (#3424)
Miss Islington (bot) [Thu, 7 Sep 2017 18:35:03 +0000 (11:35 -0700)]
[3.6] fixes bpo-31373: fix undefined floating-point demotions (GH-3396) (#3424)

(cherry picked from commit a853a8ba7850381d49b284295dd6f0dc491dbe44)

7 years ago[3.6] bpo-30096: Use ABC in abc reference examples (GH-1220) (GH-3408)
Miss Islington (bot) [Thu, 7 Sep 2017 18:32:07 +0000 (11:32 -0700)]
[3.6] bpo-30096: Use ABC in abc reference examples (GH-1220) (GH-3408)

Use base class rather than metaclass in examples.
(cherry picked from commit 122e88a8354e3f75aeaf6211232dac88ac296d54)

7 years ago[3.6] Update multissl test helper (GH-3349) (#3415)
Christian Heimes [Thu, 7 Sep 2017 17:12:03 +0000 (10:12 -0700)]
[3.6] Update multissl test helper (GH-3349) (#3415)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit d3b9f97)

7 years agoAdd props file for nuget packages (#3410) (#3413)
Steve Dower [Thu, 7 Sep 2017 03:41:32 +0000 (20:41 -0700)]
Add props file for nuget packages (#3410) (#3413)

7 years agoLink to generated changelog, not website.
Ned Deily [Thu, 7 Sep 2017 03:07:43 +0000 (20:07 -0700)]
Link to generated changelog, not website.

7 years ago[3.6] bpo-22635: subprocess.getstatusoutput doc update. (GH-3398) (#3411)
Miss Islington (bot) [Thu, 7 Sep 2017 02:57:52 +0000 (19:57 -0700)]
[3.6] bpo-22635: subprocess.getstatusoutput doc update. (GH-3398) (#3411)

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.
(cherry picked from commit 738b7d9766e1a794aaaabfba0d515a467ba833ca)

7 years agobpo-30465: Fix lineno and col_offset in fstring AST nodes (GH-1800) (gh-3409)
Miss Islington (bot) [Thu, 7 Sep 2017 02:43:04 +0000 (19:43 -0700)]
bpo-30465: Fix lineno and col_offset in fstring AST nodes (GH-1800) (gh-3409)

For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.
(cherry picked from commit e7c566caf177afe43b57f0b2723e723d880368e8)

7 years ago[3.6] Update `make patchcheck` for blurb and NEWS.d (GH-3406)
Miss Islington (bot) [Thu, 7 Sep 2017 00:38:51 +0000 (17:38 -0700)]
[3.6] Update `make patchcheck` for blurb and NEWS.d (GH-3406)

(cherry picked from commit 1ba9469e9fdff0c52ba19b1e13a9c4b7235fc9eb)

7 years ago[3.6] bpo-21649: Add RFC 7525 and Mozilla server side TLS (GH-3387) (GH-3399)
Miss Islington (bot) [Thu, 7 Sep 2017 00:31:30 +0000 (17:31 -0700)]
[3.6] bpo-21649: Add RFC 7525 and Mozilla server side TLS (GH-3387) (GH-3399)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ad0ffa033ea79f7c7cb14b1b1cc10888ea9e9913)

7 years ago[3.6] bpo-30824: Add mimetype for .json (GH-3048) (#3401)
Miss Islington (bot) [Thu, 7 Sep 2017 00:04:14 +0000 (17:04 -0700)]
[3.6] bpo-30824: Add mimetype for .json (GH-3048) (#3401)

(cherry picked from commit 8204b903683f9e0f037ccfaa87622716019914d7)

7 years ago[3.6] bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017...
Steve Dower [Wed, 6 Sep 2017 22:55:25 +0000 (15:55 -0700)]
[3.6] bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (GH-3311) (#3386)

7 years ago[3.6] Fixes Tix build by correcting the directories used by Tcl and Tk. (GH-3391...
Miss Islington (bot) [Wed, 6 Sep 2017 22:00:26 +0000 (15:00 -0700)]
[3.6] Fixes Tix build by correcting the directories used by Tcl and Tk. (GH-3391) (#3392)

7 years ago[3.6] bpo-30737: Update DevGuide links to new URL (GH-3228) (GH-3390)
Miss Islington (bot) [Wed, 6 Sep 2017 21:29:04 +0000 (14:29 -0700)]
[3.6] bpo-30737: Update DevGuide links to new URL (GH-3228) (GH-3390)

Update old devguide links from https://docs.python.org/devguide to https://devguide.python.org
(cherry picked from commit 384899dfaeb83db38a6d3846d3cbc2f58a6605cd)

7 years ago[3.6] bpo-31178: Avoid concatenating bytes with str in subprocess error (GH-3066...
Gregory P. Smith [Wed, 6 Sep 2017 20:34:17 +0000 (13:34 -0700)]
[3.6] bpo-31178: Avoid concatenating bytes with str in subprocess error (GH-3066) (#3388)

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

7 years ago[3.6] Stop test_xmlrpc from writing to sys.stderr (GH-3359) (#3380)
Miss Islington (bot) [Wed, 6 Sep 2017 17:22:14 +0000 (10:22 -0700)]
[3.6] Stop test_xmlrpc from writing to sys.stderr (GH-3359) (#3380)

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>
(cherry picked from commit 3463ee3972e0d14351ee18bce60ecfbf7ac96772)

7 years ago[3.6] bpo-29781: Fix SSLObject.version before handshake (GH-3364) (#3381)
Christian Heimes [Wed, 6 Sep 2017 13:42:30 +0000 (06:42 -0700)]
[3.6] bpo-29781: Fix SSLObject.version before handshake (GH-3364) (#3381)

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

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 6877111)

7 years ago[3.6] _pickle: Fix whichmodule() (GH-3358) (#3361)
Christian Heimes [Wed, 6 Sep 2017 04:43:19 +0000 (21:43 -0700)]
[3.6] _pickle: Fix whichmodule() (GH-3358) (#3361)

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

Fix coverity report: CID 1417269.
(cherry picked from commit af46eb8)

7 years agobpo-31350: Optimize get_event_loop and _get_running_loop (GH-3347) (GH-3373)
Miss Islington (bot) [Wed, 6 Sep 2017 03:05:35 +0000 (20:05 -0700)]
bpo-31350: Optimize get_event_loop and _get_running_loop (GH-3347) (GH-3373)

* 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
(cherry picked from commit 80bbe6a7b67f33d0d0976bb8e3e5ba26b6b0e626)

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 ago[3.6] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (GH-2179) (GH-3370)
Mariatta [Wed, 6 Sep 2017 01:13:07 +0000 (18:13 -0700)]
[3.6] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (GH-2179) (GH-3370)

* 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
(cherry picked from commit faa57cbe7074b26807cd7ed89a7b173b5cbf3086)

7 years ago[3.6] bpo-31320: No traceback to sys.stderr in test_ssl (GH-3360) (GH-3369)
Miss Islington (bot) [Wed, 6 Sep 2017 01:11:31 +0000 (18:11 -0700)]
[3.6] bpo-31320: No traceback to sys.stderr in test_ssl (GH-3360) (GH-3369)

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>
(cherry picked from commit 305e56c27afce605e5d2f71903a966cf0bb95038)

7 years ago[3.6] Cache externals, depending on changes to PCbuild (GH-3308) (#3366)
Zachary Ware [Wed, 6 Sep 2017 01:01:33 +0000 (18:01 -0700)]
[3.6] Cache externals, depending on changes to PCbuild (GH-3308) (#3366)

(cherry picked from commit f801322e92384ef3eac2a9b7ac2c49d37102d0f3)

7 years ago[3.6] link to legacy doc on the non-legacy website (GH-3362) (#3368)
Benjamin Peterson [Wed, 6 Sep 2017 00:45:11 +0000 (17:45 -0700)]
[3.6] link to legacy doc on the non-legacy website (GH-3362) (#3368)

(cherry picked from commit 60dbed18509f99af8eaa685d9736f954b8d621fb)

7 years agobpo-30442: Skips refcount test in test_xml_etree under coverage (#1767) (#3363)
Victor Stinner [Wed, 6 Sep 2017 00:10:08 +0000 (02:10 +0200)]
bpo-30442: Skips refcount test in test_xml_etree under coverage (#1767) (#3363)

(cherry picked from commit 1de4705d00168afa8c5b6741af02e21fc609af58)

7 years agobpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315) (#3350)
Victor Stinner [Tue, 5 Sep 2017 23:30:22 +0000 (01:30 +0200)]
bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315) (#3350)

* 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.

(cherry picked from commit 759e30ec47048cb9835c62aaeac48748c8151390)

7 years agobpo-30445: Allow appended output in RecursionError message (#3356)
Victor Stinner [Tue, 5 Sep 2017 23:07:44 +0000 (01:07 +0200)]
bpo-30445: Allow appended output in RecursionError message (#3356)

Running under coverage sometimes causes 'in comparison' to be added to the end of the RecursionError message, which is acceptable.

Patched by Maria Mckinley

(cherry picked from commit 3480ef9dd3177be8c0d71a74853dca6e5b11fbe1)

7 years ago[3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769) (#1778)
Christian Heimes [Tue, 5 Sep 2017 20:43:05 +0000 (13:43 -0700)]
[3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769) (#1778)

Drop handshake_done and peer_cert members from PySSLSocket struct. The
peer certificate can be acquired from *SSL directly.
SSL_get_peer_certificate() does not trigger any network activity.
Instead of manually tracking the handshake state, simply use
SSL_is_init_finished().

In combination these changes fix auto-handshake for non-blocking
MemoryBIO connections.

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 66dc33b6822be93f85d84d24d3f9159ff568fbbb)

7 years ago[3.6] bpo-30502: Fix handling of long oids in ssl. (GH-2909) (#3321)
Christian Heimes [Tue, 5 Sep 2017 17:13:03 +0000 (19:13 +0200)]
[3.6] bpo-30502: Fix handling of long oids in ssl. (GH-2909) (#3321)

(cherry picked from commit e503ca52889bf66ac502702569e726caa7970299)

7 years ago[3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342)
Christian Heimes [Tue, 5 Sep 2017 15:12:03 +0000 (17:12 +0200)]
[3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342)

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>
(cherry picked from commit c941e62)