Commit Graph

108030 Commits

Author SHA1 Message Date
Miss Islington (bot) dca61e770d
Typo: fix inverted sense of statement (GH-23288) (GH-23512) 2020-11-25 12:14:32 -08:00
Miss Islington (bot) 0aedcff34c
Add more tests to the descriptor howto guide (GH-23506) (GH-23510) 2020-11-25 02:16:32 -08:00
Miss Islington (bot) 9d2c2a8e3b
bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)
Restore fix from 011525ee92.
(cherry picked from commit 4fedd7123e)

Co-authored-by: Julien Palard <julien@palard.fr>
2020-11-25 01:52:51 -08:00
Miss Islington (bot) 543724b972
Add doctests to the descriptor HowTo (GH-23500) (GH-23505) 2020-11-24 22:47:17 -08:00
Miss Islington (bot) 15d42d7ec6
bpo-42212: Check if generated files are up-to-date in GitHub Actions (GH-23042)
See https: //github.com/python/core-workflow/issues/380

Signed-off-by: Filipe Laíns <lains@archlinux.org>
(cherry picked from commit d20b7ed9c1)

Co-authored-by: Filipe Laíns <lains@archlinux.org>
2020-11-24 05:25:29 -08:00
Miss Islington (bot) 96d906b144
bpo-41100: in test_platform, ignore 10.16 (GH-23485) (GH-23486)
(cherry picked from commit c0c23ea72b)

Co-authored-by: Ned Deily <nad@python.org>
2020-11-24 01:34:16 -05:00
Miss Islington (bot) 3266991e72
bpo-41100: minor build installer fixes (GH-23480)
(cherry picked from commit 936533ca04)

Co-authored-by: Ned Deily <nad@python.org>
2020-11-23 16:26:31 -08:00
Miss Islington (bot) b6416052f7
Typo (GH-23482) (#23483)
(cherry picked from commit 989af25616)

Co-authored-by: Jesús Cea <jcea@jcea.es>

Co-authored-by: Jesús Cea <jcea@jcea.es>
2020-11-24 01:11:13 +01:00
Miss Islington (bot) 2019e4ff98
Descriptor HowTo: Improve the fidelity of the member object simulation (GH-23475) (GH-23479) 2020-11-23 11:31:45 -08:00
Miss Islington (bot) 3e53301308
bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)
The function accepts now the representation of the default state as
empty sequence (as returned by Style.map()).
The structure of the result is now the same on all platform
and does not depend on the value of wantobjects.
(cherry picked from commit dd844a2916)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-23 00:51:37 -08:00
Ned Deily 5aa6c99da1
bpo-41100: Update Whatsnew and installer ReadME for 3.9.1 (GH-23472) 2020-11-22 23:43:04 -05:00
Miss Islington (bot) 85720596f1
bpo-42361: Use Tcl/Tk 8.6.10 when building the installer on recent macOS (GH-23293)
Building on older versions, and in particular macOS 10.9 still use
Tk 8.6.8 because of build problems on that version of macOS.
(cherry picked from commit 690a5fa3dd)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-22 10:22:21 -08:00
Miss Islington (bot) 41d1ebb33e
Doc: fix typo in typing.Type docs (GH-23460)
(cherry picked from commit 5ef53a88f3)

Co-authored-by: John Belmonte <john@neggie.net>
2020-11-22 07:16:48 -08:00
Ronald Oussoren e8b1c038b1
[3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) (GH-23295)
* [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)

Co-authored-by:  Lawrence D’Anna <lawrence_danna@apple.com>

* Add support for macOS 11 and Apple Silicon (aka arm64)

  As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy

* Support building on recent versions of macOS while deploying to older versions

  This allows building installers on macOS 11 while still supporting macOS 10.9..
(cherry picked from commit 41761933c1)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

* Back port of changes to _decimal to support arm64

* temp_dir is in test.support in 3.9
2020-11-22 11:18:40 +01:00
Miss Islington (bot) 0aab3522b2
bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301) (GH-23455)
On macOS system provided libraries are in a shared library cache
and not at their usual location. This PR teaches distutils to search
in the SDK, even if there was no "-sysroot" argument in
the compiler flags.
(cherry picked from commit 404a719b51)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-22 01:35:36 -05:00
Miss Islington (bot) 4f87126969
bpo-42391: Clarify documentation of TestCase.assertIs (GH-23348)
Removing 'evaluate' makes it more consistent with other assertX entries.
(cherry picked from commit bd8c22e1fa)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-11-21 22:24:21 -08:00
Miss Islington (bot) dd20643b14
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
(cherry picked from commit 453bc1da20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-21 21:30:46 -08:00
Miss Islington (bot) 748d38bf52
[3.9] bpo-38443: Check that the specified universal architectures work (GH-22910) (GH-23451)
As [[bpo-38443]()]() says the error message from configure when specifying --enable-universalsdk with a set of architectures that is not supported by the compiler is not very helpful.   This PR explicitly checks if the compiler works and bails out if it doesn't.
(cherry picked from commit 0f20bd9042)


Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-21 17:45:21 -08:00
Miss Islington (bot) 89d74d0acd
Clarify that Set._from_iterable is not required to be a classmethod. (GH-23272) (GH-23450) 2020-11-21 12:20:26 -08:00
Miss Islington (bot) 3b5b1c82a3
Fix wrong availability for signal.SIGCHLD (GH-23285) (#23425)
I believe this is a mistake. SIGCHLD is only available on Unix systems, not Windows.
(cherry picked from commit 4c24b08cd3)

Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>

Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>
2020-11-21 13:22:46 +02:00
Miss Islington (bot) d153eb8a1e
bpo-42412: Fix possible leaks and check arguments in PyType_FromModuleAndSpec() (GH-23410)
* There were leaks if Py_tp_bases is used more than once or if some call is
  failed before setting tp_bases.
* There was a crash if the bases argument or the Py_tp_bases slot is not a tuple.
* The documentation was not accurate.
(cherry picked from commit 1db76394ea)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-21 03:09:40 -08:00
Miss Islington (bot) 713b4bbd97
bpo-40550: Fix time-of-check/time-of-action issue in subprocess.Popen.send_signal. (GH-20010)
send_signal() now swallows the exception if the process it thought was still alive winds up not to exist anymore (always a plausible race condition despite the checks).

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 01a202ab6b)

Co-authored-by: Filipe Laíns <lains@archlinux.org>
2020-11-21 01:46:21 -08:00
Miss Islington (bot) c1bbca5b00
bpo-40791: Make compare_digest more constant-time. (GH-20444)
* bpo-40791: Make compare_digest more constant-time.

The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.

(This is change GH-1 from https://bugs.python.org/issue40791 .)
(cherry picked from commit 31729366e2)

Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
2020-11-21 01:18:41 -08:00
Miss Islington (bot) ed0201805c
bpo-42419: Correct 'deprecatations' is What's New 3.9 (GH-23421) (GH-23435)
(cherry picked from commit aa3a3521ce)
Co-authored-by: Quentin Hibon <qh.public@yahoo.com>
2020-11-20 23:34:55 -05:00
Miss Islington (bot) c963da269d
bpo-42407: Use possessive appostrophe in multiprocessing doc (GH-23400)
(cherry picked from commit 6edf06b24a)

Co-authored-by: ArioA <ArioA@users.noreply.github.com>
2020-11-20 19:01:05 -08:00
Miss Islington (bot) 3763cc1dbd
bpo-28002: Roundtrip f-strings with ast.unparse better (GH-19612) (GH-23430)
By attempting to avoid backslashes in f-string expressions.
We also now proactively raise errors for some backslashes we can't
avoid while unparsing FormattedValues

Co-authored-by: hauntsaninja <>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
(cherry picked from commit a993e901eb)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-11-21 00:46:49 +03:00
Miss Islington (bot) f552f4b2d6
bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429) 2020-11-20 13:19:49 -08:00
Miss Islington (bot) 4dd2112a1d
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
(cherry picked from commit 7ddbaa7a1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-19 23:28:21 -08:00
Miss Islington (bot) 1051ca4d97
bpo-42345: Add whatsnew and versionchanged for typing.Literal in 3.9 (GH-23386)
* Whatsnew entry in 3.9 same as the one in 3.10.
* versionchanged for typing.Literal docs

Needs backport to 3.9.
(cherry picked from commit e1dc0db8c7)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2020-11-19 09:59:10 -08:00
Miss Islington (bot) 2acd9d0c6c
bpo-42345: Fix hash implementation of typing.Literal (GH-23383)
Fix hash implementation of `typing.Literal`.

Update docs regarding `typing.Litaral` caching.

Base implementation was done in PR GH-23294.
(cherry picked from commit 1b54077ff6)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2020-11-19 08:51:01 -08:00
Pablo Galindo 87c87b5bd6
[3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) (GH-23333)
Currently walruses are not allowerd in set literals and set comprehensions:

>>> {y := 4, 4**2, 3**3}
  File "<stdin>", line 1
    {y := 4, 4**2, 3**3}
       ^
SyntaxError: invalid syntax

but they should be allowed as well per PEP 572.
(cherry picked from commit b0aba1fcdc)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-11-18 23:44:30 +00:00
Miss Islington (bot) 36619e1bc4
[3.9] Minor grammar edits for the descriptor howto guide (GH-GH-23175) (GH-23176)
(cherry picked from commit 803187796f)


Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>

Automerge-Triggered-By: GH:JulienPalard
2020-11-18 15:23:49 -08:00
Miss Islington (bot) f9fa920c30
[3.9] bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740) (GH-22783)
(cherry picked from commit fa8748271a)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-11-18 14:37:37 -08:00
Miss Islington (bot) 37f6fe2c93
bpo-42336: Improve PCbuild batch files (GH-23275)
(cherry picked from commit 2156d964a1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-18 09:45:54 -08:00
Christian Heimes 35bf8ea7be
[3.9] bpo-40998: Fix a refleak in create_filter() (GH-23365) (GH-23369)
(cherry picked from commit d1e38d4023)
2020-11-18 09:45:29 -08:00
Victor Stinner c53c3f4000
bpo-42398: Fix "make regen-all" race condition (GH-23362) (GH-23367)
Fix a race condition in "make regen-all" when make -jN option is used
to run jobs in parallel. The clinic.py script now only use atomic
write to write files. Moveover, generated files are now left
unchanged if the content does not change, to not change the file
modification time.

The "make regen-all" command runs "make clinic" and "make
regen-importlib" targets:

* "make regen-importlib" builds object files (ex: Modules/_weakref.o)
  from source files (ex: Modules/_weakref.c) and clinic files (ex:
  Modules/clinic/_weakref.c.h)
* "make clinic" always rewrites all clinic files
  (ex: Modules/clinic/_weakref.c.h)

Since there is no dependency between "clinic" and "regen-importlib"
Makefile targets, these two targets can be run in parallel. Moreover,
half of clinic.py file writes are not atomic and so there is a race
condition when "make regen-all" runs jobs in parallel using make -jN
option (which can be passed in MAKEFLAGS environment variable).

Fix clinic.py to make all file writes atomic:

* Add write_file() function to ensure that all file writes are
  atomic: write into a temporary file and then use os.replace().
* Moreover, write_file() doesn't recreate or modify the file if the
  content does not change to avoid modifying the file modification
  file.
* Update test_clinic to verify these assertions with a functional
  test.
* Remove Clinic.force attribute which was no longer used, whereas
  Clinic.verify remains useful.

(cherry picked from commit 8fba9523cf)
2020-11-18 17:11:09 +01:00
Miss Islington (bot) 994c68f586
bpo-40998: Address compiler warnings found by ubsan (GH-20929)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
(cherry picked from commit 07f2adedf0)

Co-authored-by: Christian Heimes <christian@python.org>
2020-11-18 08:01:48 -08:00
Miss Islington (bot) 802ff7c0d3
[3.9] bpo-41561: skip test_min_max_version_mismatch (GH-22308) (GH-23363)
skip test_min_max_version_mismatch when TLS 1.0 is not available

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


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2020-11-18 04:42:38 -08:00
kj 71ba5f52d2
[3.9] bpo-42332: Add weakref slot to types.GenericAlias (GH-23250) (GH-23309)
(cherry picked from commit 384b7a4bd9)
2020-11-17 14:45:08 -08:00
Irit Katriel 48a9c0eb2a
[3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) (GH-23303)
* bpo-39934: backport PR 22395 to 3.9
2020-11-17 19:31:55 +00:00
Victor Stinner 05a5d697f4
bpo-41686: Always create the SIGINT event on Windows (GH-23344) (GH-23347)
bpo-41686, bpo-41713: On Windows, the SIGINT event,
_PyOS_SigintEvent(), is now created even if Python is configured to
not install signal handlers (PyConfig.install_signal_handlers=0 or
Py_InitializeEx(0)).
2020-11-17 18:58:12 +01:00
Yurii Karabas ac472b316c
[3.9] bpo-42345: Fix three issues with typing.Literal parameters (GH-23294) (GH-23335)
Literal equality no longer depends on the order of arguments.

Fix issue related to `typing.Literal` caching by adding `typed` parameter to `typing._tp_cache` function.

Add deduplication of `typing.Literal` arguments.

(cherry picked from commit f03d318ca4)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2020-11-17 07:23:36 -08:00
Miss Islington (bot) 656d50f98d
bpo-40637: Don't test builtin PBKDF2 without builtin hashes (GH-20980)
Skip testing of pure Python PBKDF2 when one or more builtin hash module
is not available. Otherwise the import of hashlib prints noise on
stderr.

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

Co-authored-by: Christian Heimes <christian@python.org>
2020-11-17 07:01:55 -08:00
Miss Islington (bot) 2c38e49dba
[3.9] bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326) (GH-23331)
(cherry picked from commit 9cc9e27725)


Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-16 23:50:43 -08:00
Lysandros Nikolaou 2b800ef809
bpo-42374: Allow unparenthesized walrus in genexps (GH-23319) (GH-23329)
This fixes a regression that was introduced by the new parser.

(cherry picked from commit cb3e5ed071)
2020-11-17 01:38:58 +02:00
Miss Islington (bot) cf70854f10
bpo-42350: Fix Thread._reset_internal_locks() (GH-23268)
Fix the threading.Thread class at fork: do nothing if the thread is
already stopped (ex: fork called at Python exit). Previously, an
error was logged in the child process.
(cherry picked from commit 5909a494cd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-11-16 07:17:17 -08:00
Miss Islington (bot) 7c4d8fa82a
bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297)
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003)

Co-authored-by: Yash Shete <universeyash4@gmail.com>
2020-11-15 21:27:03 -08:00
Miss Islington (bot) ec0788c7c9
More updates to the descriptor howto guide (GH-23238) (GH-23308) 2020-11-15 18:27:56 -08:00
Miss Islington (bot) 2369759a47
bpo-42317: Improve docs of typing.get_args concerning Union (GH-23254)
(cherry picked from commit c3b9592244)

Co-authored-by: Dominik1123 <15989985+Dominik1123@users.noreply.github.com>
2020-11-15 17:52:22 -08:00
Miss Islington (bot) 2837241f22
fix typo in ThreadedChildWatcher docs (GH-23277)
(cherry picked from commit 8836574a0f)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-11-14 04:24:21 -08:00