]> granicus.if.org Git - python/log
python
7 years agogenerate 2.7.15 NEWS
Benjamin Peterson [Sun, 29 Apr 2018 22:47:18 +0000 (15:47 -0700)]
generate 2.7.15 NEWS

7 years agoIndicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)
Florian Weimer [Sun, 29 Apr 2018 19:18:33 +0000 (12:18 -0700)]
Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)

By spec, the "long double" in _PyGC_Head requires the union to always be 16-byte
aligned. However, obmalloc only yields 8-byte alignment. Compilers including GCC
8 are starting to use alignment information to do store-merging. So, the "long
double" needs to be changed to a simple "double" as was long ago done in Python
3 by e348c8d154cf6342c79d627ebfe89dfe9de23817. For 2.7, we need to add some
dummy padding to make sure _PyGC_Head stays the same size.

7 years ago2.7.15rc1 version bump v2.7.15rc1
Benjamin Peterson [Sat, 14 Apr 2018 22:06:30 +0000 (15:06 -0700)]
2.7.15rc1 version bump

7 years agomake NEWS for 2.7.15rc1
Benjamin Peterson [Sat, 14 Apr 2018 22:06:13 +0000 (15:06 -0700)]
make NEWS for 2.7.15rc1

7 years agobpo-33148: Update Windows build to use OpenSSL 1.0.2o
Steve Dower [Sat, 14 Apr 2018 21:50:40 +0000 (14:50 -0700)]
bpo-33148: Update Windows build to use OpenSSL 1.0.2o

closes https://github.com/python/cpython/pull/6474

7 years ago[2.7] bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o. (GH-6408) (GH...
Miss Islington (bot) [Sat, 14 Apr 2018 15:21:02 +0000 (08:21 -0700)]
[2.7] bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o. (GH-6408) (GH-6471)

(cherry picked from commit 76215a4481191b648de522a4e2120f60822f6b9c)

Co-authored-by: Ned Deily <nad@python.org>
7 years ago[2.7] Fix errant NEWS item: bpo-19019 -> bpo-17128 (GH-6470)
Ned Deily [Sat, 14 Apr 2018 14:56:17 +0000 (10:56 -0400)]
[2.7] Fix errant NEWS item: bpo-19019 -> bpo-17128 (GH-6470)

7 years ago[2.7] Backport macOS universal build and installer fixes from 3.6. (GH-6469)
Ned Deily [Sat, 14 Apr 2018 14:37:28 +0000 (10:37 -0400)]
[2.7] Backport macOS universal build and installer fixes from 3.6. (GH-6469)

These include:

- bpo-32726: Provide an additional, more modern macOS installer variant that
  supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied
  third-party libraries to OpenSSL 1.0.2n and SQLite 3.22.0. The 10.9+
  installer now supplies its own private copy of Tcl/Tk 8.6.8.

- bpo-24414: Default macOS deployment target is now set by ``configure`` to
  the build system's OS version (as is done by Python 3), not ``10.4``;
  override with, for example, ``./configure MACOSX_DEPLOYMENT_TARGET=10.4``.

- bpo-19019: All 2.7 macOS installer variants now supply their own version
  of ``OpenSSL 1.0.2``; the Apple-supplied SSL libraries and root
  certificates are not longer used.  The ``Installer Certificate`` command
  in ``/Applications/Python 2.7`` may be used to download and install a
  default set of root certificates from the third-party ``certifi`` package.

- bpo-11485: python.org macOS Pythons no longer supply a default SDK value
  (e.g. ``-isysroot /``) or specific compiler version default (e.g.
  ``gcc-4.2``) when building extension modules.  Use ``CC``, ``SDKROOT``,
  and ``DEVELOPER_DIR`` environment variables to override compilers or to
  use an SDK.  See Apple's ``xcrun`` man page for more info.

- prepare for pending Apple removal of 32-bit support in future macOS release

7 years ago[2.7] bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script...
Serhiy Storchaka [Tue, 10 Apr 2018 08:03:52 +0000 (11:03 +0300)]
[2.7] bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. (GH-6259) (GH-6436)

Based on patch by Oleg Krasnikov.
(cherry picked from commit c93938b5beea4c3f592119ebee6d4029558db8de)

7 years ago[2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179...
Miss Islington (bot) [Sat, 7 Apr 2018 02:01:35 +0000 (19:01 -0700)]
[2.7] bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) (GH-6405)

(cherry picked from commit ef5ce884a41c8553a7eff66ebace908c1dcc1f89)

Co-authored-by: Jay Crotts <crotts.jay@gmail.com>
7 years ago[2.7] bpo-27212: Modify islice recipe to consume initial values preceding start ...
Cheryl Sabella [Mon, 2 Apr 2018 05:29:01 +0000 (01:29 -0400)]
[2.7] bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (GH-6339)

(cherry picked from commit da1734c58d2f97387ccc9676074717d38b044128)

7 years ago[2.7] bpo-33132: Fix reference counting issues in the compiler. (GH-6209). (GH-6322)
Serhiy Storchaka [Sun, 1 Apr 2018 07:26:33 +0000 (10:26 +0300)]
[2.7] bpo-33132: Fix reference counting issues in the compiler. (GH-6209). (GH-6322)

(cherry picked from commit a95d98607efe0c43475b354543e49bf8e240bc6f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years ago[2.7] Gitignore gmon.out (GH-5796) (GH-6328)
Serhiy Storchaka [Sat, 31 Mar 2018 23:44:01 +0000 (02:44 +0300)]
[2.7] Gitignore gmon.out (GH-5796) (GH-6328)

gmon.out is generated when profiling turned on

Full Configuration:
./configure --prefix=$PWD/install --enable-profiling  --enable-big-digits=30
--with-pydebug --with-assertions  --with-valgrind.
(cherry picked from commit 95ad3822a2b6287772bd752b6ab493c6d4198d4b)

Co-authored-by: Neeraj Badlani <neerajbadlani@gmail.com>
7 years ago[2.7] bpo-33096: Fix ttk.Treeview.insert. (GH-6228) (GH-6326)
Serhiy Storchaka [Sat, 31 Mar 2018 23:42:58 +0000 (02:42 +0300)]
[2.7] bpo-33096: Fix ttk.Treeview.insert. (GH-6228) (GH-6326)

Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0783eebdff687014f7d14d5dec59b6bd39)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
7 years ago[2.7] Fix error message in sqlite connection thread check. (GH-6028). (GH-6325)
Serhiy Storchaka [Sat, 31 Mar 2018 22:04:22 +0000 (01:04 +0300)]
[2.7] Fix error message in sqlite connection thread check. (GH-6028). (GH-6325)

(cherry picked from commit 030345c0bfc2f76684666fe5c61e766ba5debfe6)

Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
7 years agobpo-31544: Fix a reference leak to 'self' after the previous target error handling...
scoder [Sat, 31 Mar 2018 12:23:30 +0000 (14:23 +0200)]
bpo-31544: Fix a reference leak to 'self' after the previous target error handling fixes. (GH-6318)

This change generally splits the xmlparser creation code into an unsafe part with "rollback" error handling and a safe "object initialisation done" part with normal decref cleanup.

7 years agobpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6284)
Miss Islington (bot) [Wed, 28 Mar 2018 08:55:30 +0000 (01:55 -0700)]
bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6284)

(cherry picked from commit c0518cde7a8404f310cd3495e77e612820ecad4f)

Co-authored-by: Ned Deily <nad@python.org>
7 years agoFix description about SimpleXMLRPCServer constructor parameter bind_and_activate...
Miss Islington (bot) [Mon, 26 Mar 2018 12:11:15 +0000 (05:11 -0700)]
Fix description about SimpleXMLRPCServer constructor parameter bind_and_activate. (GH-776)

Passing True as the `bind_and_activate` *do* immediately opening and binding to their socket.
(cherry picked from commit e6223579c87b93f3e60d28796f521587d88091d4)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
7 years agoFix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251)
Miss Islington (bot) [Mon, 26 Mar 2018 10:58:47 +0000 (03:58 -0700)]
Fix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251)

(cherry picked from commit 0301c9bdd1ebd788d1334cf3fe06c48f35bab0dc)

Co-authored-by: Stefano Taschini <taschini@users.noreply.github.com>
7 years ago[2.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6215)
Christian Heimes [Sat, 24 Mar 2018 18:34:15 +0000 (19:34 +0100)]
[2.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6215)

LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
LibreSSL < 2.7.

Documentation updates and fixes for failing tests will be provided in
another patch set.

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

Co-authored-by: Christian Heimes <christian@python.org>
7 years agobpo-31544: Avoid calling "PyObject_GetAttrString()" (and potentially executing user...
scoder [Sat, 24 Mar 2018 05:56:41 +0000 (06:56 +0100)]
bpo-31544: Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set. (GH-3992)

7 years agoUpgrade pip to v9.0.3 and setuptools to v39.0.1 (GH-6184)
Miss Islington (bot) [Thu, 22 Mar 2018 04:14:22 +0000 (21:14 -0700)]
Upgrade pip to v9.0.3 and setuptools to v39.0.1 (GH-6184)

(cherry picked from commit d93b5161af12291f3f98a260c90cc2975ea9e9cd)

Co-authored-by: Donald Stufft <donald@stufft.io>
7 years agoFix typos in mmap() error messages (GH-6173)
Miss Islington (bot) [Wed, 21 Mar 2018 06:55:44 +0000 (23:55 -0700)]
Fix typos in mmap() error messages (GH-6173)

(cherry picked from commit 9308dea3e1fd565d50a76a667e4e8ef0568b7053)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agoUpdate pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (GH-6135)
Miss Islington (bot) [Sat, 17 Mar 2018 15:54:45 +0000 (08:54 -0700)]
Update pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (GH-6135)

(cherry picked from commit 7f81bb2addbbccfa45a2fc1aa6030f26dcf4bd78)

Co-authored-by: Donald Stufft <donald@stufft.io>
7 years ago[2.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-6111)
xdegaye [Tue, 13 Mar 2018 21:06:14 +0000 (22:06 +0100)]
[2.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-6111)

(cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055)

7 years ago[2.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026)....
Miss Islington (bot) [Sun, 11 Mar 2018 08:55:59 +0000 (00:55 -0800)]
[2.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (GH-6074) (GH-6076)

(cherry picked from commit 26c9f565d016db21257a60d29ab2c99383dd5ac7)
(cherry picked from commit 04aadf23eac51fec2e436c5960c1362bbb7d03de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agoClear possible exception before calling PyTuple_Pack in IMPORT_NAME (GH-6033)
Xiang Zhang [Fri, 9 Mar 2018 02:21:58 +0000 (10:21 +0800)]
Clear possible exception before calling PyTuple_Pack in IMPORT_NAME (GH-6033)

7 years ago[2.7] closes bpo-32997: Fix REDOS in fpformat (GH-5984)
Jamie Davis [Tue, 6 Mar 2018 05:59:02 +0000 (00:59 -0500)]
[2.7] closes bpo-32997: Fix REDOS in fpformat (GH-5984)

The regex to decode a number in fpformat is susceptible to catastrophic backtracking. This is a potential DOS vector if a server is using fpformat on untrusted number strings.

Replace it with an equivalent non-vulnerable regex. The match behavior of the new regex is slightly different. It captures the whole integer part of the number in one group, Leading zeros are stripped off later.

7 years ago[2.7] bpo-32981: Fix catastrophic backtracking vulns (GH-5955)
Benjamin Peterson [Sun, 4 Mar 2018 06:18:17 +0000 (22:18 -0800)]
[2.7] bpo-32981: Fix catastrophic backtracking vulns (GH-5955)

* Prevent low-grade poplib REDOS (CVE-2018-1060)

The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.

Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.

A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.

Replace it with a similar non-vulnerable regex.

The new regex is RFC compliant.
The old regex was non-compliant in edge cases.

* Prevent difflib REDOS (CVE-2018-1061)

The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.

Replace it with an equivalent non-vulnerable regex.

Also introduce unit and REDOS tests for difflib.

Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)

7 years agobpo-32963: Fix the tutorial to state source has a default encoding of ASCII (GH-5961)
Brett Cannon [Fri, 2 Mar 2018 22:10:21 +0000 (14:10 -0800)]
bpo-32963: Fix the tutorial to state source has a default encoding of ASCII (GH-5961)

7 years ago[2.7] bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801). (#5947)
Alexey Izbyshev [Thu, 1 Mar 2018 10:27:34 +0000 (13:27 +0300)]
[2.7] bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801). (#5947)

(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
7 years agobpo-18533: Avoid RuntimeError from repr() of recursive dictview (#4823) (#5357)
bennorth [Mon, 26 Feb 2018 22:35:03 +0000 (22:35 +0000)]
bpo-18533: Avoid RuntimeError from repr() of recursive dictview (#4823) (#5357)

(cherry picked from commit d7773d92bd11640a8c950d6c36a9cef1cee36f96)

7 years agobpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length...
Miss Islington (bot) [Sun, 25 Feb 2018 21:22:43 +0000 (13:22 -0800)]
bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767)

Dropped the part that says: "For objects that do not provide sequence protocol".
(cherry picked from commit 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years ago[2.7] bpo-25059: Clarify the print separator usage in tutorial (GH-5879)
Cheryl Sabella [Sun, 25 Feb 2018 20:50:26 +0000 (15:50 -0500)]
[2.7] bpo-25059: Clarify the print separator usage in tutorial (GH-5879)

By default `print` adds spaces between its arguments.

(cherry picked from commit 84c4b0cc67ceb4b70842b78c718b6e8214874d6a)

7 years agobpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
Miss Islington (bot) [Sun, 25 Feb 2018 19:38:24 +0000 (11:38 -0800)]
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)

(cherry picked from commit fbee88244e8921afdb29fde51a9a010a8ae18277)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
7 years agoDelete a broken threading.local example (GH-5870)
Miss Islington (bot) [Sun, 25 Feb 2018 15:34:46 +0000 (07:34 -0800)]
Delete a broken threading.local example (GH-5870)

This code never did anything correct or useful. The class attribute will never be affected, and the condition will never be true.
(cherry picked from commit 5fb632e83136399bad9427ee23ec8b771695290a)

Co-authored-by: Aaron Gallagher <habnabit@users.noreply.github.com>
7 years ago[2.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5882)
Christian Heimes [Sun, 25 Feb 2018 13:28:55 +0000 (14:28 +0100)]
[2.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5882)

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

Co-authored-by: Christian Heimes <christian@python.org>
7 years agoFix ssl module, Python 2.7 doesn't have Py_MAX (#5878)
Christian Heimes [Sun, 25 Feb 2018 12:08:05 +0000 (13:08 +0100)]
Fix ssl module, Python 2.7 doesn't have Py_MAX (#5878)

Signed-off-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877)
Christian Heimes [Sun, 25 Feb 2018 11:31:17 +0000 (12:31 +0100)]
[2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877)

The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.

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

Co-authored-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-30622: Improve NPN support detection (GH-5859) (#5863)
Christian Heimes [Sun, 25 Feb 2018 09:21:03 +0000 (10:21 +0100)]
[2.7] bpo-30622: Improve NPN support detection (GH-5859) (#5863)

The ssl module now detects missing NPN support in LibreSSL.

Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org>
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 6cdb7954b0a578d899e4b78b868ea59eef08480a)

Co-authored-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-32185: Don't send IP in SNI TLS extension (GH-5865) (#5871)
Miss Islington (bot) [Sun, 25 Feb 2018 09:16:37 +0000 (01:16 -0800)]
[2.7] bpo-32185: Don't send IP in SNI TLS extension (GH-5865) (#5871)

The SSL module no longer sends IP addresses in SNI TLS extension on
platforms with OpenSSL 1.0.2+ or inet_pton.

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

Co-authored-by: Christian Heimes <christian@python.org>
7 years agobpo-25404: SSLContext.load_dh_params() non-ASCII path (GH-3459)
Christian Heimes [Sun, 25 Feb 2018 08:48:02 +0000 (09:48 +0100)]
bpo-25404: SSLContext.load_dh_params() non-ASCII path (GH-3459)

SSLContext.load_dh_params() now supports non-ASCII path.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-31518: Change TLS protocol for Debian (#3661)
Christian Heimes [Sat, 24 Feb 2018 23:45:53 +0000 (00:45 +0100)]
bpo-31518: Change TLS protocol for Debian (#3661)

Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change
TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to
make them pass on Debian.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
Miss Islington (bot) [Fri, 23 Feb 2018 18:16:56 +0000 (10:16 -0800)]
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)

`whilst` and `while` are both english words, `whilst` is not as commonly used.
This can be confusing to readers whose primary language is not english.
(cherry picked from commit 98f42aac23f3863973cb6e9964c5212cfd3a1d98)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
7 years ago[2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)
Anselm Kruis [Fri, 23 Feb 2018 16:27:28 +0000 (17:27 +0100)]
[2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)

Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)

Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
7 years ago[2.7] bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk...
Miss Islington (bot) [Wed, 21 Feb 2018 06:37:18 +0000 (22:37 -0800)]
[2.7] bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240) (GH-5781)

Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years ago[2.7] closes bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) (#5792)
Benjamin Peterson [Wed, 21 Feb 2018 06:17:10 +0000 (22:17 -0800)]
[2.7] closes bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) (#5792)

It's bad form to pin to an old version of TLS. ssl.SSLContext has the right
protocol default, so let's not pass anyway..
(cherry picked from commit e9edee0b65650c4f9db90cefc2e9a8125bad762c)

7 years agoFix typo in docs (GH-5763)
Raymond Hettinger [Mon, 19 Feb 2018 23:39:20 +0000 (15:39 -0800)]
Fix typo in docs (GH-5763)

7 years ago[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH...
Éric Araujo [Mon, 19 Feb 2018 03:56:06 +0000 (22:56 -0500)]
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).

(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c)

Co-authored-by: Éric Araujo <merwok@netwok.org>
7 years ago[2.7] Clean up Travis config (GH-5727)
Zachary Ware [Sun, 18 Feb 2018 21:45:48 +0000 (15:45 -0600)]
[2.7] Clean up Travis config (GH-5727)

(cherry picked from commit 7eb3f8226ea7b79dae4e4e8b05730cfe0d9af7c1)

7 years agoDOC: fix documentation for copyright and credits (GH-5706)
Miss Islington (bot) [Sat, 17 Feb 2018 04:11:48 +0000 (20:11 -0800)]
DOC: fix documentation for copyright and credits (GH-5706)

Adapt documentation for `copyright` and `credits` to reality.  Previously, the documentation implied that all each of `copyright`,
`credits`, and `license`, would print a message to call the object in order to see the full text.  In reality, only `license` exhibits this
behaviour, and `copyright` and `credit` print their full text either when printed, displayed, or called.
(cherry picked from commit 243d6d71265be1996a8326002deae429106a5fba)

Co-authored-by: Gerrit Holl <gerrit.holl@gmail.com>
7 years agoUpdate comment in posixmodule.c (GH-5681)
Miss Islington (bot) [Wed, 14 Feb 2018 20:43:17 +0000 (12:43 -0800)]
Update comment in posixmodule.c (GH-5681)

A closing parentheses was missing.

Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
(cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48)

Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
7 years agoFix installation instructions for *nix (GH-5605)
Miss Islington (bot) [Wed, 14 Feb 2018 03:55:09 +0000 (19:55 -0800)]
Fix installation instructions for *nix (GH-5605)

Remove pkg_add -r python from FreeBSD installation section.
Moved to OpenBSD.
(cherry picked from commit 3384d38d51a2c3450e742175db5d6d638fa5d2eb)

Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
7 years ago[2.7] remove mercurial dot files (GH-5558).
Benjamin Peterson [Wed, 14 Feb 2018 03:17:10 +0000 (19:17 -0800)]
[2.7] remove mercurial dot files (GH-5558).

(cherry picked from commit 2b86f4cb2cd339f545804a9abb8c4d4cc28d9488)

7 years agobpo-30109: Fix reindent.py for non-ASCII files. (#5637)
Serhiy Storchaka [Mon, 12 Feb 2018 18:16:42 +0000 (20:16 +0200)]
bpo-30109: Fix reindent.py for non-ASCII files. (#5637)

It now processes files as binary streams.

This also fixes "make reindent".

7 years agoFix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5571)
Miss Islington (bot) [Mon, 12 Feb 2018 08:06:48 +0000 (00:06 -0800)]
Fix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5571)

It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e58f4c489d4b31579852cde5f7113da08e)

Co-authored-by: Alexey <forestbiiird@gmail.com>
7 years agoFix AppVeyor doc short-circuit (GH-5635)
Miss Islington (bot) [Sun, 11 Feb 2018 22:29:11 +0000 (14:29 -0800)]
Fix AppVeyor doc short-circuit (GH-5635)

(cherry picked from commit 6ea20fc719dcaf102d2cefa1786f0421514f7a58)

7 years ago[2.7] Add short-circuit for doc changes to AppVeyor (GH-5629)
Zachary Ware [Sun, 11 Feb 2018 19:57:11 +0000 (13:57 -0600)]
[2.7] Add short-circuit for doc changes to AppVeyor (GH-5629)

(cherry picked from commit 28607e0dd9417ce44a109980ffd60697c1afdea0)

7 years agobpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613)
Miss Islington (bot) [Sun, 11 Feb 2018 00:42:42 +0000 (16:42 -0800)]
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613)

The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f40389c476d9240ec87a33da0373597c6af)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
7 years ago[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)
Serhiy Storchaka [Fri, 9 Feb 2018 22:02:04 +0000 (00:02 +0200)]
[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)

Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)

7 years agobpo-32784: Wrong argument name for csv.DictReader in documentation (GH-5575)
Stéphane Wirtel [Wed, 7 Feb 2018 16:05:35 +0000 (17:05 +0100)]
bpo-32784: Wrong argument name for csv.DictReader in documentation (GH-5575)

Use `f` as the name of the first parameter of `csv.DictReader` and
`csv.DictWriter` classes.

7 years agobpo-32616: Disable computed gotos by default for clang < 5 (GH-5574)
INADA Naoki [Wed, 7 Feb 2018 10:09:36 +0000 (19:09 +0900)]
bpo-32616: Disable computed gotos by default for clang < 5 (GH-5574)

7 years agoallow the test suite to pass if the strop module doesn't exist (GH-5566)
Benjamin Peterson [Tue, 6 Feb 2018 17:29:21 +0000 (09:29 -0800)]
allow the test suite to pass if the strop module doesn't exist (GH-5566)

strop is highly legacy and can be safely compiled out in most installations. Let's not fail the test suite for its absence.

7 years agoFix typo -- missing "not" (GH-5532)
Raymond Hettinger [Sun, 4 Feb 2018 18:34:29 +0000 (10:34 -0800)]
Fix typo -- missing "not" (GH-5532)

7 years agobpo-32739: Show default value for rotate() (GH-5517)
Raymond Hettinger [Sat, 3 Feb 2018 21:57:02 +0000 (13:57 -0800)]
bpo-32739: Show default value for rotate() (GH-5517)

Manual backport of GH-5485

7 years agoUpdate Doc build for split off of 3.7 branch
Ned Deily [Sat, 3 Feb 2018 21:31:41 +0000 (16:31 -0500)]
Update Doc build for split off of 3.7 branch

7 years agobpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)
Mariatta [Fri, 2 Feb 2018 16:23:53 +0000 (11:23 -0500)]
bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)

Clarify that the level argument is used to determine whether to
perform absolute or relative imports: 0 is absolute, while a positive number
is the number of parent directories to search relative to the current module..
(cherry picked from commit 461d225b195eec5269f317323b41115516144c41)

Co-authored-by: oldk <oldk1331@users.noreply.github.com>
7 years ago[2.7] bpo-32137: The repr of deeply nested dict now raises a RuntimeError (GH-4570...
Serhiy Storchaka [Fri, 2 Feb 2018 14:29:02 +0000 (16:29 +0200)]
[2.7] bpo-32137: The repr of deeply nested dict now raises a RuntimeError (GH-4570) (#5493)

instead of crashing due to a stack overflow.

This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)

7 years agobpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (GH-2148) (GH-5429)
Victor Stinner [Mon, 29 Jan 2018 15:54:29 +0000 (16:54 +0100)]
bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (GH-2148) (GH-5429)

_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.

(cherry picked from commit 8f6eeaf21cdf4aea25fdefeec814a1ce07453fe9)

7 years agobpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5331)
Bo Bayles [Mon, 29 Jan 2018 14:31:32 +0000 (08:31 -0600)]
bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5331)

Patch by Bo Bayles.

7 years agoFix PyTrace_RETURN documentation (GH-5384) (GH-5387)
Miss Islington (bot) [Sun, 28 Jan 2018 15:49:14 +0000 (07:49 -0800)]
Fix PyTrace_RETURN documentation (GH-5384) (GH-5387)

It will be triggered when propagating an exception.
(cherry picked from commit 79db11ce99332d62917be9d03b31494b1ff2f96a)

7 years agobpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361...
Miss Islington (bot) [Sun, 28 Jan 2018 08:41:29 +0000 (00:41 -0800)]
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361) (GH-5378)

(cherry picked from commit 9ed0aee27c249dada410a22fff4325a4a61df36d)

7 years ago[2.7] bpo-32521: nis libnsl (GH-5190) (#5353)
Christian Heimes [Sat, 27 Jan 2018 08:39:39 +0000 (09:39 +0100)]
[2.7] bpo-32521: nis libnsl (GH-5190) (#5353)

The nismodule is now compatible with new libnsl and headers location

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

7 years ago[2.7] bpo-32640: Clarify the behavior of str.join and unicode object (GH-5333)
Mariatta [Fri, 26 Jan 2018 17:55:15 +0000 (09:55 -0800)]
[2.7] bpo-32640: Clarify the behavior of str.join and unicode object (GH-5333)

In str.join, if any of the iterable contains a Unicode object,
str.join will return a Unicode object.

A Type error will be raised if iterable contains values other
than a string or Unicode object.

7 years agobpo-32667: Fix tests when $PATH contains a file (#5324)
Victor Stinner [Thu, 25 Jan 2018 21:41:38 +0000 (22:41 +0100)]
bpo-32667: Fix tests when $PATH contains a file (#5324)

test_subprocess.test_leaking_fds_on_error() failed when the PATH
environment variable contains a path to an existing file. Fix the
test: ignore also ENOTDIR, not only ENOENT and EACCES.

7 years agobpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056). ...
Xiang Zhang [Wed, 24 Jan 2018 14:53:42 +0000 (22:53 +0800)]
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056). (#5299)

(cherry picked from commit 131fd7f96c619bc7eaea956e45c6337175f4b27f)

7 years agobpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284...
Miss Islington (bot) [Wed, 24 Jan 2018 09:51:39 +0000 (01:51 -0800)]
bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5295)

glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef442ef89004089a8a34ce5909ffb90f2)

7 years agobpo-32586: Fix code example in urllib2's doc (GH-5238)
Pablo Galindo [Fri, 19 Jan 2018 00:16:13 +0000 (00:16 +0000)]
bpo-32586: Fix code example in urllib2's doc  (GH-5238)

It should be `urllib2.URLError` instead of just `URLError`.

7 years agoUse assertItemsEqual instead of assertEqual. (#5224)
Gregory P. Smith [Wed, 17 Jan 2018 23:15:46 +0000 (15:15 -0800)]
Use assertItemsEqual instead of assertEqual. (#5224)

This test doesn't care about order, the underlying filesystem APIs do not
guarantee directory listings on subsequent calls will be in the same order.

7 years agopythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5220)
Miss Islington (bot) [Wed, 17 Jan 2018 16:58:16 +0000 (08:58 -0800)]
pythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5220)

(cherry picked from commit 7d91c0250408e202243c77c1dc9afdb321b6b32f)

7 years agobpo-32539: Fix OSError for os.listdir() for extended-length paths on Windows (#5169)
Anthony Sottile [Mon, 15 Jan 2018 21:39:04 +0000 (13:39 -0800)]
bpo-32539: Fix OSError for os.listdir() for extended-length paths on Windows (#5169)

See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath

Paths that begin with `\\?\` are "extended-length paths".

7 years agobpo-32521: nis libtirpc (GH-5137) (#5166)
Miss Islington (bot) [Fri, 12 Jan 2018 15:35:25 +0000 (07:35 -0800)]
bpo-32521: nis libtirpc (GH-5137) (#5166)

glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

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

7 years agoFix version in AppVeyor config (GH-5126)
Zachary Ware [Sun, 7 Jan 2018 19:00:56 +0000 (13:00 -0600)]
Fix version in AppVeyor config (GH-5126)

7 years ago[2.7] Kill the AppVeyor file whitelist (GH-5123)
Zachary Ware [Sun, 7 Jan 2018 03:16:56 +0000 (21:16 -0600)]
[2.7] Kill the AppVeyor file whitelist (GH-5123)

It's more trouble than it's worth, since AppVeyor only checks the HEAD commit of a PR rather than the full diff against the base branch to decide which files changed.
(cherry picked from commit 7f7de371f947dc38e67505601927e9bc58fa268a)

7 years ago[2.7] advance copyright years to 2018 (GH-5094). (#5105)
Benjamin Peterson [Fri, 5 Jan 2018 07:02:11 +0000 (23:02 -0800)]
[2.7] advance copyright years to 2018 (GH-5094). (#5105)

(cherry picked from commit 65f2a6dcc2bc28a8566b74c8e9273f982331ec48)

7 years ago[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH...
Serhiy Storchaka [Thu, 4 Jan 2018 12:08:27 +0000 (14:08 +0200)]
[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH-4695). (#5096)

(cherry picked from commit 1e6d8525f9dd3dcdc83adb93b164082c8b95d17a)

7 years agobpo-32482: Improve syntax and grammar tests. (#5085)
Serhiy Storchaka [Thu, 4 Jan 2018 08:36:14 +0000 (10:36 +0200)]
bpo-32482: Improve syntax and grammar tests. (#5085)

7 years agocoalesce GILless sections in new_buffersize (#5059)
Benjamin Peterson [Tue, 2 Jan 2018 23:52:42 +0000 (15:52 -0800)]
coalesce GILless sections in new_buffersize (#5059)

830daae1c82ed33deef0086b7b6323e5be0b0cc8 added some new GIL-releasing to new_buffersize. This is fine, but it's better to avoid reacquiring the GIL for as long as possible. Also, it should use FILE_(BEGIN|END)_ALLOW_THREADS to avoid having the file closed from under it.

7 years agobpo-31530: fix crash when multiple threads iterate over a file, round 2 (#5060)
Benjamin Peterson [Tue, 2 Jan 2018 17:25:41 +0000 (09:25 -0800)]
bpo-31530: fix crash when multiple threads iterate over a file, round 2 (#5060)

Multiple threads iterating over a file can corrupt the file's internal readahead
buffer resulting in crashes. To fix this, cache buffer state thread-locally for
the duration of a file_iternext call and only update the file's internal state
after reading completes.

No attempt is made to define or provide "reasonable" semantics for iterating
over a file on multiple threads. (Non-crashing) races are still
present. Duplicated, corrupt, and missing data will happen.

This was originally fixed by 6401e5671781eb217ee1afb4603cc0d1b0367ae6, which
raised an exception from seek() and next() when concurrent operations were
detected. Alas, this simpler solution breaks legitimate use cases such as
capturing the standard streams when multiple threads are logging.

7 years agobpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
Miss Islington (bot) [Tue, 2 Jan 2018 15:42:12 +0000 (07:42 -0800)]
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)

Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (GH-5079)
(cherry picked from commit f190eb59e60e2ae7a7cbd396458389a7a076e0d3)

7 years ago[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH...
Serhiy Storchaka [Tue, 2 Jan 2018 08:56:40 +0000 (10:56 +0200)]
[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078). (#5084)

(cherry picked from commit 7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de)

7 years agobpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5074)
Miss Islington (bot) [Mon, 1 Jan 2018 18:51:12 +0000 (10:51 -0800)]
bpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5074)

Move other test to more proper place.
(cherry picked from commit e8ed96550c6aa9a1e39c36e67e892994e25e2c41)

7 years ago[2.7] Add missing backslashes in PCbuild bat files (GH-5056) (GH-5058)
Zachary Ware [Sun, 31 Dec 2017 00:34:46 +0000 (18:34 -0600)]
[2.7] Add missing backslashes in PCbuild bat files (GH-5056) (GH-5058)

(cherry picked from commit fe90efdc07ec70fd4ff28eac179448a41379cff1)

7 years agobpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)
Segev Finer [Fri, 29 Dec 2017 20:44:04 +0000 (22:44 +0200)]
bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)

select.error doesn't have an errno attribute so access the errno by
indexing instead.

7 years ago[2.7] remove unused import (GH-5040). (#5043)
Benjamin Peterson [Fri, 29 Dec 2017 07:38:55 +0000 (23:38 -0800)]
[2.7] remove unused import (GH-5040). (#5043)

(cherry picked from commit e325608740bee161ca7fefd09463d63099efa1b8)

7 years agomake PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034...
Miss Islington (bot) [Fri, 29 Dec 2017 02:05:07 +0000 (18:05 -0800)]
make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5037)

(cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4)

7 years ago[2.7] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991...
Serhiy Storchaka [Wed, 27 Dec 2017 19:32:03 +0000 (21:32 +0200)]
[2.7] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991). (#5017)

(cherry picked from commit 53f9135667226f33e049e327db60fb033afbd77a)

7 years agocorrect wording (GH-4983) (#4985)
Miss Islington (bot) [Sat, 23 Dec 2017 05:49:49 +0000 (21:49 -0800)]
correct wording (GH-4983) (#4985)

(cherry picked from commit d11e8e0d11c759cd0f96aebb59de914e4d62b8cd)

7 years ago[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH...
Benjamin Peterson [Fri, 22 Dec 2017 20:52:10 +0000 (12:52 -0800)]
[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977) (#4980)

This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist..
(cherry picked from commit 8a5877165e993afb2633cd48da5222326d3f6e0e)

7 years agocorrect the typos (GH-4950) (#4952)
Miss Islington (bot) [Thu, 21 Dec 2017 05:42:42 +0000 (21:42 -0800)]
correct the typos (GH-4950) (#4952)

(cherry picked from commit 83cb778b4a3f856f2243b0f0d36fefb5c44b388f)