]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 years ago[2.7] bpo-38338, test.pythoninfo: add more ssl infos (GH-16543)
Victor Stinner [Wed, 2 Oct 2019 16:36:32 +0000 (18:36 +0200)] 
[2.7] bpo-38338, test.pythoninfo: add more ssl infos (GH-16543)

test.pythoninfo now logs environment variables used by OpenSSL and
Python ssl modules, and logs attributes of 3 SSL contexts
(SSLContext, default HTTPS context, stdlib context).

(cherry picked from commit 1df1c2f8df53d005ff47af81aa02c58752b84e20)

6 years ago[2.7] bpo-38243: Escape the server title of DocXMLRPCServer (GH-16447)
Dong-hee Na [Tue, 1 Oct 2019 10:58:01 +0000 (19:58 +0900)] 
[2.7] bpo-38243: Escape the server title of DocXMLRPCServer (GH-16447)

Escape the server title of DocXMLRPCServer.DocXMLRPCServer
when rendering the document page as HTML.

6 years ago[2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446...
Jesús Cea [Sat, 28 Sep 2019 03:09:24 +0000 (05:09 +0200)] 
[2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446). (#16454)

(cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1)

Co-authored-by: Jesús Cea <jcea@jcea.es>
6 years agobpo-38174 follow up: Remove loadlibrary.c from VS9.0. (GH-16411)
Benjamin Peterson [Thu, 26 Sep 2019 05:07:09 +0000 (22:07 -0700)] 
bpo-38174 follow up: Remove loadlibrary.c from VS9.0. (GH-16411)

6 years ago[2.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16408)
Benjamin Peterson [Thu, 26 Sep 2019 04:49:04 +0000 (21:49 -0700)] 
[2.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16408)

Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b940803860e37bcc3f6096b2d24e7c20a0e807)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agocloses bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)
Miss Islington (bot) [Tue, 24 Sep 2019 02:31:25 +0000 (19:31 -0700)] 
closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)

(cherry picked from commit 4346bad3321699d49a45e3446270b57726ab5c8f)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
6 years agobpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236)
Miss Islington (bot) [Wed, 18 Sep 2019 10:36:57 +0000 (03:36 -0700)] 
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236)

A little change on first paragraph of python tutorial to be more clearly

https://bugs.python.org/issue37904

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit b57481318e3e3cbacd398b898f9849ec8f2d7eec)

Co-authored-by: Diego Alberto Barriga Martínez <diegobarriga@protonmail.com>
6 years ago[2.7] bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155...
Serhiy Storchaka [Tue, 17 Sep 2019 06:56:27 +0000 (09:56 +0300)] 
[2.7] bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155). (GH-16215)

(cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12)

6 years agobpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)
Miss Islington (bot) [Mon, 16 Sep 2019 19:48:21 +0000 (12:48 -0700)] 
bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)

``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``.

https://bugs.python.org/issue33936
(cherry picked from commit 724f1a57231f9287c37255adf0e4364d12cf693d)

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-38117: Updates bundled OpenSSL to 1.0.2t (GH-16178)
Steve Dower [Mon, 16 Sep 2019 12:07:40 +0000 (13:07 +0100)] 
bpo-38117: Updates bundled OpenSSL to 1.0.2t (GH-16178)

6 years ago[2.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH...
Xiang Zhang [Mon, 16 Sep 2019 07:07:32 +0000 (15:07 +0800)] 
[2.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16176)

(cherry picked from commit 56a4514)

Co-authored-by: Hai Shi shihai1992@gmail.com
https://bugs.python.org/issue38168

6 years agobpo-38117: Updated OpenSSL to 1.0.2t in macOS installer for 2.7.x. (GH-16171)
Ned Deily [Mon, 16 Sep 2019 03:35:55 +0000 (04:35 +0100)] 
bpo-38117: Updated OpenSSL to 1.0.2t in macOS installer for 2.7.x. (GH-16171)

6 years ago[2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006)
Roberto C. Sánchez [Sat, 14 Sep 2019 17:26:38 +0000 (13:26 -0400)] 
[2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006)

This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address.

(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9)

Excludes changes to Lib/email/_header_value_parser.py, which did not
exist in 2.7.

Co-authored-by: jpic <jpic@users.noreply.github.com>
https://bugs.python.org/issue34155

6 years ago[2.7] bpo-35264: Modules/_ssl.c: fix build with OpenSSL 1.1.0 (GH-10570)
Alexandru Ardelean [Wed, 11 Sep 2019 17:23:28 +0000 (20:23 +0300)] 
[2.7] bpo-35264: Modules/_ssl.c: fix build with OpenSSL 1.1.0 (GH-10570)

Fixes a build error with OpenSSL 1.1.0. There is already code in the
`_ssl.c` that handles all the weird cases of the NPN config macros (with
various OpenSSL & LibreSSL versions).
That code will provide a HAVE_NPN variable, which should be used in the
rest of the code to check whether (or what) to compile regarding NPN.

This change adds HAVE_NPN in the remaining places where it should have been
placed.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
https://bugs.python.org/issue35264

6 years agocloses bpo-36712: Fix duplicate method in Lib/email/test/test_email_renamed.py. ...
Zackery Spytz [Wed, 11 Sep 2019 13:26:07 +0000 (07:26 -0600)] 
closes bpo-36712: Fix duplicate method in Lib/email/test/test_email_renamed.py. (GH-14800)

6 years agocloses bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801)
Zackery Spytz [Wed, 11 Sep 2019 13:22:08 +0000 (07:22 -0600)] 
closes bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801)

6 years agobpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-15822)
Zackery Spytz [Wed, 11 Sep 2019 09:39:34 +0000 (03:39 -0600)] 
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-15822)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag
without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are
insert sequences in the message definition.
(cherry picked from commit a656365)

6 years ago[2.7] bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15808)
Benjamin Peterson [Mon, 9 Sep 2019 17:09:58 +0000 (10:09 -0700)] 
[2.7] bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15808)

The link we have points to the version from Unicode 6.0.0, dated 2010.
There have been numerous updates to it since then:
  https://www.unicode.org/reports/tr44/GH-Modifications

Change the link to one that points to the current version. Also, use HTTPS..
(cherry picked from commit 64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25)

Co-authored-by: Greg Price <gnprice@gmail.com>
6 years ago[2.7] bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) (GH...
Serhiy Storchaka [Mon, 9 Sep 2019 09:38:05 +0000 (12:38 +0300)] 
[2.7] bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) (GH-15740)

RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b3277f9fcf7f91e66c23321caa1245d)

6 years agocloses bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH...
Miss Islington (bot) [Wed, 28 Aug 2019 17:36:18 +0000 (10:36 -0700)] 
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)

https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee07501e1468082b3237620e4ecd75c5da6)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
6 years agobpo-34521: Fix FD transfer in multiprocessing on FreeBSD (GH-15422)
Victor Stinner [Fri, 23 Aug 2019 13:00:38 +0000 (14:00 +0100)] 
bpo-34521: Fix FD transfer in multiprocessing on FreeBSD (GH-15422)

Fix file descriptors transfer in multiprocessing on FreeBSD: use
CMSG_SPACE() rather than CMSG_LEN(); see RFC 3542.

6 years agotest_multiprocessing removes temporary files (GH-15421)
Victor Stinner [Fri, 23 Aug 2019 12:59:40 +0000 (13:59 +0100)] 
test_multiprocessing removes temporary files (GH-15421)

(cherry picked from commit d0b10a64351069aa9246d40cb8bd207cc9209cee)

6 years agobpo-37823: Fix open() link in telnetlib doc (GH-15281)
Miss Islington (bot) [Wed, 21 Aug 2019 11:52:05 +0000 (04:52 -0700)] 
bpo-37823: Fix open() link in telnetlib doc (GH-15281)

Fixed wrong link to Telnet.open() method in telnetlib documentation.
(cherry picked from commit e0b6117e2723327d6741d0aa599408514add5b30)

Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
6 years agobpo-35518: Skip test that relies on a deceased network service. (GH-15349)
Miss Islington (bot) [Wed, 21 Aug 2019 04:12:18 +0000 (21:12 -0700)] 
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)

If this service had thoroughly vanished, we could just ignore the
test until someone gets around to either recreating such a service
or redesigning the test to somehow work locally.  The
`support.transient_internet` mechanism catches the failure to
resolve the domain name, and skips the test.

But in fact the domain snakebite.net does still exist, as do its
nameservers -- and they can be quite slow to reply.  As a result
this test can easily take 20-30s before it gets auto-skipped.

So, skip the test explicitly up front.
(cherry picked from commit 5b95a1507e349da5adae6d2ab57deac3bdd12f15)

Co-authored-by: Greg Price <gnprice@gmail.com>
6 years ago[2.7] bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs... 15162/head
David H [Mon, 5 Aug 2019 09:19:26 +0000 (10:19 +0100)] 
[2.7] bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062). (GH-15133)

(cherry picked from commit ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7)

Co-authored-by: David H <dheiberg@mozilla.com>
6 years agocloses bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than...
Miss Islington (bot) [Wed, 24 Jul 2019 23:59:31 +0000 (16:59 -0700)] 
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)

(cherry picked from commit 93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agobpo-34369: make kqueue.control() docs better reflect that timeout is positional-only...
Miss Islington (bot) [Thu, 11 Jul 2019 14:17:08 +0000 (07:17 -0700)] 
bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499)

(cherry picked from commit 79042ac4348ccc09344014f20dd49401579f8795)

Co-authored-by: Tal Einat <taleinat@gmail.com>
6 years agoDocument default parameter of .seek() in the signature. (GH-14691)
Miss Islington (bot) [Thu, 11 Jul 2019 02:49:59 +0000 (19:49 -0700)] 
Document default parameter of .seek() in the signature. (GH-14691)

(cherry picked from commit 2a3d4d9c53dd4831c3ecf56bc7c4a289c33030d6)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agobpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) 14689/head
Miss Islington (bot) [Sun, 7 Jul 2019 15:59:14 +0000 (08:59 -0700)] 
bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)

(cherry picked from commit f6cdd3ff687ebbf8209d793a18a042ea495c4aeb)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
6 years agobpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626)
Miss Islington (bot) [Sat, 6 Jul 2019 21:55:41 +0000 (14:55 -0700)] 
bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626)

0 is a legal index.
(cherry picked from commit f8709e804d16ec5d44b1d2f00d59a0f78df7b792)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Miss Islington (bot) [Sat, 6 Jul 2019 07:04:53 +0000 (00:04 -0700)] 
bpo-37149: Replace dead link for online Tkinter reference  (GH-14616)

Also fix a name misspelling.
(cherry picked from commit 45bc61b97178b27ae05bd3eb95481bf0325795bb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agoPut pyexpatns.h include back. bpo-37437 (GH-14539) 14591/head
Miss Islington (bot) [Tue, 2 Jul 2019 05:38:31 +0000 (22:38 -0700)] 
Put pyexpatns.h include back. bpo-37437 (GH-14539)

(cherry picked from commit 2cd07920bb7d2d319999394092190f37935dc421)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agobpo-19960: Fix building of zlib on macOS without installed headers (GH-14257)
Ned Deily [Mon, 1 Jul 2019 23:15:09 +0000 (19:15 -0400)] 
bpo-19960: Fix building of zlib on macOS without installed headers (GH-14257)

When building 2.7 on macOS without system header files installed in
``/usr/include``, a few extension modules dependent on system-supplied
third-party libraries were not being built, most notably zlib.
This situation arose in the past when building without the Command
Line Tools and the option to install header files in the traditional
system locations (like /usr/include).  As of macOS 10.14, the
header files are only available in an SDK so the problem addressed
here affects most 2.7 builds.

6 years ago[2.7] bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469) (GH-14475)
Miss Islington (bot) [Sun, 30 Jun 2019 04:41:55 +0000 (21:41 -0700)] 
[2.7] bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469) (GH-14475)

* Added documentation for textwrap.dedent behavior.
(cherry picked from commit eb97b9211e7c99841d6cae8c63893b3525d5a401)

Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>
https://bugs.python.org/issue30754

6 years ago[2.7] bpo-37329: valgrind: ignore _PyWarnings_Init false alarms (GH-14202)
Victor Stinner [Fri, 28 Jun 2019 16:13:33 +0000 (18:13 +0200)] 
[2.7] bpo-37329: valgrind: ignore _PyWarnings_Init false alarms (GH-14202)

_PyWarnings_Init() only allocates memory once at startup but it is
not released at exit. Ignore this issue to be able to catch other
bugs more easily.

6 years agocloses bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)
Miss Islington (bot) [Fri, 28 Jun 2019 04:24:52 +0000 (21:24 -0700)] 
closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)

(cherry picked from commit 3b03b09fc94425915c5b1225e9200a3a95bc827b)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years ago[2.7] bpo-37411: Rewrite test_wsgiref.testEnviron() (GH-14394) (GH-14404)
Miss Islington (bot) [Wed, 26 Jun 2019 20:54:27 +0000 (13:54 -0700)] 
[2.7] bpo-37411: Rewrite test_wsgiref.testEnviron() (GH-14394) (GH-14404)

Fix test_wsgiref.testEnviron() to no longer depend on the environment
variables (don't fail if "X" variable is set).

testEnviron() now overrides os.environ to get a deterministic
environment. Test full TestHandler.environ content: not only a few
selected variables.
(cherry picked from commit 5150d327924959639215ed0a78feffc0d88258da)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-37396, PCbuild: Include "_d" in "Killing any running ..." message (GH-14370)
Victor Stinner [Tue, 25 Jun 2019 11:37:16 +0000 (13:37 +0200)] 
bpo-37396, PCbuild: Include "_d" in "Killing any running ..." message (GH-14370)

Add $(PyDebugExt) in "Killing any running python$(PyDebugExt).exe
instances...".

6 years agobpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14182)
animalize [Mon, 24 Jun 2019 23:27:03 +0000 (07:27 +0800)] 
bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14182)

6 years agobpo-37124: Fix reference leak in test_msilib (GH-13750) (GH-14340)
Victor Stinner [Mon, 24 Jun 2019 14:09:49 +0000 (16:09 +0200)] 
bpo-37124: Fix reference leak in test_msilib (GH-13750) (GH-14340)

(cherry picked from commit c0295dba259accc4b247beb22a0b2cc2f31d9850)

6 years agobpo-37359: Add --cleanup option to python3 -m test (GH-14332) (GH-14333)
Victor Stinner [Mon, 24 Jun 2019 11:21:18 +0000 (13:21 +0200)] 
bpo-37359: Add --cleanup option to python3 -m test (GH-14332) (GH-14333)

* regrtest: Add --cleanup option to remove "test_python_*" directories
  of previous failed test jobs.
* Add "make cleantest" to run "python -m test --cleanup".

(cherry picked from commit 47fbc4e45b35b3111e2d947a66490a43ac21d363)

6 years agoImprove threading.daemon docstring (GH-14278)
Miss Islington (bot) [Sun, 23 Jun 2019 19:08:28 +0000 (12:08 -0700)] 
Improve threading.daemon docstring (GH-14278)

Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.htmlGH-thread-objects.
(cherry picked from commit bb110cc2ed81447fb48805f31146cf31323a8fc3)

Co-authored-by: mbarkhau <mbarkhau@gmail.com>
6 years agobpo-37362: test_gdb now ignores stderr (GH-14287) (GH-14297)
Victor Stinner [Fri, 21 Jun 2019 21:58:53 +0000 (23:58 +0200)] 
bpo-37362: test_gdb now ignores stderr (GH-14287) (GH-14297)

test_gdb no longer fails if it gets an "unexpected" message on
stderr: it now ignores stderr. The purpose of test_gdb is to test
that python-gdb.py commands work as expected, not to test gdb.

(cherry picked from commit e56a123fd0acaa295a28b98d2e46d956b97d1263)

6 years agobpo-36231: Support building on macOS without /usr/include (GH-13773) (GH-14256)
Ned Deily [Thu, 20 Jun 2019 05:59:54 +0000 (01:59 -0400)] 
bpo-36231: Support building on macOS without /usr/include (GH-13773) (GH-14256)

6 years ago[2.7] Fix name of '\0'. (GH-14225)
Benjamin Peterson [Wed, 19 Jun 2019 06:03:35 +0000 (23:03 -0700)] 
[2.7] Fix name of '\0'. (GH-14225)

'\0' is the NUL byte not NULL..
(cherry picked from commit 7821b4c6d29933511d50bb42255e39790c6abf00)

6 years agobpo-34631: Updated OpenSSL to 1.0.2s in macOS installer. (GH-14198)
Ned Deily [Tue, 18 Jun 2019 10:48:53 +0000 (06:48 -0400)] 
bpo-34631: Updated OpenSSL to 1.0.2s in macOS installer. (GH-14198)

6 years ago[2.7] bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14183)
animalize [Tue, 18 Jun 2019 09:59:53 +0000 (17:59 +0800)] 
[2.7] bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14183)

6 years ago[2.7] Update link in colorsys docs to be https (GH-14062) (GH-14110)
Alex Gaynor [Tue, 18 Jun 2019 01:41:44 +0000 (21:41 -0400)] 
[2.7] Update link in colorsys docs to be https (GH-14062) (GH-14110)

6 years agobpo-34631: Updated OpenSSL to 1.0.2s in Windows installer (GH-14161)
Steve Dower [Mon, 17 Jun 2019 16:33:11 +0000 (09:33 -0700)] 
bpo-34631: Updated OpenSSL to 1.0.2s in Windows installer (GH-14161)

6 years ago[2.7] Fix 2.7 test -R test_IDLE failure on Windows (GH-13958)
Terry Jan Reedy [Sun, 16 Jun 2019 20:36:23 +0000 (16:36 -0400)] 
[2.7] Fix 2.7 test -R test_IDLE failure on Windows (GH-13958)

Cherry-picked from 66d47da.

6 years ago[2.7] bpo-35647: Fix path check in cookiejar. (GH-11436) (GH-13427)
Xtreak [Sat, 15 Jun 2019 16:29:29 +0000 (21:59 +0530)] 
[2.7] bpo-35647: Fix path check in cookiejar. (GH-11436) (GH-13427)

6 years ago[2.7] bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258)...
Xtreak [Sat, 15 Jun 2019 15:29:43 +0000 (20:59 +0530)] 
[2.7] bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258) (GH-13426)

This is a manual backport of ca7fe5063593958e5efdf90f068582837f07bd14 since 2.7 has `http.cookiejar` in `cookielib`

https://bugs.python.org/issue35121

6 years ago[2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937)
Victor Stinner [Tue, 11 Jun 2019 10:45:35 +0000 (12:45 +0200)] 
[2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937)

If urlparse.urlsplit() detects an invalid netloc according to NFKC
normalization, the error message type is now str rather than unicode,
and use repr() to format the URL, to prevent <exception str() failed>
when display the error message.

6 years ago[2.7] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3. (GH-9626)
Dimitri John Ledkov [Sun, 9 Jun 2019 05:44:57 +0000 (06:44 +0100)] 
[2.7] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3. (GH-9626)

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
https://bugs.python.org/issue34836

6 years ago[2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906)
Eric Wieser [Sat, 8 Jun 2019 09:19:24 +0000 (02:19 -0700)] 
[2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906)

6 years ago[2.7] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860...
Zackery Spytz [Fri, 7 Jun 2019 16:22:57 +0000 (10:22 -0600)] 
[2.7] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13898)

(cherry picked from commit dc2476500d91082f0c907772c83a044bf49af279)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years ago[2.7] bpo-37177: make IDLE's search dialogs transient (GH-13869)
Tal Einat [Fri, 7 Jun 2019 06:53:05 +0000 (09:53 +0300)] 
[2.7] bpo-37177: make IDLE's search dialogs transient (GH-13869)

This avoids the search dialogs being hidden behind the editor window.

(cherry picked from commit 554450fb4e95066e825bdb4a2d544a490daeebdc)

6 years agoUpdate outdated reference to Mercurial (GH-12857)
Anthony Sottile [Wed, 5 Jun 2019 00:19:36 +0000 (17:19 -0700)] 
Update outdated reference to Mercurial (GH-12857)

6 years agoDoc: Python 3.9 in sidebar and version switcher. (GH-13824)
Miss Islington (bot) [Tue, 4 Jun 2019 23:21:08 +0000 (16:21 -0700)] 
Doc: Python 3.9 in sidebar and version switcher. (GH-13824)

(cherry picked from commit 59e7bbcaa4d0d556591f774c5ea4869c41fa95b0)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agobpo-36742: Corrects fix to handle decomposition in usernames (GH-13812)
Steve Dower [Tue, 4 Jun 2019 16:40:16 +0000 (09:40 -0700)] 
bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812)

6 years agoFix variable name copy/paste error in build-installer.py (GH-13038)
Miss Islington (bot) [Mon, 3 Jun 2019 03:39:38 +0000 (20:39 -0700)] 
Fix variable name copy/paste error in build-installer.py (GH-13038)

(cherry picked from commit d337169156933eaf732566bf29eb968549ada5e8)

Co-authored-by: cclauss <cclauss@me.com>
6 years ago[2.7] bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None...
Miss Islington (bot) [Fri, 31 May 2019 22:39:39 +0000 (15:39 -0700)] 
[2.7] bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)

* bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)

msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
(cherry picked from commit c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years ago[2.7] bpo-33071: remove outdated PyPI docs (GH-13087) (GH-13584)
Hai Shi [Wed, 29 May 2019 17:05:26 +0000 (01:05 +0800)] 
[2.7] bpo-33071: remove outdated PyPI docs (GH-13087) (GH-13584)

Patch by Kojo Idrissa.
(cherry picked from commit 1b4abcf302ff2c8f4d4881294510d48ba5186b53)

Co-authored-by: Kojo Idrissa <kojoidrissa@users.noreply.github.com>
https://bugs.python.org/issue33071

6 years ago[2.7] bpo-33006 - Correct filter doc string to clarify 2nd argument can be iterable...
Tony Flury [Wed, 29 May 2019 01:36:04 +0000 (02:36 +0100)] 
[2.7] bpo-33006 - Correct filter doc string to clarify 2nd argument can be iterable (GH-6015)

https://bugs.python.org/issue33006

6 years agobpo-26423: Fix test_descr.test_wrap_lenfunc_bad_cast() on 32-bit Windows (GH-13629)
Victor Stinner [Tue, 28 May 2019 16:15:30 +0000 (18:15 +0200)] 
bpo-26423: Fix test_descr.test_wrap_lenfunc_bad_cast() on 32-bit Windows (GH-13629)

Skip the test if xrange(sys.maxsize) raises an OverflowError.

6 years agobpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606) (GH-13625)
Victor Stinner [Tue, 28 May 2019 15:23:07 +0000 (17:23 +0200)] 
bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606) (GH-13625)

Fix possible overflow in wrap_lenfunc() when
sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).

(cherry picked from commit 05f16416d99dc9fc76fef11e56f16593e7a5955e)

6 years agobpo-35907: Clarify the NEWS entry (GH-13557)
Victor Stinner [Fri, 24 May 2019 21:28:56 +0000 (23:28 +0200)] 
bpo-35907: Clarify the NEWS entry (GH-13557)

6 years agobpo-36713: Rename duplicated method in test_unicode. (#13525)
Michele Angrisano [Thu, 23 May 2019 14:42:50 +0000 (16:42 +0200)] 
bpo-36713: Rename duplicated method in test_unicode. (#13525)

modified:   Lib/ctypes/test/test_unicode.py
  modified:   Misc/ACKS
  new file:   Misc/NEWS.d/next/Library/2019-05-23-15-57-36.bpo-36713.sjPhnf.rst

6 years agobpo-35907: Complete test_urllib.test_local_file_open() (GH-13506)
Victor Stinner [Wed, 22 May 2019 21:28:03 +0000 (23:28 +0200)] 
bpo-35907: Complete test_urllib.test_local_file_open() (GH-13506)

Test also URLopener().open(), URLopener().retrieve(), and
DummyURLopener().retrieve().

6 years agobpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-11842)
SH [Tue, 21 May 2019 21:12:23 +0000 (06:12 +0900)] 
bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme  (GH-11842)

 CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL scheme in urllib.urlopen().

6 years agobpo-30458: Disallow control chars in http URLs (GH-12755) (GH-13154) (GH-13315)
Victor Stinner [Tue, 21 May 2019 13:12:33 +0000 (15:12 +0200)] 
bpo-30458: Disallow control chars in http URLs (GH-12755) (GH-13154) (GH-13315)

Disallow control chars in http URLs in urllib2.urlopen.  This
addresses a potential security problem for applications that do not
sanity check their URLs where http request headers could be injected.

Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when
python is built without SSL to fix test failures.

Use httplib.InvalidURL instead of ValueError as the new error case's
exception. (GH-13044)

Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>

(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619)

Notes on backport to Python 2.7:

* test_urllib tests urllib.urlopen() which quotes the URL and so is
  not vulerable to HTTP Header Injection.
* Add tests to test_urllib2 on urllib2.urlopen().
* Reject non-ASCII characters: range 0x80-0xff.

6 years ago[2.7] Update idlelib NEWS.txt for 2.7 (GH-13436)
Terry Jan Reedy [Mon, 20 May 2019 02:35:21 +0000 (22:35 -0400)] 
[2.7] Update idlelib NEWS.txt for 2.7 (GH-13436)

6 years agocloses bpo-36951: Correct some types in the type_members struct in typeobject.c....
Miss Islington (bot) [Mon, 20 May 2019 00:49:50 +0000 (17:49 -0700)] 
closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403)

(cherry picked from commit 53d378c81286644138415cb56da52a7351e1a477)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agocloses bpo-36755: Suppress noisy error output in test HTTPS server by default. (GH...
Benjamin Peterson [Fri, 17 May 2019 18:29:38 +0000 (11:29 -0700)] 
closes bpo-36755: Suppress noisy error output in test HTTPS server by default. (GH-13370)

TLS 1.3 has a more efficient handshake protocol. The client can reject the server's credentials and close the connection before the server has even finished writing out all of its initial data. Depending on whether the server finishes writing the rest of its handshake before the it sees the connection is reset, the server will read an empty line or see a ECONNRESET OSError. Nothing is really wrong here with the server or client, so just suppress the error output in the OSError case to fix the test.

This fix isn't required in Python 3 because clients that reject the server's certificate will shut down the TLS layer before closing the TCP connection.

7 years agobpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) (GH-13319)
Victor Stinner [Wed, 15 May 2019 14:31:10 +0000 (16:31 +0200)] 
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) (GH-13319)

(cherry picked from commit f0be4bbb9b3cee876249c23f2ae6f38f43fa7495)

7 years ago[2.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (GH...
Terry Jan Reedy [Mon, 13 May 2019 22:29:15 +0000 (18:29 -0400)] 
[2.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (GH-13293)

7 years ago[2.7] bpo-35925: Skip SSL tests that fail due to weak external certs or old TLS ...
Gregory P. Smith [Mon, 13 May 2019 20:16:34 +0000 (13:16 -0700)] 
[2.7] bpo-35925: Skip SSL tests that fail due to weak external certs or old TLS (GH-13124) (GH-13253)

Modern Linux distros such as Debian Buster have default OpenSSL system
configurations that reject connections to servers with weak certificates
by default. This causes our test suite run with external networking
resources enabled to skip these tests when they encounter such a
failure.

Fixing the network servers is a separate issue.
(cherry picked from commit 2cc0223)

Changes to test_ssl.py required as 2.7 has legacy protocol tests.

The test_httplib.py change is omitted from this backport as
self-signed.pythontest.net's certificate was updated and the
test_nntplib.py change is not applicable on 2.7.

Authored-by: Gregory P. Smith greg@krypto.org
7 years ago[2.7] closes bpo-14353: Fix detection of bind_textdomain_codeset in libintl. (GH...
Toshio Kuratomi [Sun, 12 May 2019 20:47:19 +0000 (16:47 -0400)] 
[2.7] closes bpo-14353: Fix detection of bind_textdomain_codeset in libintl. (GH-13265)

In Python-2.7, we were only searching for bind_textdomain_codeset in
libc.  We should have also checked for it in libintl.  This change from
Mel Flynn https://bugs.python.org/file24918/python27-configure.in.patch
fixes that.

7 years ago[2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13199)
Gregory P. Smith [Thu, 9 May 2019 00:53:15 +0000 (18:53 -0600)] 
[2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13199)

* [2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192)

We updated the server, our testsuite must match.

https://bugs.python.org/issue36816

✈️ CLE -> DEN ✈️ #pycon2019 #beyonce
(cherry picked from commit 6bd81734de0b73f1431880d6a75fb71bcbc65fa1)

The 2.7 tree also needed a certificate in the capath directory updated.
The filename for that was determined by `openssl x509 -in $cert.pem -subject_hash`.

Authored-by: Gregory P. Smith <greg@krypto.org>
7 years ago[2.7] bpo-24712: Doc: Make sidebar sticky using browser support. (GH-13179)
Julien Palard [Wed, 8 May 2019 13:32:08 +0000 (15:32 +0200)] 
[2.7] bpo-24712: Doc: Make sidebar sticky using browser support. (GH-13179)

Patch by Mike Taylor.

7 years ago[2.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH...
Zackery Spytz [Thu, 2 May 2019 19:29:22 +0000 (13:29 -0600)] 
[2.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH-13063)

(cherry picked from commit c4e78b116f9a4299f3b3bfbbd18ef49782bb1143)

7 years agoChange bisect to bisect_cmd in docstring (GH-13040)
Miss Islington (bot) [Thu, 2 May 2019 03:01:41 +0000 (20:01 -0700)] 
Change bisect to bisect_cmd in docstring (GH-13040)

(cherry picked from commit 11e4a941e9c6225776a986b05230a1963e83f4fb)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
7 years agobpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)
Steve Dower [Wed, 1 May 2019 15:00:27 +0000 (15:00 +0000)] 
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)

7 years agocloses bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)
Miss Islington (bot) [Tue, 30 Apr 2019 02:25:35 +0000 (19:25 -0700)] 
closes bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)

(cherry picked from commit ee0309f3d83ab9ffa02542bcf45ece84f4fb265e)

Co-authored-by: Utkarsh Gupta <guptautkarsh2102@gmail.com>
7 years agobpo-35952: Sync test.pythoninfo from master (GH-13010)
Victor Stinner [Mon, 29 Apr 2019 13:20:38 +0000 (15:20 +0200)] 
bpo-35952: Sync test.pythoninfo from master (GH-13010)

7 years agobpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) (GH-12949)
Victor Stinner [Thu, 25 Apr 2019 11:16:02 +0000 (13:16 +0200)] 
bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) (GH-12949)

bpo-28552, bpo-7774: Fix distutils.sysconfig if sys.executable is
None or an empty string: use os.getcwd() to initialize project_base.

Fix also the distutils build command: don't use sys.executable if
it's evaluated as false (None or empty string).

7 years ago[2.7] bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) ...
Zackery Spytz [Mon, 22 Apr 2019 23:35:55 +0000 (17:35 -0600)] 
[2.7] bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (GH-12916)

(cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5)

https://bugs.python.org/issue9194

7 years agobpo-36605: make tags: parse Modules/_io directory (GH-12789) (GH-12815) 12873/head
Victor Stinner [Sat, 13 Apr 2019 00:50:24 +0000 (02:50 +0200)] 
bpo-36605: make tags: parse Modules/_io directory (GH-12789) (GH-12815)

"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.

(cherry picked from commit 21a74a9d77c5ac628808b9faace18b824ca056f7)

7 years agobpo-34652: Use AC_CHECK_FUNCS for lchmod. (GH-12799)
Joshua Root [Fri, 12 Apr 2019 15:51:35 +0000 (01:51 +1000)] 
bpo-34652: Use AC_CHECK_FUNCS for lchmod. (GH-12799)

A fix for 69e96910153219b0b15a18323b917bd74336d229, which resulted in lchmod being disabled on all platforms, not just Linux.

(cherry picked from commit ed709d5699716bf7237856dc20aba321e2dfff6d)

7 years agobpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12751)
Victor Stinner [Tue, 9 Apr 2019 17:54:10 +0000 (19:54 +0200)] 
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12751)

Set CUSTOMIZED_OSX_COMPILER to True to disable
_osx_support.customize_compiler().

7 years agobpo-36560: Fix reference leak hunting in regrtest (GH-12744) (GH-12745)
Victor Stinner [Tue, 9 Apr 2019 16:01:17 +0000 (18:01 +0200)] 
bpo-36560: Fix reference leak hunting in regrtest (GH-12744) (GH-12745)

Fix reference leak hunting in regrtest: compute also deltas (of
reference count and file descriptor count) during warmup, to ensure
that everything is initialized before starting to hunt reference
leaks.

Other changes:

* Replace gc.collect() with support.gc_collect() in clear_caches()
* dash_R() is now more quiet with --quiet option (don't display
  progress).
* Precompute the full range for "for it in range(repcount):" to
  ensure that the iteration doesn't allocate anything new.
* dash_R() now is responsible to call warm_caches().

(cherry picked from commit 5aaac94eeb44697e92b0951385cd557bc27e0f6a)

7 years agobpo-30134: fix BytesWarning doc, docstring and message (GH-12739)
Inada Naoki [Tue, 9 Apr 2019 12:49:49 +0000 (21:49 +0900)] 
bpo-30134: fix BytesWarning doc, docstring and message (GH-12739)

7 years agobpo-30134: add BytesWarning in warnings.rst (GH-12738)
Inada Naoki [Tue, 9 Apr 2019 07:00:51 +0000 (16:00 +0900)] 
bpo-30134: add BytesWarning in warnings.rst (GH-12738)

7 years agobpo-30134: add an explanation of BytesWarning (GH-1249)
cocoatomo [Tue, 9 Apr 2019 05:43:11 +0000 (14:43 +0900)] 
bpo-30134: add an explanation of BytesWarning (GH-1249)

7 years agobpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660...
Zackery Spytz [Wed, 3 Apr 2019 18:59:51 +0000 (12:59 -0600)] 
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660) (GH-12678)

(cherry picked from commit 487b73ab39c80157474821ef9083f51e0846bd62)

7 years agobpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). ...
Zackery Spytz [Sun, 31 Mar 2019 17:14:16 +0000 (11:14 -0600)] 
bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106) (GH-12643)

(cherry picked from commit 5f2c50810a67982b0c80f6d3258fee3647f67005)

7 years agobpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)
Miss Islington (bot) [Thu, 28 Mar 2019 14:44:21 +0000 (07:44 -0700)] 
bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)

Remove the PyMem_FREE() call added in cb90c89.  The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.
(cherry picked from commit cda139d1ded6708665b53e4ed32ccc1d2627e1da)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241)
Steve Dower [Wed, 27 Mar 2019 23:28:33 +0000 (16:28 -0700)] 
bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241)

7 years agobpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605)
Miss Islington (bot) [Wed, 27 Mar 2019 22:23:19 +0000 (15:23 -0700)] 
bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605)

(cherry picked from commit d5a5a33f12b60129d57f9b423b77d2fcba506834)

Co-authored-by: Philipp A <flying-sheep@web.de>
7 years agobpo-33832: Add "magic method" glossary entry (GH-7630)
Miss Islington (bot) [Wed, 27 Mar 2019 01:26:14 +0000 (18:26 -0700)] 
bpo-33832: Add "magic method" glossary entry (GH-7630)

(cherry picked from commit f760610bddd7e8f8ac0914d5d59ef806bc16a73b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>