Commit Graph

106036 Commits

Author SHA1 Message Date
Kyle Stanley cc011b5190
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (#19784)
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777)

* Addresses a syntax typo that mistakenly used a undefined string prefix due to a missing space.

(cherry picked from commit 49f70db83e)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-04-28 23:11:18 -04:00
Miss Islington (bot) 9412f4d1ad
bpo-40348: Fix typos in the programming FAQ (GH-19729)
(cherry picked from commit caf1aadf3d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-04-26 20:29:30 -07:00
Zachary Ware ca5649c4c1
[3.8] bpo-38387: Formally document PyDoc_STRVAR and PyDoc_STR macros (GH-16607) (GH-19727)
Adds a short description of `PyDoc_STRVAR` and `PyDoc_STR` to "Useful macros" section of C-API docs.

Currently, there is [one lone mention](https://docs.python.org/3/c-api/module.html?highlight=pydoc_strvarGH-c.PyModuleDef) in the C-API reference, despite the fact that `PyDoc_STRVAR` is ubiquitous to `Modules/`.

Additionally, this properly uses `c:macro` within `Doc/c-api/module.rst` to link.
(cherry picked from commit b54e46c)

Authored-by: Brad Solomon <brad.solomon.1124@gmail.com>
2020-04-26 21:45:05 -05:00
Miss Islington (bot) 179f22c3b7
bpo-40387: Improve queue join() example. (GH-19724) (GH-19726) 2020-04-26 18:23:14 -07:00
Miss Islington (bot) 882a7f44da
bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) (GH-19710)
(cherry picked from commit d4f3923d59)

Co-authored-by: Cajetan Rodrigues <caje731@gmail.com>
2020-04-25 07:45:48 +02:00
Miss Islington (bot) c7b55e929b
Expand the implementation comments (GH-19699) (GH-19701) 2020-04-24 03:04:41 -07:00
Victor Stinner d9df63deab
bpo-40048: Fix _PyCode_InitOpcache() error path (GH-19691) (GH-19698)
If _PyCode_InitOpcache() fails in _PyEval_EvalFrameDefault(), use
"goto exit_eval_frame;" rather than "return NULL;" to exit the
function in a consistent state. For example, tstate->frame is now
reset properly.

(cherry picked from commit 25104949a5)
2020-04-24 03:07:20 +02:00
Victor Stinner 3340b2a61b
bpo-39983: Add test.support.print_warning() (GH-19683) (GH-19687)
Log "Warning -- ..." test warnings into sys.__stderr__ rather than
sys.stderr, to ensure to display them even if sys.stderr is captured.

test.libregrtest.utils.print_warning() now calls
test.support.print_warning().

(cherry picked from commit d663d34685)
2020-04-23 23:55:07 +02:00
Miss Islington (bot) 714aa832a5
gdbinit: Use proper define syntax (GH-19557)
Using `def` rather than `define` results in:

    Ambiguous command "def pu": define, define-prefix.

Automerge-Triggered-By: @csabella
(cherry picked from commit 1221135289)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-04-23 05:55:29 -07:00
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