Commit Graph

113558 Commits

Author SHA1 Message Date
Miss Islington (bot) 34ef12a350
gh-90473: Skip test_queue when threading is not available (GH-93712)
(cherry picked from commit f0b7aa71c4)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-11 03:20:28 -07:00
Miss Islington (bot) 36ece2effb
gh-90153: whatsnew: "z" option in format spec (GH-93624)
Add what's new entry for PEP 682 in Python 3.11.
(cherry picked from commit 010284b46b)

Co-authored-by: John Belmonte <john@neggie.net>
2022-06-11 03:14:24 -07:00
Miss Islington (bot) 4c881049ef
gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit dc5e02b2f4)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-11 00:04:35 -07:00
Miss Islington (bot) 54fe3d57bf
gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)
(cherry picked from commit 4c496f1f11)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-06-10 20:52:41 -07:00
Miss Islington (bot) 0aa9ec9f5d
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimport.py` (GH-93236)
(cherry picked from commit 484a2357c8)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
2022-06-10 16:25:53 -07:00
Miss Islington (bot) 3a202de3bb
gh-91317: Document that Path does not collapse initial `//` (GH-32193)
Documentation for `pathlib` says:

> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:

However, it omits that initial double slashes also aren't collapsed.

Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:

- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.

For context, see the BPO entry.
(cherry picked from commit 78f1a43694)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-06-10 16:07:19 -07:00
Miss Islington (bot) f9d0240db8
gh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match statements (GH-93680)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 53a8b17895)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-06-10 09:21:04 -07:00
Steve Dower 98558a8397
bpo-42658: Allow _winapi.LCMapStringEx to handle embedded nulls (GH-93688) 2022-06-10 17:09:37 +01:00
Miss Islington (bot) aee7d3df1c
gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617)
Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit 30610d2837)

Co-authored-by: Leo Trol <milestone.jxd@gmail.com>
2022-06-10 08:04:55 -07:00
Miss Islington (bot) 62cae22c0d
gh-93391: fix typo in `array` docs (GH-93392) (GH-93394)
Fixes GH-93391

(cherry picked from commit fc694364cc)

Co-authored-by: ynfle <23086821+ynfle@users.noreply.github.com>
2022-06-10 16:12:51 +02:00
Miss Islington (bot) cc6149fe15
📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396) (GH-93399)
This is purely for SEO as this is the actual generic name for this kind of method and it currently does not appear in a Google search for "python constant time compare". Not creating an issue or setting this up for backports as its trivial (I think) and not a functional change.
(cherry picked from commit 8241a6971e)

Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
2022-06-10 16:11:15 +02:00
Miss Islington (bot) f0a89e6507
gh-93372: Fix typo in os.rename documentation (GH-93401) (GH-93403)
(cherry picked from commit e7aab7c92a)

Co-authored-by: Wei-Ting Yang <74453331+Yang-Wei-Ting@users.noreply.github.com>
2022-06-10 16:10:14 +02:00
Miss Islington (bot) 25444124e3
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581) (GH-93604)
Nowadays everything that *is* in the Limited API has a note added
automatically.
These notes could mislead people to think that these functions
could never be added to the limited API. Remove them.

(cherry picked from commit 2c3fe5eeb2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-06-10 16:04:23 +02:00
Miss Islington (bot) c3045d809c
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93631)
copy.copy() and copy.deepcopy() now always raise a TypeError if
__reduce__() returns a tuple with length 6 instead of silently ignore
the 6th item or produce incorrect result.
(cherry picked from commit a365dd64c2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-10 16:00:19 +02:00
Miss Islington (bot) 516d90eb21
gh-93491: Add support tier detection to configure (GH-93492)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 3124d9a5aa)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-10 06:50:26 -07:00
Erlend Egeberg Aasland 175ed6e52c
[3.11] gh-90763: Modernise xx template module initialisation (GH-93078) (#93681)
Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
(cherry picked from commit a87c9b538f)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-10 13:28:48 +02:00
Steve Dower 927b5afee7
bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-93591)
* bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-32010)

* Use AsWideCharString to avoid memory leaks in deprectated unicode converter

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2022-06-10 11:14:25 +01:00
Miss Islington (bot) f384a8e477
gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems (GH-93090)
(cherry picked from commit d8395eb38d)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2022-06-10 01:37:38 -07:00
Miss Islington (bot) 06340f6226
gh-90473: Skip get_config_h() tests on WASI (GH-93645)
(cherry picked from commit 6099611af5)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 09:32:52 -07:00
Miss Islington (bot) 7bfeb8a606
[3.11] Improve logging documentation with example and additional cookbook re… (GH-93644) (GH-93647) 2022-06-09 17:28:34 +01:00
Miss Islington (bot) 4c41f21153
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)
(cherry picked from commit 5a4af3ab03)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 09:12:51 -07:00
Łukasz Langa 2084f9479c
[3.11] gh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH-93463) (GH-93636)
Note: This change is not effective on Microsoft Windows.

Cookies can store sensitive information and should therefore be protected
against unauthorized third parties. This is also described in issue #79096.

The filesystem permissions are currently set to 644, everyone can read the
file. This commit changes the permissions to 600, only the creater of the file
can read and modify it. This improves security, because it reduces the attack
surface. Now the attacker needs control of the user that created the cookie or
a ways to circumvent the filesystems permissions.

This change is backwards incompatible. Systems that rely on world-readable
cookies will breake. However, one could argue that those are misconfigured in
the first place.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pascal Wittmann <mail@pascal-wittmann.de>
Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 16:16:37 +02:00
Miss Islington (bot) 92f8786ef8
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93638)
(cherry picked from commit a5ba0f4ebc)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-09 16:15:33 +02:00
Miss Islington (bot) 98bbbbe46d
gh-93616: Fix env changed issue in test_modulefinder (GH-93617)
(cherry picked from commit cffa4f7854)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-09 00:02:39 -07:00
Christian Heimes 47a7855f41
[3.11] gh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602) (GH-93613)
* gh-93575: Use correct way to calculate PyUnicode struct sizes

* Add comment to keep test_sys and test_unicode in sync

* Fix case code < 256.
(cherry picked from commit 5442561c1a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 22:21:20 +02:00
Christian Heimes 1b7942acb2
[3.11] gh-90473: Define HOSTRUNNER for WASI (GH-93606) (GH-93612)
(cherry picked from commit 22df2e0322)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 22:21:04 +02:00
Christian Heimes abd022383b
[3.11] gh-93584: Make all install+tests targets depends on all (GH-93589) (GH-93603)
All install targets use the "all" target as synchronization point to
prevent race conditions with PGO builds. PGO builds use recursive make,
which can lead to two parallel `./python setup.py build` processes that
step on each others toes.

"test" targets now correctly compile PGO build in a clean repo.
(cherry picked from commit 243ed5439c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-08 17:24:30 +02:00
Irit Katriel ce07de9059
[3.11] GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483) (GH-93601)
(cherry picked from commit f8eae6f5c3)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-08 16:16:46 +01:00
Miss Islington (bot) 68aae80159
gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (GH-93526)
(cherry picked from commit 875de61c29)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-08 04:07:15 -07:00
Miss Islington (bot) 121ab58e03
GH-93521: For dataclasses, filter out `__weakref__` slot if present in bases (GH-93535)
(cherry picked from commit 5849af7a80)

Co-authored-by: Bluenix <bluenixdev@gmail.com>
2022-06-07 18:17:56 -07:00
Miss Islington (bot) f26d1b5b53
Fix `PurePath.relative_to` links in the pathlib documentation. (GH-93268)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.
(cherry picked from commit 8ef7929baf)

Co-authored-by: jacksonriley <52106215+jacksonriley@users.noreply.github.com>
2022-06-07 12:11:10 -07:00
Miss Islington (bot) 52032554ae
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353)
(cherry picked from commit 70690c7233)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-07 05:28:11 -07:00
Miss Islington (bot) faf0cf7ac6
gh-57539: Increase calendar test coverage (GH-93468) (GH-93564)
(cherry picked from commit f0d0be3493)

Co-authored-by: Sean Fleming
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-06-07 12:21:04 +02:00
Miss Islington (bot) 2a24421054
gh-88831: In docs for asyncio.create_task, explain why strong references to tasks are needed (GH-93258) (GH-93566)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 75ceae05c1)

Co-authored-by: Andreas Grommek <76997441+agrommek@users.noreply.github.com>
2022-06-07 12:14:06 +02:00
Miss Islington (bot) 07c3cbad95
gh-86986: bump min sphinx version to 3.2 (GH-93337) (GH-93561)
(cherry picked from commit 57e8ee7086)

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2022-06-07 10:21:47 +02:00
Miss Islington (bot) 008bcdec11
Grammar fix to socket error string (GH-93523) (GH-93560)
(cherry picked from commit 890c3be8fb)

Co-authored-by: Evorage <owner@evorage.com>
2022-06-07 10:10:24 +02:00
Miss Islington (bot) e139dee1f7
Fix contributor name in WhatsNew 3.11 (GH-93556)
(cherry picked from commit 74039330f2)

Co-authored-by: Samodya Abeysiriwardane <379594+sransara@users.noreply.github.com>
2022-06-06 21:49:47 -07:00
Miss Islington (bot) fd4dad5cca
[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552) (GH-93553)
(cherry picked from commit 46fde1feb5)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-06-06 20:51:13 +02:00
Miss Islington (bot) a712c4b26c
Remove action=None kwarg from Barrier docs (GH-93538) (GH-93551)
(cherry picked from commit 71c8f96971)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-06-06 20:10:12 +02:00
Miss Islington (bot) 6787a8f146
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534) (GH-93550)
WASI does not have the ``chmod(2)`` syscall yet.
(cherry picked from commit 22fed605e0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:51 +02:00
Christian Heimes 986ce4e613
[3.11] gh-90473: Skip POSIX tests that don't apply to WASI (GH-93536) (GH-93540)
(cherry picked from commit 80a39daecd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:22 +02:00
Miss Islington (bot) f46e30f9d4
gh-83728: Add hmac.new default parameter deprecation (GH-91939) (GH-93544)
(cherry picked from commit 56b5daf159)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-06-06 19:09:51 +02:00
Miss Islington (bot) e8404f46b3
asyncio.Barrier docs: Fix typo (GH-93371)
taks -> tasks
(cherry picked from commit 8584981a58)

Co-authored-by: Omer Katz <omer.katz@omerkatz.com>
2022-06-06 07:54:44 -07:00
Miss Islington (bot) 20be4a11fe
gh-90473: WASI requires proper open(2) flags (GH-93529)
(cherry picked from commit 4c71d22c4f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 03:32:23 -07:00
Miss Islington (bot) a848a9894d
gh-93247: Fix assert function in asyncio locks test (GH-93248)
(cherry picked from commit 9081bbd036)

Co-authored-by: Cyker Way <cykerway@gmail.com>
2022-06-05 18:47:07 -07:00
Miss Islington (bot) 2220dc50df
gh-89973: Fix re.error in the fnmatch module. (GH-93072)
Character ranges with upper bound less that lower bound (e.g. [c-a])
are now interpreted as empty ranges, for compatibility with other glob
pattern implementations. Previously it was re.error.
(cherry picked from commit 0902c3d8ed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-05 02:39:11 -07:00
Miss Islington (bot) a8bd502e57
gh-90473: wasmtime does not support absolute symlinks (GH-93490)
(cherry picked from commit 6f8367d348)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-05 01:26:38 -07:00
Miss Islington (bot) c21f2bdaf1
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505) (gh-93509)
(cherry picked from commit 713eb184b5)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2022-06-05 15:47:12 +09:00
Miss Islington (bot) d97e2c52d3
gh-93442: Make C++ version of _Py_CAST work with 0/NULL. (GH-93500) (gh-93507)
Add C++ overloads for _Py_CAST_impl() to handle 0/NULL.  This will allow
C++ extensions that pass 0 or NULL to macros using _Py_CAST() to
continue to compile.  Without this, you get an error like:

    invalid ‘static_cast’ from type ‘int’ to type ‘_object*’

The modern way to use a NULL value in C++ is to use nullptr.  However,
we want to not break extensions that do things the old way.

Co-authored-by: serge-sans-paille
(cherry picked from commit 8bcc3fa345)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2022-06-05 14:15:59 +09:00
Miss Islington (bot) 4443c285a6
Fix missing word in sys.float_info docstring (GH-93489) (GH-93495)
(cherry picked from commit e12f34b6d8)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2022-06-04 20:23:53 +01:00