Commit graph

113829 commits

Author SHA1 Message Date
Petr Viktorin 21a9a85ff4
gh-93466: Document PyType_Spec doesn't accept repeated slot IDs; raise where this was problematic (GH-93471) 2022-06-10 15:55:09 +02:00
Christian Heimes 3124d9a5aa
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>
2022-06-10 15:25:33 +02:00
Erlend Egeberg Aasland a87c9b538f
gh-90763: Modernise xx template module initialisation (#93078)
Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
2022-06-10 12:39:02 +02:00
neonene d8395eb38d
gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems (#93090) 2022-06-10 10:10:04 +02:00
Leo Trol 30610d2837
gh-90549: Fix leak of global named resources using multiprocessing spawn (#30617)
Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2022-06-09 18:55:12 +02:00
Christian Heimes 6099611af5
gh-90473: Skip get_config_h() tests on WASI (GH-93645) 2022-06-09 18:08:03 +02:00
Christian Heimes 5a4af3ab03
gh-90473: disable user site packages on WASI/Emscripten (GH-93633) 2022-06-09 17:45:29 +02:00
Vinay Sajip e974b3e333
Improve logging documentation with example and additional cookbook re… (GH-93644) 2022-06-09 16:43:35 +01:00
Sebastian Berg 7fef847662
bpo-45383: Get metaclass from bases in PyType_From* (GH-28748)
This checks the bases of of a type created using the FromSpec
API to inherit the bases metaclasses.  The metaclass's alloc
function will be called as is done in `tp_new` for classes
created in Python.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-09 17:11:08 +02:00
CAM Gerlach a5ba0f4ebc
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) 2022-06-09 15:55:06 +02:00
Serhiy Storchaka a365dd64c2
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609)
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.
2022-06-09 10:12:43 +03:00
Christian Heimes cffa4f7854
gh-93616: Fix env changed issue in test_modulefinder (GH-93617) 2022-06-09 08:32:35 +02:00
Christian Heimes 68f6a5da19
gh-79096: Fix/improve http cookiejar tests (GH-93614)
Fixup of GH-93463:
- remove stray print
- use proper way to check file mode
- add working chmod decorator

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-08 23:51:04 +02:00
Christian Heimes 22df2e0322
gh-90473: Define HOSTRUNNER for WASI (GH-93606) 2022-06-08 20:18:46 +02:00
Christian Heimes 5442561c1a
gh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602)
* 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
2022-06-08 20:18:08 +02:00
Illia Volochii 2dece90808
gh-93180: Update os.copy_file_range() documentation (#93182) 2022-06-08 17:49:13 +02:00
Petr Viktorin 2c3fe5eeb2
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581)
* Remove outdated notes from functions that aren't in the Limited API

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.

* Also remove forgotten note on tp_vectorcall_offset not being finalized
2022-06-08 17:03:07 +02:00
Christian Heimes 243ed5439c
gh-93584: Make all install+tests targets depends on all (GH-93589)
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.
2022-06-08 15:16:20 +02:00
Erlend Egeberg Aasland 875de61c29
gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (#93526) 2022-06-08 12:43:54 +02:00
Bluenix 5849af7a80
GH-93521: For dataclasses, filter out __weakref__ slot if present in bases (GH-93535) 2022-06-07 20:53:08 -04:00
Kalyan ffc58a9710
gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-06-08 01:34:50 +02:00
Irit Katriel f8eae6f5c3
GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483) 2022-06-07 21:35:11 +01:00
jacksonriley 8ef7929baf
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`.
2022-06-07 11:54:16 -07:00
Adrian Garcia Badaracco 296081a7ce
gh-92592: Allow logging filters to return a LogRecord. (GH-92591) 2022-06-07 16:53:57 +01:00
Christian Heimes 70690c7233
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353) 2022-06-07 14:04:27 +02:00
Christian Heimes cdb73aefec
gh-93162: test_config_queue_handler requires threading (GH-93572) 2022-06-07 12:34:08 +02:00
Ken Jin 75260925ec
Fix MSVC compiler warnings in ceval.c (#93569) 2022-06-07 11:32:42 +01:00
Mark Shannon f012df706c
Shrink the LOAD_METHOD cache by one codeunit. (#93537) 2022-06-07 10:28:53 +01:00
Andreas Grommek 75ceae05c1
gh-88831: In docs for asyncio.create_task, explain why strong references to tasks are needed (GH-93258)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-07 10:56:09 +02:00
Hugo van Kemenade f0d0be3493
gh-57539: Increase calendar test coverage (GH-93468)
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>
2022-06-07 10:44:29 +02:00
Vinay Sajip 1b74803991
gh-93162: Add ability to configure QueueHandler/QueueListener together (GH-93269)
Also, provide getHandlerByName() and getHandlerNames() APIs.

Closes #93162.
2022-06-07 10:20:35 +02:00
Pascal Wittmann c6f6ede728
gh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH-93463)
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.
2022-06-07 10:11:03 +02:00
Davide Rizzo 57e8ee7086
gh-86986: bump min sphinx version to 3.2 (GH-93337) 2022-06-07 10:05:38 +02:00
Evorage 890c3be8fb
Grammar fix to socket error string (GH-93523) 2022-06-07 09:43:16 +02:00
Samodya Abeysiriwardane 74039330f2
Fix contributor name in WhatsNew 3.11 (GH-93556) 2022-06-07 12:05:00 +08:00
AN Long 3256b178ed
bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-32010) 2022-06-07 00:47:27 +01:00
Erlend Egeberg Aasland bb0b768946
gh-89018: Improve documentation of sqlite3 exceptions (#27645)
- Order exceptions as in PEP 249
- Reword descriptions, so they match the current behaviour

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-06-06 23:47:15 +02:00
Illia Volochii d1e2e0e1b2
gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478) 2022-06-06 23:21:58 +02:00
Thomas Grainger 46fde1feb5
[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552) 2022-06-06 20:10:42 +02:00
Thomas Grainger 71c8f96971
Remove action=None kwarg from Barrier docs (GH-93538) 2022-06-06 19:28:05 +02:00
Christian Heimes 22fed605e0
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)
WASI does not have the ``chmod(2)`` syscall yet.
2022-06-06 19:24:11 +02:00
Stanley 56b5daf159
gh-83728: Add hmac.new default parameter deprecation (GH-91939) 2022-06-06 18:47:40 +02:00
Omer Katz 8584981a58
asyncio.Barrier docs: Fix typo (#93371)
taks -> tasks
2022-06-06 07:39:51 -07:00
Christian Heimes 80a39daecd
gh-90473: Skip POSIX tests that don't apply to WASI (GH-93536) 2022-06-06 16:31:59 +02:00
Hugo van Kemenade 86a5e22dfe
GH-92308 What's New: list pending removals in 3.13 and future versions (#92562) 2022-06-06 12:12:03 +02:00
Christian Heimes 4c71d22c4f
gh-90473: WASI requires proper open(2) flags (GH-93529) 2022-06-06 12:08:07 +02:00
Cyker Way 9081bbd036
gh-93247: Fix assert function in asyncio locks test (#93248) 2022-06-05 18:19:18 -07:00
Dennis Sweeney 4082c8e298
Document LOAD_FAST_CHECK opcode (#93498) 2022-06-05 11:24:09 -04:00
Serhiy Storchaka 0902c3d8ed
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.
2022-06-05 11:46:29 +03:00
Christian Heimes 6f8367d348
gh-90473: wasmtime does not support absolute symlinks (GH-93490) 2022-06-05 09:59:47 +02:00