Commit Graph

105977 Commits

Author SHA1 Message Date
Miss Islington (bot) 22a4849cd8
Minor modernization and readability improvement to the tokenizer example (GH-19558) (GH-19661)
(cherry picked from commit bf1a81258c)
2020-04-22 13:50:32 -07:00
Miss Islington (bot) fc45cb4400
bpo-40260: Remove unnecessary newline in compile() call (GH-19641)
Because some people subclass this class and call undocumented methods, and we don't want to break them.
(cherry picked from commit 39652cd8bd)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2020-04-22 12:05:10 -07:00
Miss Islington (bot) 4a6da0b63b
bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480)
It is possible to use either '-isysroot /some/path' (with a space) or
'-isysroot/some/path' (no space in between). Support both forms in
places where special handling of -isysroot is done, rather than just
the first form.
Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit b310700976)

Co-authored-by: Joshua Root <jmr@macports.org>
2020-04-22 10:13:47 -07:00
Victor Stinner b07350901c
bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19654)
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
2020-04-22 17:57:59 +02:00
Miss Islington (bot) 3a55450256
bpo-38439: Add 256px IDLE icon (GH-17473)
Icon author: Andrew Clover, bpo-1490384
(cherry picked from commit 3a69f3caee)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-04-22 00:39:59 -07:00
Miss Islington (bot) 9e51aab37e
bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. (GH-19642)
(cherry picked from commit 783a673f23)

Co-authored-by: Ned Deily <nad@python.org>
2020-04-21 20:00:27 -07:00
Miss Islington (bot) 7d65c045de
Small improvements to the recipes and examples. (GH-19635) (GH-19638)
* Add underscores to long numbers to improve readability
* Use bigger dataset in the bootstrapping example
* Convert single-server queue example to more useful multi-server queue
(cherry picked from commit d3a8d616fa)
2020-04-21 16:18:49 -07:00
Miss Islington (bot) 41660cac63
bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)
https://bugs.python.org/issue39942
(cherry picked from commit a25a04fea5)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
2020-04-20 13:24:35 -07:00
Antoine Pitrou 887ff8e37e
[3.8] bpo-40330: Fix utf-8 size check in ShareableList (GH-19606) (GH-19625)
The item size must be checked after encoding to bytes, not before.

Automerge-Triggered-By: @pitrou.
(cherry picked from commit eba9f6155d)

Co-authored-by: Antoine Pitrou <antoine@python.org>
2020-04-20 21:22:50 +02:00
Miss Islington (bot) 81de3c2257
bpo-40260: Revert breaking changes made in modulefinder (GH-19595)
(cherry picked from commit 9b0b5d2bae)

Co-authored-by: Barry <barry@barrys-emacs.org>
2020-04-20 08:18:11 -07:00
Miss Islington (bot) 984a567cbb
Fix typo in Lib/tracepack.py (GH-19605)
Typo fix: "emites" -> "emit".
(cherry picked from commit df8913f7c4)

Co-authored-by: Galden <wudenggang0@163.com>
2020-04-19 19:36:03 -07:00
Miss Islington (bot) 8c07343976
bpo-39285: Clarify example for PurePath.match (GH-19458)
Fixes Issue39285

The example incorrectly returned True for match.

Furthermore the example is ambiguous in its usage of PureWindowsPath.
Windows is case-insensitve, however the underlying match functionality
utilizes fnmatch.fnmatchcase.

Automerge-Triggered-By: @pitrou
(cherry picked from commit c12375aa0b)

Co-authored-by: Tim Lo <timlo@users.noreply.github.com>
2020-04-19 03:03:35 -07:00
Miss Islington (bot) 020f2aaaea
bpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269)
Automerge-Triggered-By: @pitrou
(cherry picked from commit 482259d0dc)

Co-authored-by: Furkan Önder <furkantahaonder@gmail.com>
2020-04-18 11:14:55 -07:00
Serhiy Storchaka bfda4db0d2
[3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) (GH-19583)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
(cherry picked from commit 12446e6a60)
2020-04-18 19:11:48 +03:00
Miss Islington (bot) 904dd068fb
Fix two typos in multiprocessing (GH-19571) (GH-19578)
(cherry picked from commit c606624af8)

Co-authored-by: Galden <wudenggang0@163.com>

Co-authored-by: Galden <wudenggang0@163.com>
2020-04-18 09:24:15 +02:00
Miss Islington (bot) 9796fe88da
bpo-40287: Fix SpooledTemporaryFile.seek() return value (GH-19540)
It has not returned the file position after the seek.
(cherry picked from commit 485e715cb1)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-04-17 00:14:55 -07:00
Miss Islington (bot) 6b0ca0aeab
bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542)
(cherry picked from commit a75e730075)

Co-authored-by: Jeffrey Quesnelle <jquesnelle@gmail.com>
2020-04-16 19:29:50 -07:00
Miss Islington (bot) 08b640f572
Fix parameter names in assertIn() docs (GH-18829)
The names "member" and "container" for the arguments are also used in the module and shown with the help() function, and are immediately understandable in this context, contrary to "first" and "second".
(cherry picked from commit a388bbd3f1)

Co-authored-by: Christoph Zwerschke <cito@online.de>
2020-04-16 19:06:11 -07:00
Miss Islington (bot) ccf30e96d4
bpo-39793: use the same domain on make_msgid tests (GH-18698) (GH-19554)
(cherry picked from commit 5565c30f0b)

Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
2020-04-16 14:07:52 -04:00
Miss Islington (bot) 3e72de9e08
[3.8] bpo-39667: Sync zipp 3.0 (GH-18540) (GH-18701)
* bpo-39667: Sync zipp 3.0 (GH-18540)

* bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct performance degradation as found in zipp 3.0

* 📜🤖 Added by blurb_it.

* Update docs for new zipfile.Path.open

* Rely on dict, faster than OrderedDict.

* Syntax edits on docs

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0aeab5c438)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Clarify the change in behavior with a couple of workaround options.

* Restore API compatibility while backporting performance improvements.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2020-04-15 14:45:25 -04:00
Miss Islington (bot) 59047fab0e
bpo-40260: Update modulefinder to use io.open_code() and respect coding comments (GH-19488)
(cherry picked from commit d42e582063)

Co-authored-by: Barry <barry@barrys-emacs.org>
2020-04-14 12:34:41 -07:00
Miss Islington (bot) 1e1dbdf23f
bpo-32033: Fix test_pwd failures on Android (GH-19502)
(cherry picked from commit 96515e9f67)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-04-14 11:31:00 -07:00
Victor Stinner 67b8a1f0f0
[3.8] Update libregrtest from master (GH-19516)
* bpo-37531: regrtest now catchs ProcessLookupError (GH-16827)

Fix a warning on a race condition on TestWorkerProcess.kill(): ignore
silently ProcessLookupError rather than logging an useless warning.

(cherry picked from commit a661392f8f)

* bpo-38502: regrtest uses process groups if available (GH-16829)

test.regrtest now uses process groups in the multiprocessing mode
(-jN command line option) if process groups are available: if
os.setsid() and os.killpg() functions are available.

(cherry picked from commit ecb035cd14)

* bpo-37957: Allow regrtest to receive a file with test (and subtests) to ignore (GH-16989)

When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored.

For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.

(cherry picked from commit e0cd8aa70a)

* regrtest: log timeout at startup (GH-19514)

Reduce also worker timeout.

(cherry picked from commit 4cf65a630a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-04-14 19:51:18 +02:00
Miss Islington (bot) c496e29c2b
closes bpo-40266, closes bpo-39953: Use numeric lib code if compiling against old OpenSSL. (GH-19506)
(cherry picked from commit 584a3cfda4)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-04-13 20:31:18 -07:00
Miss Islington (bot) ee691b078b
[3.8] Improved documentation for `BUILD_CONST_KEY_MAP` (GH-19454) (GH-19495)
(cherry picked from commit 85dd6bb1f6)


Co-authored-by: laike9m <laike9m@users.noreply.github.com>

Automerge-Triggered-By: @zhangyangyu
2020-04-12 20:01:53 -07:00
Miss Islington (bot) f35e7d3bb0
closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)
(cherry picked from commit 909b87d2bb)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-04-12 12:17:34 -07:00
Miss Islington (bot) 61511488cf
bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object (GH-3997) (GH-19485)
(cherry picked from commit 402e1cdb13)
2020-04-12 17:18:57 +02:00
Serhiy Storchaka ee249d798b
[3.8] bpo-40126: Fix reverting multiple patches in unittest.mock. (GH-19351) (GH-19483)
Patcher's __exit__() is now never called if its __enter__() is failed.
Returning true from __exit__() silences now the exception.
(cherry picked from commit 4b222c9491)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-04-12 14:53:46 +03:00
Miss Islington (bot) 2714c907df
closes bpo-39953: Update OpenSSL error codes table. (GH-19082)
I updated the error codes using the OpenSSL 1.1.1f source tree.
(cherry picked from commit 3e0dd3730b)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-04-11 13:53:00 -07:00
Miss Islington (bot) ceba0648d7
bpo-38501: Add a warning section to multiprocessing.Pool docs about resource managing (GH-19466)
(cherry picked from commit 7ec43a7309)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-04-10 19:11:17 -07:00
Miss Islington (bot) 1bf7dee8d3
bpo-40197: Better describe the benchmark results table (GH-19386)
(cherry picked from commit c63629e7c0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2020-04-10 13:00:15 -07:00
Miss Islington (bot) 10dabbf8d2
Remove extraneous ')' in abstract.h (GH-19146) (#19451)
(cherry picked from commit ac2cfe6631)

Co-authored-by: Jimmy Yang <codingExpert123@gmail.com>
2020-04-09 14:55:00 -04:00
Victor Stinner cd8e1da3ea
bpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler is xlc on AIX (GH-19225) (GH-19444)
(cherry picked from commit 76db37b1d3)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2020-04-09 17:32:21 +02:00
Miss Islington (bot) c83f003ee5
bpo-40214: Temporarily disable a ctypes test (GH-19404)
Only one particular sub-test of
ctypes.test.test_loading.test_load_dll_with_flags is disabled, which
caused failures on Azure Pipelines CI.
(cherry picked from commit f407e209c1)

Co-authored-by: Zachary Ware <zach@python.org>
2020-04-09 05:31:42 -07:00
Victor Stinner 37a257c0ae
bpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile (GH-19442) 2020-04-09 00:36:13 +02:00
Miss Islington (bot) 6318e45bda
bpo-40089: Fix threading._after_fork() (GH-19191) (GH-19194)
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44ce4c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-07 23:35:52 +02:00
Miss Islington (bot) 8bd84e7f79
bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391) (GH-19394)
(cherry picked from commit 799d7d61a9)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-04-06 17:41:55 +01:00
Miss Islington (bot) f7b0259d0d
Fix misinformation about NaN != NaN comparison (GH-19357) (GH-19383)
(cherry picked from commit 810f68f128)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2020-04-05 10:56:37 +01:00
Benjamin Peterson 4115550754
[3.8] closes bpo-40184: Only define pysiphash if the hash algorithm is SIPHASH24. (GH-19373)
(cherry picked from commit 1b21573)

Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
2020-04-04 16:46:54 -05:00
Serhiy Storchaka 0d1d7c8bae
bpo-36320: Use the deprecated-removed directive for _field_types (GH-19370) 2020-04-05 00:43:07 +03:00
Steve Dower 37126e7bd2
bpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359) 2020-04-04 15:47:40 +01:00
Miss Islington (bot) 15337726e5
bpo-38689: avoid IDLE hanging when calltip fails getting a signature (GH-17152)
Inspect.signature failed on the test case because its isinstance call raised.
(cherry picked from commit 52013e5b6d)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2020-04-03 20:25:06 -07:00
Miss Islington (bot) e6685ad053
bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)
Fix default Python home path relative to the NuGet package
(cherry picked from commit 6e623ff9d2)

Co-authored-by: Chris Martinez <sydefekt@hotmail.com>
2020-04-03 23:20:12 +01:00
Miss Islington (bot) e6783981df
bpo-40131: Fix source and target order in zipapp example (GH-19290) (GH-19339)
(cherry picked from commit bd6a4c3d72)


Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-04-03 22:43:58 +05:30
Miss Islington (bot) 77c623ba3d
bpo-40122: Updated documentation for dis.findlabels() (GH-19274)
(cherry picked from commit b74468e233)

Co-authored-by: laike9m <laike9m@users.noreply.github.com>
2020-04-03 01:07:16 -07:00
Miss Islington (bot) f2296ef9ce
bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines (GH-19320)
Update also OpenSSL version in Ubuntu and Coverage jobs.
(cherry picked from commit 1767a0490f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-02 18:25:51 -07:00
Miss Islington (bot) 1c325c4e0b
bpo-40162: Update Travis CI config to OpenSSL 1.1.1f (GH-19319)
(cherry picked from commit b1ffb8b723)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-02 18:21:54 -07:00
Victor Stinner 745bd91bab
bpo-40140: test_builtin.PtyTests registers SIGHUP handler (GH-19314) (GH-19316)
test_builtin.PtyTests now registers an handler for SIGHUP signal.
Closing the PTY file descriptor can emit a SIGHUP signal: just ignore
it.

run_child() now also closes the PTY file descriptor before waiting
for the process completition, otherwise the test hangs on AIX.

(cherry picked from commit 7a51a7e19f)
2020-04-03 02:11:54 +02:00
Miss Islington (bot) 1098671e4e
lib2to3: Support named assignment expressions (GH-12702)
There are two copies of the grammar -- the one used by Python itself as
Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at
Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it
to be reasonable stable to avoid requiring fixer rewrites.

This brings suport for syntax like `if x:= foo():` to match what the live
Python grammar does.

This should've been added at the time of the walrus operator itself, but lib2to3 being
independent is often overlooked.  So we do consider this a bugfix rather than enhancement.
(cherry picked from commit 3c3aa4516c)

Co-authored-by: Tim Hatch <tim@timhatch.com>
2020-04-02 16:03:09 -07:00
Miss Islington (bot) b7345c24a4
bpo-38972: Link to instructions to change PowerShell execution policy (GH-19131)
(cherry picked from commit 45217af29c)

Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
2020-04-02 12:19:41 -07:00