Commit graph

108902 commits

Author SHA1 Message Date
Miss Islington (bot)
d57d33c234
Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing PySys_Audit() (GH-28862)
(cherry picked from commit 9883ca498d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-11 02:43:09 -07:00
Miss Islington (bot)
5f44bb28fd
Fix the "Finding all Adverbs" example (GH-21420) (#28840)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit dbd62e74da)

Co-authored-by: Rim Chatti <chattiriim@gmail.com>
2021-10-10 14:43:58 -07:00
Dong-hee Na
e4fcb6fd3d
[3.9] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28835) 2021-10-10 01:13:44 +09:00
Miss Islington (bot)
6f3bc5eee6
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
(cherry picked from commit 34bbc87b2d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-09 08:30:54 -07:00
Miss Islington (bot)
87f0156a22
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796)
Prevent use-after-free of running loop holder via cache.
(cherry picked from commit 392a898353)

Co-authored-by: Matthias Reichl <github@hias.horus.com>
2021-10-07 16:14:04 -07:00
Miss Islington (bot)
06935bd68e
bpo-45337: Use the realpath of the new executable when creating a venv on Windows (GH-28663)
(cherry picked from commit 6811fdaec8)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-10-07 15:55:15 -07:00
Christian Clauss
4346b81cc6
[3.9] Fix typos in the Lib directory (GH-28775) (GH-28803)
Fix typos in the Lib directory as identified by codespell.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 745c9d9dfc)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 08:42:38 -07:00
Christian Clauss
da56601783
[3.9] Fix typos in the Tools directory (GH-28769) (GH-28800)
Like #28744 but for the Tools directory.

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 682aecfdeb)
2021-10-07 17:31:24 +02:00
Christian Clauss
78efc9aff2
[3.9] Fix typos in the Python directory (GH-28767) (GH-28798)
(cherry picked from commit db693df3e1)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 07:36:39 -07:00
Christian Clauss
960e7b3ba1
[3.9] Fix typos in the Objects directory (GH-28766) (GH-28795)
(cherry picked from commit 5f401f1040)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 07:09:41 -07:00
Christian Clauss
71d56a7231
[3.9] [Misc] [Mac] Fix typos found using codespell (GH-28756) (GH-28793)
(cherry picked from commit 470145f572)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 06:42:07 -07:00
Christian Clauss
8f762349a2
[3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)
(cherry picked from commit dd02a696e5)

Co-authored-by: Christian Clauss <cclauss@me.com>

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 06:17:05 -07:00
Christian Clauss
6c97b03cf6
[3.9] Fix typos in the Include directory (GH-28745) (GH-28788)
(cherry picked from commit 8e8f752217)
2021-10-07 06:01:05 -07:00
Dong-hee Na
660718dba5
[3.9] bpo-45385: Fix reference leak from descr_check (GH-28719) (GH-28780)
(cherry picked from commit e6ff4eba6d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-07 11:10:15 +09:00
Miss Islington (bot)
4f161e65a0
[doc] Mention __slots__ behavior in weakref.rst (GH-21061) (GH-28773)
It took me longer than I expected to figure out why a random class
I dealt with didn't support weak references. I believe this addition
will make the __slots__/weakref interaction more discoverable to people
having troubles with this. (Before this patch __slots__ was not
mentioned in weakref documentation even once).

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit b24b47e643)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2021-10-06 20:52:48 +02:00
Miss Islington (bot)
92018a0824
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) (GH-28770)
Operating systems without support for TCP_NODELAY will raise an OSError
when trying to set the socket option, but the show can still go on.
(cherry picked from commit 0571b934f5)

Co-authored-by: rtobar <rtobarc@gmail.com>
2021-10-06 20:29:41 +02:00
Miss Islington (bot)
496d1aa0b8
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity (GH-27989) (GH-28763)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7af95a1e80)

Co-authored-by: DonnaDia <37962843+DonnaDia@users.noreply.github.com>
2021-10-06 17:19:46 +02:00
Christian Clauss
edef03aaa8
[3.9] [doc] Fix typos found using codespell (GH-28744) (GH-28759) 2021-10-06 15:57:39 +02:00
Miss Islington (bot)
d747f5e805
[doc] Update references to NumPy (GH-22458) (GH-28749)
Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
(cherry picked from commit c8bb24166e)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-06 15:04:48 +02:00
Łukasz Langa
1374459c90
[3.9] bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684) (GH-28747)
(cherry picked from commit 4c8d543823)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2021-10-06 00:16:30 +02:00
Miss Islington (bot)
92450f23c6
sqlite3: Modernize documentation around unicode and bytes. (GH-28652) (GH-28695)
(cherry picked from commit 1dac95c814)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-05 23:04:02 +02:00
Łukasz Langa
52d9d3b754
[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28741)
(cherry picked from commit b9bb74871b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-10-05 22:30:25 +02:00
Miss Islington (bot)
950b324973
[doc] Fix gethostbyname_ex description (GH-28700) (GH-28743)
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't.
(cherry picked from commit 4103280b83)

Co-authored-by: Andre Delfino <adelfino@gmail.com>

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-05 19:22:14 +02:00
Ned Deily
f4a7ce70f9
Update macOS installer ReadMe for 3.9.8. (GH-28701)
The universal2 installer variant is now the default download from
python.org and the legacy Intel-64 variant is now deprecated.
2021-10-05 18:42:02 +02:00
Miss Islington (bot)
63c9a6cc8b
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
(cherry picked from commit de4052fe06)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2021-10-05 05:39:18 -07:00
Miss Islington (bot)
3ce5e07e9a
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ef6196028f)

Co-authored-by: Christian Heimes <christian@python.org>
2021-10-05 03:09:21 -07:00
John Belmonte
7c2a040a10
[3.9] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) (GH-28731)
Make enter_context(foo()) / enter_async_context(foo()) equivalent to
`[async] with foo()` regarding __context__ when an exception is raised.

Previously exceptions would be caught and re-raised with the wrong
context when explicitly overriding __context__ with None..
(cherry picked from commit e6d1aa1ac6)

Co-authored-by: John Belmonte <john@neggie.net>

Automerge-Triggered-By: GH:njsmith
2021-10-04 23:37:24 -07:00
Serhiy Storchaka
e9ce081ec7
[3.9] Remove trailing spaces (GH-28710) 2021-10-03 20:04:38 +03:00
Miss Islington (bot)
d211e87307
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) (GH-28689)
pypi.org "  The Python Package Index (PyPI) ...
(cherry picked from commit 0be338199f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-10-02 10:15:45 -04:00
Miss Islington (bot)
6035d650a3
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
Co-authored-by: AngstyDuck <solsticedante@gmail.com>
2021-10-01 21:46:25 +01:00
Miss Islington (bot)
0e1aeab5d7
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671) (GH-28683)
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.

configure now checks if the sem_clockwait() function is available.
(cherry picked from commit 6df8c32753)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-10-01 18:51:15 +02:00
Miss Islington (bot)
8822526caa
[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)
(cherry picked from commit 9ce0f48e91)


Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-01 06:28:19 -07:00
Serhiy Storchaka
4d5d161d2a
[3.9] bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28670)
Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
(cherry picked from commit eb4495e8e2)
2021-10-01 12:38:23 +03:00
Serhiy Storchaka
e9d5cdda1f
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660)" (GH-28666)
This reverts commit 2cf76cf4cc.
2021-10-01 10:58:59 +03:00
Łukasz Langa
2cf76cf4cc
Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660)
This reverts commit 993a130d3a.
2021-09-30 22:23:32 +02:00
Serhiy Storchaka
993a130d3a
[3.9] bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)
(cherry picked from commit d441437ee7)
2021-09-30 19:58:34 +03:00
Serhiy Storchaka
f7e99c9813
[3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) (GH-28658)
* Work correctly if an additional fresh module imports other
  additional fresh module which imports a blocked module.
* Raises ImportError if the specified module cannot be imported
  while all additional fresh modules are successfully imported.
* Support blocking packages.
* Always restore the import state of fresh and blocked modules
  and their submodules.
* Fix test_decimal and test_xml_etree which depended on an undesired
  side effect of import_fresh_module().
(cherry picked from commit ec4d917a6a)
2021-09-30 19:57:46 +03:00
Miss Islington (bot)
9626ac8b74
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit 196998e220)

Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
2021-09-29 13:47:58 -07:00
Miss Islington (bot)
87ecdb227f
[typo] Fix threading.Barrier comment that used confusing punctuation (GH-28623) (GH-28626)
Removed extra comma in comment that indicates state of a `Barrier` as it was confusing and breaking the flow while reading.

Co-authored-by: Priyank <5903604+cpriyank@users.noreply.github.com>
(cherry picked from commit f1ca5d7f61)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-29 17:20:49 +02:00
Miss Islington (bot)
1e97145d2f
[typo] s/libexpact/libexpat/ in setup.py (GH-28624) (GH-28627)
(cherry picked from commit bf5d1684a7)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-29 17:19:47 +02:00
Miss Islington (bot)
fafa213870
bpo-44394: Ensure libexpat is linked against libm (GH-28617)
(cherry picked from commit 6c1154b9de)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-29 06:47:56 -07:00
Łukasz Langa
7bff4d396f
[3.9] bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766) (GH-28614)
* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
  corrupted tar file.
(cherry picked from commit b6fe857250)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-09-29 12:56:14 +02:00
Miss Islington (bot)
c6b5ceae34
bpo-45269: test wrong markers type to c_make_encoder (GH-28540) (GH-28610)
(cherry picked from commit e046aabbe3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-28 23:51:57 +02:00
Łukasz Langa
68223cd12f
[3.9] [docs] Improve the markup of powers (GH-28598) (GH-28608)
(cherry picked from commit 4f05f15d7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-28 23:13:16 +02:00
Miss Islington (bot)
cd00fee8dd
bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595) (GH-28604)
(cherry picked from commit 84975146a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-28 22:19:02 +02:00
Miss Islington (bot)
fe7746c61a
[doc] fix minor typo for argparse (GH-28451)
"A JSONDecodeError" instead of "An JSONDecodeError".
(cherry picked from commit db0133f98d)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
2021-09-28 07:07:20 -07:00
Miss Islington (bot)
813fbba4ca
bpo-45296: Fix exit/quit message on Windows (GH-28577) (GH-28601)
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
(cherry picked from commit e649e0658f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-28 14:35:04 +02:00
Victor Stinner
94d19f606f
bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589)
Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.

(cherry picked from commit 95d3137082)
2021-09-27 23:40:22 +02:00
Miss Islington (bot)
1ecb641b88
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)
Fix a race condition in the Thread.join() method of the threading
module. If the function is interrupted by a signal and the signal
handler raises an exception, make sure that the thread remains in a
consistent state to prevent a deadlock.
(cherry picked from commit a22be4943c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-27 05:49:30 -07:00
Miss Islington (bot)
08e387ab82
bpo-45280: Add test for empty NamedTuple in test_typing (GH-28559) (GH-28570)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
(cherry picked from commit f56268a2cd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-26 19:09:29 +02:00