]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
7 years ago[2.7] bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821) (GH...
Miss Islington (bot) [Tue, 26 Mar 2019 21:17:16 +0000 (14:17 -0700)] 
[2.7] bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821) (GH-12568)

(cherry picked from commit 6cd658b1a5cb2413230dbc2d9395d20498be8518)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
https://bugs.python.org/issue34203

7 years agobpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551) (GH-12554)
Miss Islington (bot) [Tue, 26 Mar 2019 07:55:35 +0000 (00:55 -0700)] 
bpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551) (GH-12554)

(cherry picked from commit 0523c39e7720b82b38ad793d3f1a5681adcdf873)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-34085: Improve wording on classmethod/staticmethod (GH-8228)
Miss Islington (bot) [Mon, 25 Mar 2019 22:58:40 +0000 (15:58 -0700)] 
bpo-34085: Improve wording on classmethod/staticmethod (GH-8228)

* bpo-34085: Improve wording on classmethod/staticmethod

* Address comments from Éric

* Address comments from Éric
(cherry picked from commit 548cb6060ab9d5a66931ea2be4da08c2c72c9176)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
7 years ago[2.7] bpo-36421: Fix ref counting bugs in _ctypes.c's PyCArrayType_new(). (GH-12534)
Zackery Spytz [Mon, 25 Mar 2019 14:15:36 +0000 (08:15 -0600)] 
[2.7] bpo-36421: Fix ref counting bugs in _ctypes.c's PyCArrayType_new(). (GH-12534)

Add missing Py_DECREF()s.

7 years agobpo-36367: Free buffer if realloc fails in tokenize.c (GH-12442) (GH-12470)
Victor Stinner [Wed, 20 Mar 2019 12:03:41 +0000 (13:03 +0100)] 
bpo-36367: Free buffer if realloc fails in tokenize.c (GH-12442) (GH-12470)

(cherry picked from commit cb90c89de14aab636739b3e810cf949e47b54a0c)

7 years ago[2.7] bpo-35564: add master_doc='contents' to conf.py (GH-12462)
Julien Palard [Wed, 20 Mar 2019 09:40:59 +0000 (10:40 +0100)] 
[2.7] bpo-35564: add master_doc='contents' to conf.py (GH-12462)

(cherry picked from commit fc8284e22074af8154e9865c8391b955f13a308b)

Co-authored-by: Jean-François B <jfbu@free.fr>
7 years ago[2.7] bpo-18368: Fix memory leaks in PyOS_StdioReadline() when realloc() fails (GH...
stratakis [Tue, 19 Mar 2019 10:43:20 +0000 (11:43 +0100)] 
[2.7] bpo-18368: Fix memory leaks in PyOS_StdioReadline() when realloc() fails (GH-12334)

(cherry picked from commit 9ae513caa74a05970458dee17fb995ea49965bb5)

7 years agobpo-36307: Travis: upgrade to Xenial environment (GH-12356)
Inada Naoki [Tue, 19 Mar 2019 09:08:36 +0000 (18:08 +0900)] 
bpo-36307: Travis: upgrade to Xenial environment (GH-12356)

(cherry picked from commit 74ae50e53e59bbe39d6287b902757f0cd01327dc)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
7 years agobpo-36337: socket.send()/sendall() use Py_ssize_t (GH-12397)
Stéphane Wirtel [Tue, 19 Mar 2019 01:56:28 +0000 (02:56 +0100)] 
bpo-36337: socket.send()/sendall() use Py_ssize_t (GH-12397)

Fix buffer overflow in send() and sendall() methods of socket.socket
for data larger than 2 GiB.

7 years ago[2.7] bpo-35605: Fix documentation build for sphinx<1.6 (GH-12413)
Julien Palard [Mon, 18 Mar 2019 18:11:30 +0000 (19:11 +0100)] 
[2.7] bpo-35605: Fix documentation build for sphinx<1.6 (GH-12413)

(cherry picked from commit dfc8fc15fa989acba3c372572e52bbcb5ab38a37)

7 years agobpo-36235: Enhance distutils test_customize_compiler() (GH-12403) (GH-12417)
Victor Stinner [Mon, 18 Mar 2019 17:34:06 +0000 (18:34 +0100)] 
bpo-36235: Enhance distutils test_customize_compiler() (GH-12403) (GH-12417)

The test test_customize_compiler() now mocks all sysconfig variables
and all environment variables used by customize_compiler().

(cherry picked from commit 72c7b372cf145fded93a9a776acc742a60090f95)

7 years agobpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236) (GH-12349)
Victor Stinner [Fri, 15 Mar 2019 15:03:44 +0000 (16:03 +0100)] 
bpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236) (GH-12349)

Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the
CFLAGS environment variable is defined, don't override CFLAGS variable with
the OPT variable anymore.

Initial patch written by David Malcolm.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
(cherry picked from commit 86082c22d23285995a32aabb491527c9f5629556)

7 years agobpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12332)
Victor Stinner [Thu, 14 Mar 2019 16:19:52 +0000 (17:19 +0100)] 
bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12332)

Fix an unlikely memory leak on conversion from string to float in the
function _Py_dg_strtod() used by float(str), complex(str),
pickle.load(), marshal.load(), etc.

Fix an unlikely memory leak in _Py_dg_strtod() on "undfl:" label:
rewrite memory management in this function to always release all
memory before exiting the function. Initialize variables to NULL, and
set them to NULL after calling Bfree() at the "cont:" label.

Note: Bfree(NULL) is well defined: it does nothing.

(cherry picked from commit 9776b0636ae39668d3ce1c006d4be01dad01bf9f)

7 years ago[2.7] bpo-36289: Fix a possible reference leak in the io module (GH-12329)
stratakis [Thu, 14 Mar 2019 15:35:40 +0000 (16:35 +0100)] 
[2.7] bpo-36289: Fix a possible reference leak in the io module (GH-12329)

Fix a reference leak in _bufferedreader_read_all():
_io.BufferedIOMixin.read() leaks a reference on 'data'
when it reads the whole file content but flush() fails.

7 years ago[2.7] bpo-36291: Fix a possible reference leak in the json module (GH-12330)
stratakis [Thu, 14 Mar 2019 15:22:46 +0000 (16:22 +0100)] 
[2.7] bpo-36291: Fix a possible reference leak in the json module (GH-12330)

Fix a reference leak in json if parsing a floating point number fails.

If PyOS_string_to_double() fails in _match_number_str():
decrement numstr ref counter.

7 years ago[2.7] bpo-36212: Fix two possible reference leaks in the hotshot module (GH-12327)
stratakis [Thu, 14 Mar 2019 15:10:58 +0000 (16:10 +0100)] 
[2.7] bpo-36212: Fix two possible reference leaks in the hotshot module (GH-12327)

Fix reference leaks in _hotshot.LogReaderType on PyTuple_New() failure.

7 years agobpo-36174: Update nuget authoring for new license field. (GH-12300)
Steve Dower [Wed, 13 Mar 2019 21:43:47 +0000 (14:43 -0700)] 
bpo-36174: Update nuget authoring for new license field. (GH-12300)

7 years ago[3.7] bpo-36216: Only print test messages when verbose (GH-12291)
Steve Dower [Tue, 12 Mar 2019 20:51:58 +0000 (13:51 -0700)] 
[3.7] bpo-36216: Only print test messages when verbose (GH-12291)

7 years agobpo-36234: test_os: check TypeError for invalid uid type (GH-12235)
Victor Stinner [Mon, 11 Mar 2019 12:59:43 +0000 (13:59 +0100)] 
bpo-36234: test_os: check TypeError for invalid uid type (GH-12235)

Patch written by David Malcolm.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
7 years agobpo-35807: Upgrade ensurepip bundled pip and setuptools (GH-12189)
Miss Islington (bot) [Fri, 8 Mar 2019 21:45:01 +0000 (13:45 -0800)] 
bpo-35807: Upgrade ensurepip bundled pip and setuptools (GH-12189)

* Update pip to 19.0.3
* Update setuptools to 40.8.0
(cherry picked from commit 01e0f439f5009f37b95ab516e91906fcc7fcb8c3)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
7 years ago[2.7] IDLE: Fix typo in keybindingDialog.py (GH-2322) (GH-12231)
Terry Jan Reedy [Fri, 8 Mar 2019 03:16:07 +0000 (22:16 -0500)] 
[2.7] IDLE: Fix typo in keybindingDialog.py (GH-2322) (GH-12231)

Cherry picked by hand from a0e911b

7 years agobpo-36140: Fix an incorrect check in msidb_getsummaryinformation() (GH-12074)
Miss Islington (bot) [Thu, 7 Mar 2019 18:49:15 +0000 (10:49 -0800)] 
bpo-36140: Fix an incorrect check in msidb_getsummaryinformation() (GH-12074)

(cherry picked from commit bf94cc7b496a379e1f604aa2e4080bb70ca4020e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)
Steve Dower [Thu, 7 Mar 2019 17:08:45 +0000 (09:08 -0800)] 
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)

7 years agoFix the documentation for set.copy() (GH-12176)
Miss Islington (bot) [Thu, 7 Mar 2019 05:29:48 +0000 (21:29 -0800)] 
Fix the documentation for set.copy() (GH-12176)

Remove 's' mention as there's no argument.
(cherry picked from commit e942e7b5c91995ae1ad967ef2c0f116a5d8555de)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
7 years agobpo-36147: Fix a memory leak in ctypes s_get() (GH-12102)
stratakis [Wed, 6 Mar 2019 14:14:06 +0000 (15:14 +0100)] 
bpo-36147: Fix a memory leak in ctypes s_get() (GH-12102)

The s_get() function leaks the result variable on low memory.
Partially backport commit 19b52545df898ec911c44e29f75badb902924c0
to fix it.

7 years ago[2.7] bpo-36186: Fix linuxaudiodev.linux_audio_device() error handling (GH-12163)
stratakis [Wed, 6 Mar 2019 14:11:56 +0000 (15:11 +0100)] 
[2.7] bpo-36186: Fix linuxaudiodev.linux_audio_device() error handling (GH-12163)

Fix linuxaudiodev.linux_audio_device() error handling:
close the internal file descriptor if it fails to open the device.

7 years ago[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) (GH-12177)
Stéphane Wirtel [Tue, 5 Mar 2019 14:18:58 +0000 (15:18 +0100)] 
[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) (GH-12177)

Use test_support.TEST_HTTP_URL (pythontest.net) instead of http://www.example.com/.

7 years ago[2.7] bpo-36149 Fix potential use of uninitialized memory in cPickle (#12105)
T. Wouters [Mon, 4 Mar 2019 18:52:07 +0000 (10:52 -0800)] 
[2.7] bpo-36149 Fix potential use of uninitialized memory in cPickle (#12105)

Fix off-by-one bug in cPickle that caused it to use uninitialised memory on truncated pickles read from FILE*s.