]> granicus.if.org Git - python/log
python
6 years agoFIX documentation and NEWS of ThreadedHTTPServer. (GH-6207) (GH-6302)
Miss Islington (bot) [Thu, 29 Mar 2018 08:33:47 +0000 (01:33 -0700)]
FIX documentation and NEWS of ThreadedHTTPServer. (GH-6207) (GH-6302)

(cherry picked from commit 79c3bab35cce55e6d175aff96a845bc6d932b203)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years ago[3.7] Fix duplicating words words. (GH-6296) (GH-6297)
Serhiy Storchaka [Wed, 28 Mar 2018 20:05:24 +0000 (23:05 +0300)]
[3.7] Fix duplicating words words. (GH-6296) (GH-6297)

Most of them have been added in 3.7.
(cherry picked from commit bac2d5ba30339298db7d4caa9c8cd31d807cf081)

6 years agobpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6294)
Miss Islington (bot) [Wed, 28 Mar 2018 15:50:24 +0000 (08:50 -0700)]
bpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6294)

(cherry picked from commit aa50bf08e64f49d57917ab0b1aadf4308a3168a6)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
6 years agos/the the/the/ (GH-6287)
Miss Islington (bot) [Wed, 28 Mar 2018 13:23:32 +0000 (06:23 -0700)]
s/the the/the/ (GH-6287)

(cherry picked from commit 40a536be5337d3723285d597e2906394b26816a5)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years ago[3.7] bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6283)
Miss Islington (bot) [Wed, 28 Mar 2018 08:49:24 +0000 (01:49 -0700)]
[3.7] bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. (GH-6283)

(cherry picked from commit c0518cde7a8404f310cd3495e77e612820ecad4f)

Co-authored-by: Ned Deily <nad@python.org>
6 years agobpo-32726: Do not force IDLE.app to launch in 32-bit mode. (GH-6280)
Miss Islington (bot) [Wed, 28 Mar 2018 08:16:23 +0000 (01:16 -0700)]
bpo-32726: Do not force IDLE.app to launch in 32-bit mode. (GH-6280)

Forcing the macOS IDLE.app gui process to launch in 32-mode was
a necessary hack for old versions of Tk (Aqua Carbon as in Tk 8.4
and early versions of 8.5); it is not needed for current versions
of Tk.  Since 32-bit launching will no longer be supported on
future releases of macOS, allow IDLE.app to launch in 64-bit mode.
(cherry picked from commit df532ab752680f6e359672c2cd40bec8ac848628)

Co-authored-by: Ned Deily <nad@python.org>
6 years agobpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)...
Miss Islington (bot) [Wed, 28 Mar 2018 06:39:19 +0000 (23:39 -0700)]
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276) (#6277)

(cherry picked from commit e52ac045972a4f75d7f52e4ee0d6de128259134d)

Co-authored-by: Ned Deily <nad@python.org>
6 years agoFix senfile typo (GH-6265) (#6274)
Miss Islington (bot) [Wed, 28 Mar 2018 01:34:15 +0000 (18:34 -0700)]
Fix senfile typo (GH-6265) (#6274)

* Also in docs
(cherry picked from commit 65a34709f60711f7c46031d4c6c420f567bc790a)

Co-authored-by: Sam Dunster <me@sdunster.com>
6 years agobpo-32517: re-enable test_read_pty_output on macOS (GH-6112)
Ned Deily [Tue, 27 Mar 2018 21:17:28 +0000 (17:17 -0400)]
bpo-32517: re-enable test_read_pty_output on macOS (GH-6112)

6 years agobpo-33151: Handle submodule resources (GH-6268) (GH-6270)
Miss Islington (bot) [Tue, 27 Mar 2018 17:25:28 +0000 (10:25 -0700)]
bpo-33151: Handle submodule resources (GH-6268) (GH-6270)

(cherry picked from commit 30e507dff465a31901d87df791a2bac40dc88530)

Co-authored-by: Barry Warsaw <barry@python.org>
6 years agobpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195...
Miss Islington (bot) [Tue, 27 Mar 2018 02:23:34 +0000 (19:23 -0700)]
bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (#GH-6266)

(cherry picked from commit da1734c58d2f97387ccc9676074717d38b044128)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32873: Treat type variables and special typing forms as immutable by copy and...
Miss Islington (bot) [Mon, 26 Mar 2018 22:29:06 +0000 (15:29 -0700)]
bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

This also fixes python/typingGH-512
This also fixes python/typingGH-511

As was discussed in both issues, some typing forms deserve to be treated
as immutable by copy and pickle modules, so that:
* copy(X) is X
* deepcopy(X) is X
* loads(dumps(X)) is X  GH- pickled by reference

This PR adds such behaviour to:
* Type variables
* Special forms like Union, Any, ClassVar
* Unsubscripted generic aliases to containers like List, Mapping, Iterable

This not only resolves inconsistencies mentioned in the issues, but also
improves backwards compatibility with previous versions of Python
(including 3.6).

Note that this requires some dances with __module__ for type variables
(similar to NamedTuple) because the class TypeVar itself is define in typing,
while type variables should get module where they were defined.

https://bugs.python.org/issue32873
(cherry picked from commit 834940375ae88bc95794226dd8eff1f25fba1cf9)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
6 years agobpo-32844: Fix a subprocess misredirection of a low fd (GH5689)
Miss Islington (bot) [Mon, 26 Mar 2018 20:14:09 +0000 (13:14 -0700)]
bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)

bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.

When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
(cherry picked from commit 0e7144b064a19493a146af94175a087b3888c37b)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years agobpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument...
Miss Islington (bot) [Mon, 26 Mar 2018 17:55:13 +0000 (10:55 -0700)]
bpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument. (GH-6260)

This is part of PEP 487 and the descriptor protocol.
(cherry picked from commit de7a2f04d6b9427d568fcb43b6f512f9b4c4bd84)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoFix error message in sqlite connection thread check. (GH-6028)
Miss Islington (bot) [Mon, 26 Mar 2018 16:01:22 +0000 (09:01 -0700)]
Fix error message in sqlite connection thread check. (GH-6028)

(cherry picked from commit 030345c0bfc2f76684666fe5c61e766ba5debfe6)

Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
6 years agoCorrected link targets in collections.rst (GH-1052)
Miss Islington (bot) [Mon, 26 Mar 2018 12:52:35 +0000 (05:52 -0700)]
Corrected link targets in collections.rst (GH-1052)

(cherry picked from commit e105294708ffc78a31566b48468746eb4609abe7)

Co-authored-by: Michael Seifert <michaelseifert04@yahoo.de>
6 years agoFix description about SimpleXMLRPCServer constructor parameter bind_and_activate...
Miss Islington (bot) [Mon, 26 Mar 2018 12:09:23 +0000 (05:09 -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>
6 years agoGitignore gmon.out (GH-5796)
Miss Islington (bot) [Mon, 26 Mar 2018 11:26:34 +0000 (04:26 -0700)]
Gitignore gmon.out (GH-5796)

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>
6 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:10 +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>
6 years agobpo-33096: Fix ttk.Treeview.insert. (GH-6228)
Miss Islington (bot) [Mon, 26 Mar 2018 08:19:52 +0000 (01:19 -0700)]
bpo-33096: Fix ttk.Treeview.insert. (GH-6228)

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>
6 years agoMinor fixes to dataclass tests. (GH-6243)
Miss Islington (bot) [Mon, 26 Mar 2018 01:00:43 +0000 (18:00 -0700)]
Minor fixes to dataclass tests. (GH-6243)

 Also, re-enable a test for ClassVars with default_factory.
(cherry picked from commit 2b75fc2bc97702224de0fae8ab026ec0cd0706ab)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoClarify fd inheritance when close_fds=False. (GH-6240)
Miss Islington (bot) [Sun, 25 Mar 2018 17:40:38 +0000 (10:40 -0700)]
Clarify fd inheritance when close_fds=False. (GH-6240)

Clarify the subprocess documentation.
(cherry picked from commit dfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agobpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)
Nick Coghlan [Sun, 25 Mar 2018 13:43:50 +0000 (23:43 +1000)]
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)

Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.

(cherry picked from commit d5d9e02dd3c6df06a8dd9ce75ee9b52976420a8b)

6 years agoTrivial improvements to dataclasses tests. (GH-6234)
Miss Islington (bot) [Sun, 25 Mar 2018 13:27:50 +0000 (06:27 -0700)]
Trivial improvements to dataclasses tests. (GH-6234)

(cherry picked from commit 51c9ab42ab84643081d75c83a586afa45d910383)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years ago[3.7] bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229) (GH-6230)
Miss Islington (bot) [Sun, 25 Mar 2018 11:28:20 +0000 (04:28 -0700)]
[3.7] bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229) (GH-6230)

Harden ssl module against LibreSSL CVE-2018-8970.
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test
ensures that NULL bytes are not allowed.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-33042: Fix pre-initialization sys module configuration (GH-6157)
Miss Islington (bot) [Sun, 25 Mar 2018 11:27:57 +0000 (04:27 -0700)]
bpo-33042: Fix pre-initialization sys module configuration (GH-6157)

- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
  called before Py_Initialize
- also enhanced the existing embedding test cases
  to check for expected settings in the sys module
(cherry picked from commit bc77eff8b96be4f035e665ab35c1d06e22f46491)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
6 years agobpo-32943: Fix confusing error message for rot13 codec (GH-5869)
Miss Islington (bot) [Sun, 25 Mar 2018 04:30:39 +0000 (21:30 -0700)]
bpo-32943: Fix confusing error message for rot13 codec (GH-5869)

(cherry picked from commit e4ce9fa89cb542dced553710b05de85202bc4715)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agoFix invalid escape sequence: use raw string. (GH-6225)
Miss Islington (bot) [Sun, 25 Mar 2018 03:23:00 +0000 (20:23 -0700)]
Fix invalid escape sequence: use raw string. (GH-6225)

(cherry picked from commit c42e7aa67ce72a6c4c6cdfe3b0929ca07556d444)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-33134: dataclasses: use function dispatch table for hash, instead of a string...
Miss Islington (bot) [Sun, 25 Mar 2018 02:31:29 +0000 (19:31 -0700)]
bpo-33134: dataclasses: use function dispatch table for hash, instead of a string lookup which then is tested with if tests. (GH-6222)

* Change _hash_action to be a function table lookup, instead of a list
of strings which is then tested with if statements.
(cherry picked from commit 01d618c5606a239b03ad1269541eddb6e724775d)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoTrivial dataclass cleanups: (GH-6218)
Miss Islington (bot) [Sat, 24 Mar 2018 21:42:28 +0000 (14:42 -0700)]
Trivial dataclass cleanups: (GH-6218)

- When adding a single element to a list, use .append() instead of
  += and creating a new list.
- For consistency, import the copy module, instead of just deepcopy. This
  leaves only a module at the class level, instead of a function.
- Improve some comments.
- Improve some whitespace.
- Use tuples instead of lists.
- Simplify a test.
(cherry picked from commit f96ddade0094d162cb6c2fd7255c5e8a90b5c37d)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-33132: Fix reference counting issues in the compiler. (GH-6209)
Miss Islington (bot) [Sat, 24 Mar 2018 21:27:06 +0000 (14:27 -0700)]
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)

(cherry picked from commit a95d98607efe0c43475b354543e49bf8e240bc6f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years ago[3.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6213)
Miss Islington (bot) [Sat, 24 Mar 2018 17:37:54 +0000 (10:37 -0700)]
[3.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6213)

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>
6 years ago[3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212)
Miss Islington (bot) [Sat, 24 Mar 2018 14:59:16 +0000 (07:59 -0700)]
[3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212)

Commit 141c5e8c re-added match_hostname() call. The resurrection of the
function call was never intended and was solely a merge mistake.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127) (#6162)
Ivan Levkivskyi [Fri, 23 Mar 2018 21:44:54 +0000 (21:44 +0000)]
bpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127) (#6162)

6 years agobpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
Miss Islington (bot) [Fri, 23 Mar 2018 21:41:26 +0000 (14:41 -0700)]
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)

(cherry picked from commit 5cbb84106efefd200933aa31e22abf39267d2557)

Co-authored-by: Himanshu Lakhara <himanshulakhara1947@gmail.com>
6 years agobpo-31639: Use threads in http.server module. (GH-5018)
Miss Islington (bot) [Fri, 23 Mar 2018 20:31:20 +0000 (13:31 -0700)]
bpo-31639: Use threads in http.server module. (GH-5018)

(cherry picked from commit 8bcfa02e4b1b65634e526e197588bc600674c80b)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agoFix a reference to the MRE book in re docs (GH-1113)
Miss Islington (bot) [Fri, 23 Mar 2018 15:55:26 +0000 (08:55 -0700)]
Fix a reference to the MRE book in re docs (GH-1113)

Reported by Maksym Nikulyak on docs.p.o.
(cherry picked from commit a0a42d22d8dff0ec6ea9daa4d9c9e9399f9b4e6c)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
6 years agobpo-33041: Fixed jumping if the function contains an "async for" loop. (GH-6154)
Serhiy Storchaka [Fri, 23 Mar 2018 12:35:33 +0000 (14:35 +0200)]
bpo-33041: Fixed jumping if the function contains an "async for" loop. (GH-6154)

6 years agobpo-32999: ast: Convert useless check to assert (GH-6197)
Miss Islington (bot) [Fri, 23 Mar 2018 09:43:11 +0000 (02:43 -0700)]
bpo-32999: ast: Convert useless check to assert (GH-6197)

(cherry picked from commit c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but...
Miss Islington (bot) [Thu, 22 Mar 2018 20:58:59 +0000 (13:58 -0700)]
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but doesn't have a type annotation. (GH-6192)

If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.
(cherry picked from commit 56970b8ce9d23269d20a76f13c80e670c856ba7f)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189) (GH-6190)
Miss Islington (bot) [Thu, 22 Mar 2018 14:00:11 +0000 (07:00 -0700)]
bpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189) (GH-6190)

bpo-33018 (GH-5944) fixed bpo-32999 too.  So fc7df0e6 is not required
anymore.  Revert it except test case.
(cherry picked from commit f757b72b2524ce3451d2269f0b8a9f0593a7b27f)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-33018: Improve issubclass() error checking and message. (GH-5944)
Miss Islington (bot) [Thu, 22 Mar 2018 11:49:26 +0000 (04:49 -0700)]
bpo-33018: Improve issubclass() error checking and message. (GH-5944)

This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.
(cherry picked from commit 40472dd42de4f7265d456458cd13ad6894d736db)

Co-authored-by: jab <jab@users.noreply.github.com>
6 years agoUpgrade pip to v9.0.3 and setuptools to v39.0.1 (GH-6184)
Miss Islington (bot) [Thu, 22 Mar 2018 03:38:24 +0000 (20:38 -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>
6 years agobpo-33116: Add 'Field' to dataclasses.__all__. (GH-6182) (GH-6183)
Miss Islington (bot) [Wed, 21 Mar 2018 21:44:23 +0000 (14:44 -0700)]
bpo-33116: Add 'Field' to dataclasses.__all__. (GH-6182) (GH-6183)

- Add missing 'Field' to __all__.
- Improve tests to catch this.
(cherry picked from commit 8e4560a9da6a02aa157dd7df8bd0be0d258c0a73)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoFIX failure on OSX sem_getvalue (GH-6180) (GH-6181)
Miss Islington (bot) [Wed, 21 Mar 2018 19:00:55 +0000 (12:00 -0700)]
FIX failure on OSX sem_getvalue (GH-6180) (GH-6181)

(cherry picked from commit dec1c7786f642049c2508e909442189dc043b5da)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
6 years agobpo-33078 - Fix queue size on pickling error (GH-6119) (GH-6178)
Miss Islington (bot) [Wed, 21 Mar 2018 16:21:15 +0000 (09:21 -0700)]
bpo-33078 - Fix queue size on pickling error (GH-6119) (GH-6178)

(cherry picked from commit e2f33add635df4fde81be9960bab367e010c19bf)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
6 years agobpo-32896: Fix error when subclassing a dataclass with a field that uses a default_fa...
Miss Islington (bot) [Wed, 21 Mar 2018 09:17:30 +0000 (02:17 -0700)]
bpo-32896: Fix error when subclassing a dataclass with a field that uses a default_factory (GH-6170) (GH-6171)

Fix the way that new annotations in a class are detected.
(cherry picked from commit 8f6eccdc64cab735c47620fea948e64b19f83684)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoFix typos in mmap() error messages (GH-6173)
Miss Islington (bot) [Wed, 21 Mar 2018 06:24:41 +0000 (23:24 -0700)]
Fix typos in mmap() error messages (GH-6173)

(cherry picked from commit 9308dea3e1fd565d50a76a667e4e8ef0568b7053)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
Miss Islington (bot) [Wed, 21 Mar 2018 01:22:23 +0000 (18:22 -0700)]
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)

The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.
(cherry picked from commit 10b134a07c898c2fbc5fd3582503680a54ed80a2)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-18802: Add more details to ipaddress documentation (GH-6083)
Miss Islington (bot) [Wed, 21 Mar 2018 00:30:43 +0000 (17:30 -0700)]
bpo-18802: Add more details to ipaddress documentation (GH-6083)

Original patch by Jon Foster and Berker Peksag.
(cherry picked from commit 5609b78392d59c7362ef8aa5c4a4529325f01f27)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-28247: Document Windows executable creation in zipapp (GH-6158)
Miss Islington (bot) [Tue, 20 Mar 2018 22:44:21 +0000 (15:44 -0700)]
bpo-28247: Document Windows executable creation in zipapp (GH-6158)

(cherry picked from commit 4be79f29463f632cd8b48486feadc2ed308fb520)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years ago[3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)
Miss Islington (bot) [Tue, 20 Mar 2018 19:16:30 +0000 (12:16 -0700)]
[3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)

fstat may block for long time if the file descriptor is on a
non-responsive NFS server, hanging all threads. Most fstat() calls are
handled by _Py_fstat(), releasing the GIL internally, but but
_Py_fstat_noraise() does not release the GIL, and most calls release the
GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs
when calling:
- mmap.mmap()
- os.urandom()
- random.seed()
(cherry picked from commit 4484f9dca9149da135bbae035f10a50d20d1cbbb)

Co-authored-by: Nir Soffer <nirsof@gmail.com>
6 years agobpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152...
Miss Islington (bot) [Tue, 20 Mar 2018 01:31:22 +0000 (18:31 -0700)]
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152) (GH-6153)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd935c95b4b6f094312294e703ee0de18719)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived...
Miss Islington (bot) [Mon, 19 Mar 2018 01:03:36 +0000 (18:03 -0700)]
bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (GH-6147) (GH-6148)

If a non-dataclass derives from a frozen dataclass, allow attributes to be set.
Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen.
Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes.
(cherry picked from commit f199bc655eb50c28e94010714629b376bbbd077b)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)
Miss Islington (bot) [Sun, 18 Mar 2018 20:50:41 +0000 (13:50 -0700)]
bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)

(cherry picked from commit 134cb01cda50f02725575808130b05d2d776693f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-19417: Add test_bdb.py (GH-5217)
Miss Islington (bot) [Sun, 18 Mar 2018 20:25:15 +0000 (13:25 -0700)]
bpo-19417: Add test_bdb.py (GH-5217)

(cherry picked from commit 3fe33043ee83d19e15551094fc1e0984617ded3c)

Co-authored-by: xdegaye <xdegaye@gmail.com>
6 years agoRevert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)
Miss Islington (bot) [Sun, 18 Mar 2018 19:15:52 +0000 (12:15 -0700)]
Revert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)

This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.

(Reverts only the lib2to3 part.)
(cherry picked from commit f64aae46da292f71f6be750026cd052362e066bc)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
6 years ago[3.7] bpo-33041: Add tests for jumps in/out of 'async with' blocks. (GH-6110). (GH...
Serhiy Storchaka [Sun, 18 Mar 2018 10:31:37 +0000 (12:31 +0200)]
[3.7] bpo-33041: Add tests for jumps in/out of 'async with' blocks. (GH-6110). (GH-6140)

(cherry picked from commit bc300ce205f99acb1ef92c37de06dc76147e073b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
Miss Islington (bot) [Sun, 18 Mar 2018 06:24:33 +0000 (23:24 -0700)]
bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)

It was actually fixed in SQLite 3.8.8, not 3.8.7.

(cherry picked from commit bbf7bb7a636b3112ef6f6b31df385606d52517ce)

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
6 years agoUpdate pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (#6134)
Miss Islington (bot) [Sat, 17 Mar 2018 15:46:05 +0000 (08:46 -0700)]
Update pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (#6134)

(cherry picked from commit 7f81bb2addbbccfa45a2fc1aa6030f26dcf4bd78)

Co-authored-by: Donald Stufft <donald@stufft.io>
6 years agobpo-32374: m_traverse may be called with m_state=NULL (GH-5140)
Miss Islington (bot) [Sat, 17 Mar 2018 06:03:56 +0000 (23:03 -0700)]
bpo-32374:  m_traverse may be called with m_state=NULL (GH-5140)

Multi-phase initialized modules allow m_traverse to be called while the
module is still being initialized, so module authors may need to account
for that.
(cherry picked from commit c2b0b12d1a137ada1023ab7c10b8d9a0249d95f9)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
6 years ago[3.7] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772...
Miss Islington (bot) [Wed, 14 Mar 2018 17:52:28 +0000 (10:52 -0700)]
[3.7] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772) (#6103)

Creating backup files with ~ suffix can be undesirable in some environment,
such as when building RPM packages. Instead of requiring the user to remove
those files manually, option -n was added, that simply disables this feature.

-n was selected because 2to3 has the same option with this behavior.
(cherry picked from commit 5affd5c29eb1493cb31ef3cfdde15538ac134689)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
6 years agolib2to3: Add more tests (GH-6101) (#6108)
Miss Islington (bot) [Tue, 13 Mar 2018 18:20:38 +0000 (11:20 -0700)]
lib2to3: Add more tests (GH-6101) (#6108)

(cherry picked from commit 74f56878cdee18d485e4f8b485d55ce62e38f4c9)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
6 years agobpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (GH-6084) (#6092)
Miss Islington (bot) [Tue, 13 Mar 2018 09:10:57 +0000 (02:10 -0700)]
bpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (GH-6084) (#6092)

(cherry picked from commit 095ee415cee41bf24c3a1108c23307e5baf168dd)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
6 years ago[3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-5928)
xdegaye [Tue, 13 Mar 2018 08:52:35 +0000 (09:52 +0100)]
[3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-5928)

6 years agobpo-33064: lib2to3: support trailing comma after *args and **kwargs (GH-6096) (#6097)
Miss Islington (bot) [Tue, 13 Mar 2018 08:08:02 +0000 (01:08 -0700)]
bpo-33064: lib2to3: support trailing comma after *args and **kwargs (GH-6096) (#6097)

New tests also added.

I also made the comments in line with the builtin Grammar/Grammar. PEP 306 was
withdrawn, Kees Blom's railroad program has been lost to the sands of time for
at least 16 years now (I found a python-dev post from people looking for it).
(cherry picked from commit b51f5de71163f096d2d5229ede5379cdb284f651)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
6 years agobpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094)
Ned Deily [Tue, 13 Mar 2018 01:16:54 +0000 (21:16 -0400)]
bpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094)

6 years agoAdd macOS installer Conclusion file
Ned Deily [Mon, 12 Mar 2018 19:44:21 +0000 (15:44 -0400)]
Add macOS installer Conclusion file

6 years agoFix docs markup for asyncio current_task() and all_tasks() (GH-6089)
Miss Islington (bot) [Mon, 12 Mar 2018 19:12:05 +0000 (12:12 -0700)]
Fix docs markup for asyncio current_task() and all_tasks() (GH-6089)

(cherry picked from commit b21505e7109bafe75d87ab63d524b4e749157dbd)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agobpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) (GH...
Miss Islington (bot) [Sun, 11 Mar 2018 18:42:37 +0000 (11:42 -0700)]
bpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) (GH-6080)

In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows).  Avoid failing with a non-0 exit code in those conditions.

Report and initial patch by poxthegreat.
(cherry picked from commit e756f66c83786ee82f5f7d45931ae50a6931dd7f)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
6 years ago[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026)....
Serhiy Storchaka [Sun, 11 Mar 2018 07:30:13 +0000 (09:30 +0200)]
[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (#6074)

(cherry picked from commit 26c9f565d016db21257a60d29ab2c99383dd5ac7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32338: OrderedDict import is no longer needed in re. (GH-4891)
Miss Islington (bot) [Sun, 11 Mar 2018 07:01:58 +0000 (23:01 -0800)]
bpo-32338: OrderedDict import is no longer needed in re. (GH-4891)

(cherry picked from commit b931bd0a2fe7e9293339019352baf3317166b769)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32996: Improve What's New in 3.7. (GH-5983)
Miss Islington (bot) [Sun, 11 Mar 2018 06:29:30 +0000 (22:29 -0800)]
bpo-32996: Improve What's New in 3.7. (GH-5983)

(cherry picked from commit 51302a5fcc557e6afc0bf1e3b371f5f37c76dc77)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-33045: Fix typos in SSL documentation (GH-6065)
Miss Islington (bot) [Sun, 11 Mar 2018 01:21:27 +0000 (17:21 -0800)]
bpo-33045: Fix typos in SSL documentation (GH-6065)

(cherry picked from commit 9cf8c42f3231d3f066670d087a997bd1278482a0)

Co-authored-by: Matt Eaton <agnosticdev@gmail.com>
6 years agobpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
Miss Islington (bot) [Sun, 11 Mar 2018 00:59:11 +0000 (16:59 -0800)]
bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)

(cherry picked from commit 7280a4eef5fbe17e8ac82afd71fe6e51843240a5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
6 years agocontrolflow: Use full example for "5 through 9" (GH-5907)
Miss Islington (bot) [Sat, 10 Mar 2018 23:25:14 +0000 (15:25 -0800)]
controlflow: Use full example for "5 through 9" (GH-5907)

Replace example result of "5 through 9" with complete list: "5, 6, 7, 8, 9".
This format is more consistent with the surrounding examples.
(cherry picked from commit 83d7062d2dc5eacfef578e072bca4747c346fdae)

Co-authored-by: Steven M. Vascellaro <S.Vascellaro@gmail.com>
6 years agobpo-32836: Remove obsolete code from symtable pass (GH-5680)
Miss Islington (bot) [Sat, 10 Mar 2018 23:11:47 +0000 (15:11 -0800)]
bpo-32836: Remove obsolete code from symtable pass (GH-5680)

When comprehensions switched to using a nested scope, the old
code for generating a temporary name to hold the accumulation
target became redundant, but was never actually removed.

Patch by Nitish Chandra.
(cherry picked from commit 3a087beddd9f0955eb9080a6fd1499ff89ca74bf)

Co-authored-by: Nitish Chandra <nitishchandrachinta@gmail.com>
6 years agobpo-27645: Add support for native backup facility of SQLite (GH-4238)
Miss Islington (bot) [Sat, 10 Mar 2018 22:29:19 +0000 (14:29 -0800)]
bpo-27645: Add support for native backup facility of SQLite (GH-4238)

(cherry picked from commit d7aed4102d2a40c74553240c7f03585624d27aea)

Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
6 years ago[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)
Serhiy Storchaka [Sat, 10 Mar 2018 18:45:05 +0000 (20:45 +0200)]
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)

and remove redundant code.
(cherry picked from commit 67ee07795bcd84b679c000780212d4d81a1490a3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) (GH-6057)
Miss Islington (bot) [Sat, 10 Mar 2018 16:27:01 +0000 (08:27 -0800)]
bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) (GH-6057)

* Skip write()/data_received() if sslpipe is destroyed
(cherry picked from commit 5e80a71ab67045fecec46573a1892e240b569ace)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agobpo-26701: Improve documentation for the rounding special methods. (GH-6054)
Miss Islington (bot) [Sat, 10 Mar 2018 15:49:24 +0000 (07:49 -0800)]
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)

(cherry picked from commit 496431ffb6c29719332bf2af773349e8dd85e45a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-26701: Add documentation for __trunc__ (GH-6049)
Miss Islington (bot) [Sat, 10 Mar 2018 15:10:32 +0000 (07:10 -0800)]
bpo-26701: Add documentation for __trunc__ (GH-6049)

`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
(cherry picked from commit 308eab979d153f1ab934383dc08bc4546ced8b6c)

Co-authored-by: Eric Appelt <eric.appelt@gmail.com>
6 years agoWarn that dbm.dumb.open() can crash Python (GH-6047) (GH-6048)
Miss Islington (bot) [Sat, 10 Mar 2018 00:12:54 +0000 (16:12 -0800)]
Warn that dbm.dumb.open() can crash Python (GH-6047) (GH-6048)

(cherry picked from commit 10485ebd40669d3e17ab4f477c8c898543bcccd1)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agoWarn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)
Miss Islington (bot) [Fri, 9 Mar 2018 21:40:26 +0000 (13:40 -0800)]
Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)

(cherry picked from commit f7a6ff6fcab32a53f262ba3f8a072c27afc330d7)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agobpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter...
Miss Islington (bot) [Fri, 9 Mar 2018 20:35:42 +0000 (12:35 -0800)]
bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960) (GH-6041)

(cherry picked from commit 7a7f100eb352d08938ee0f5ba59c18f56dc4a7b5)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agobpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
Miss Islington (bot) [Fri, 9 Mar 2018 18:14:14 +0000 (10:14 -0800)]
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e)

Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
6 years agobpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (GH...
Miss Islington (bot) [Thu, 8 Mar 2018 16:26:43 +0000 (08:26 -0800)]
bpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (GH-6010)

(cherry picked from commit 3b20d3454e8082e07dba93617793de5dc9237828)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years agoAdd two missing error checks in hamt.c (GH-5851)
Miss Islington (bot) [Thu, 8 Mar 2018 06:21:34 +0000 (22:21 -0800)]
Add two missing error checks in hamt.c (GH-5851)

(cherry picked from commit 3c7ac7ea2098c672e50402d1d1b5ee9f14586437)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agoFix some ipaddress documentation errors (GH-6021)
Miss Islington (bot) [Thu, 8 Mar 2018 04:35:52 +0000 (20:35 -0800)]
Fix some ipaddress documentation errors (GH-6021)

* fix a typo: documention -> documentation
* fix the type of IPv?Network.hostmask
* add documentation about IPv?Network.netmask
* fix IPv6Network constructor doc that extended netmasks are not supported
(cherry picked from commit e405096ea91f516d411095b6fea4eec9668eac88)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)
Miss Islington (bot) [Wed, 7 Mar 2018 07:47:40 +0000 (23:47 -0800)]
bpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)

(cherry picked from commit fc7df0e664198cb05cafd972f190a18ca422989c)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)
Miss Islington (bot) [Wed, 7 Mar 2018 05:26:19 +0000 (21:26 -0800)]
bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)

(cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)
Miss Islington (bot) [Tue, 6 Mar 2018 18:23:48 +0000 (10:23 -0800)]
bpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)

(cherry picked from commit 8a387219bdfb6ee34928d6168ac42ca559f11c9a)

Co-authored-by: Yury Selivanov <yury@magic.io>
6 years agobpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace...
Miss Islington (bot) [Tue, 6 Mar 2018 15:16:11 +0000 (07:16 -0800)]
bpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace package (GH-5980) (GH-5997)

* bpo-32991: Add test capturing expectation.

DocTestFinder.find should return an empty list for doctests in a namespace package.

* bpo-32991: Restore expectation that inspect.getfile on a namespace package raises TypeError.
(cherry picked from commit b9650a04a81355c8a7dcd0464c28febfb4bfc0a9)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
6 years agobpo-33005: Fix _PyGILState_Reinit() (GH-6001)
Miss Islington (bot) [Tue, 6 Mar 2018 13:52:27 +0000 (05:52 -0800)]
bpo-33005: Fix _PyGILState_Reinit() (GH-6001)

Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var).

_PyGILState_Reinit() and _PyInterpreterState_Enable() now use the
default RAW memory allocator to allocate a new interpreters mutex on
fork.
(cherry picked from commit 5d92647102fac9e116b98ab8bbc632eeed501c34)

Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
6 years agobpo-33001: Prevent buffer overrun in os.symlink (GH-5989)
Miss Islington (bot) [Mon, 5 Mar 2018 23:12:56 +0000 (15:12 -0800)]
bpo-33001: Prevent buffer overrun in os.symlink (GH-5989)

(cherry picked from commit 6921e73e33edc3c61bc2d78ed558eaa22a89a564)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agoAdd What's New for issues 32303 and 32305 (GH-5994) (GH-5995)
Miss Islington (bot) [Mon, 5 Mar 2018 20:51:56 +0000 (12:51 -0800)]
Add What's New for issues 32303 and 32305 (GH-5994) (GH-5995)

(cherry picked from commit 4c19b95734faee4c390c1d0569dc876980c33d2c)

Co-authored-by: Barry Warsaw <barry@python.org>
6 years agobpo-32984: IDLE - set __file__ for startup files (GH-5981)
Miss Islington (bot) [Mon, 5 Mar 2018 16:49:15 +0000 (08:49 -0800)]
bpo-32984: IDLE - set __file__ for startup files (GH-5981)

Like Python, IDLE optionally runs one startup file in the Shell window
before presenting the first interactive input prompt.  For IDLE,
option -s runs a file named in environmental variable IDLESTARTUP or
PYTHONSTARTUP; -r file runs file.  Python sets __file__ to the startup
file name before running the file and unsets it before the first
prompt.  IDLE now does the same when run normally, without the -n
option.
(cherry picked from commit 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years ago[3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)
Miss Islington (bot) [Sun, 4 Mar 2018 23:22:32 +0000 (15:22 -0800)]
[3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)

(cherry picked from commit 18fd89246333bfa1b76c1623df689214f3ce2bf3)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)
Miss Islington (bot) [Sun, 4 Mar 2018 12:00:33 +0000 (04:00 -0800)]
bpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)

(cherry picked from commit 74382a3f175ac285cc924a73fd758e8dc3cc41bb)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32981: Fix catastrophic backtracking vulns (GH-5955)
Miss Islington (bot) [Sun, 4 Mar 2018 05:55:07 +0000 (21:55 -0800)]
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>
Co-authored-by: Jamie Davis <davisjam@vt.edu>
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)