]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agoRemove LOAD_METHOD stats. (GH-93807)
Mark Shannon [Tue, 14 Jun 2022 14:03:15 +0000 (15:03 +0100)] 
Remove LOAD_METHOD stats. (GH-93807)

3 years agogh-93795: Use test.support TESTFN/unlink in sqlite3 tests (#93796)
Erlend Egeberg Aasland [Tue, 14 Jun 2022 14:02:52 +0000 (16:02 +0200)] 
gh-93795: Use test.support TESTFN/unlink in sqlite3 tests (#93796)

3 years agoInclude freelists in allocation total. (GH-93799)
Mark Shannon [Tue, 14 Jun 2022 13:44:26 +0000 (14:44 +0100)] 
Include freelists in allocation total. (GH-93799)

3 years agoGH-93429: Document `LOAD_METHOD` removal (GH-93803)
Ken Jin [Tue, 14 Jun 2022 13:43:28 +0000 (21:43 +0800)] 
GH-93429: Document `LOAD_METHOD` removal (GH-93803)

3 years agogh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338)
Sanket Shanbhag [Tue, 14 Jun 2022 12:46:18 +0000 (18:16 +0530)] 
gh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338)

- Amend docs for WriteTransport.get_write_buffer_limits
- Add docs for WriteTransport.get_write_buffer_size

3 years agoGH-93678: reduce boilerplate and code repetition in the compiler (GH-93682)
Irit Katriel [Tue, 14 Jun 2022 12:40:09 +0000 (13:40 +0100)] 
GH-93678: reduce boilerplate and code repetition in the compiler (GH-93682)

3 years agogh-79579: Improve DML query detection in sqlite3 (#93623)
Erlend Egeberg Aasland [Tue, 14 Jun 2022 11:56:36 +0000 (13:56 +0200)] 
gh-79579: Improve DML query detection in sqlite3 (#93623)

The fix involves using pysqlite_check_remaining_sql(), not only to check
for multiple statements, but now also to strip leading comments and
whitespace from SQL statements, so we can improve DML query detection.

pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more
accurately reflect its function, and hardened to handle more SQL comment
corner cases.

3 years agogh-93353: regrtest checks for leaked temporary files (#93776)
Victor Stinner [Tue, 14 Jun 2022 11:43:02 +0000 (13:43 +0200)] 
gh-93353: regrtest checks for leaked temporary files (#93776)

When running tests with -jN, create a temporary directory per process
and mark a test as "environment changed" if a test leaks a temporary
file or directory.

3 years agoGH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430)
Ken Jin [Tue, 14 Jun 2022 10:36:22 +0000 (18:36 +0800)] 
GH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430)

3 years agogh-90473: Include stdlib dir in wasmtime PYTHONPATH (GH-93797)
Christian Heimes [Tue, 14 Jun 2022 10:15:13 +0000 (12:15 +0200)] 
gh-90473: Include stdlib dir in wasmtime PYTHONPATH (GH-93797)

3 years agoGH-93516: Store offset of first traceable instruction in code object (GH-93769)
Mark Shannon [Tue, 14 Jun 2022 10:09:30 +0000 (11:09 +0100)] 
GH-93516: Store offset of first traceable instruction in code object (GH-93769)

3 years agoGH-93662: Make sure that column offsets are correct in multi-line method calls. ...
Mark Shannon [Tue, 14 Jun 2022 10:08:12 +0000 (11:08 +0100)] 
GH-93662: Make sure that column offsets are correct in multi-line method calls. (GH-93673)

3 years agogh-91321: Fix compatibility with C++ older than C++11 (#93784)
Victor Stinner [Tue, 14 Jun 2022 09:43:08 +0000 (11:43 +0200)] 
gh-91321: Fix compatibility with C++ older than C++11 (#93784)

Fix the compatibility of the Python C API with C++ older than C++11.

_Py_NULL is only defined as nullptr on C++11 and newer.

3 years agogh-89546: Clean up PyType_FromMetaclass (GH-93686)
Petr Viktorin [Tue, 14 Jun 2022 09:13:29 +0000 (11:13 +0200)] 
gh-89546: Clean up PyType_FromMetaclass (GH-93686)

When changing PyType_FromMetaclass recently (GH-93012, GH-93466, GH-28748)
I found a bunch of opportunities to improve the code. Here they are.

Fixes: #89546
Automerge-Triggered-By: GH:encukou
3 years agogh-93761: Fix test to avoid simple delay when synchronizing. (GH-93779)
Vinay Sajip [Tue, 14 Jun 2022 05:41:16 +0000 (06:41 +0100)] 
gh-93761: Fix test to avoid simple delay when synchronizing. (GH-93779)

3 years agogh-91810: Fix regression with writing an XML declaration with encoding='unicode'...
Serhiy Storchaka [Tue, 14 Jun 2022 04:25:33 +0000 (07:25 +0300)] 
gh-91810: Fix regression with writing an XML declaration with encoding='unicode' (GH-93426)

Suppress writing an XML declaration in open files in ElementTree.write()
with encoding='unicode' and xml_declaration=None.

If file patch is passed to ElementTree.write() with encoding='unicode',
always open a new file in UTF-8.

3 years agogh-79512: Fixed names and __module__ value of weakref classes (GH-93719)
Serhiy Storchaka [Tue, 14 Jun 2022 04:18:03 +0000 (07:18 +0300)] 
gh-79512: Fixed names and __module__ value of weakref classes (GH-93719)

Classes ReferenceType, ProxyType and CallableProxyType have now correct
atrtributes __module__, __name__ and __qualname__.
It makes them (types, not instances) pickleable.

3 years agogh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)
Serhiy Storchaka [Tue, 14 Jun 2022 04:15:26 +0000 (07:15 +0300)] 
gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)

It combines PyImport_ImportModule() and PyObject_GetAttrString()
and saves 4-6 lines of code on every use.

Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.

3 years agogh-93353: Add test.support.late_deletion() (#93774)
Victor Stinner [Mon, 13 Jun 2022 23:09:23 +0000 (01:09 +0200)] 
gh-93353: Add test.support.late_deletion() (#93774)

3 years agogh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766)
Victor Stinner [Mon, 13 Jun 2022 18:09:40 +0000 (20:09 +0200)] 
gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766)

Header files in the Include/cpython/ are only included if
the Py_LIMITED_API macro is not defined.

3 years agogh-84461: Fix parallel testing on WebAssembly (GH-93768)
Christian Heimes [Mon, 13 Jun 2022 17:51:04 +0000 (19:51 +0200)] 
gh-84461: Fix parallel testing on WebAssembly (GH-93768)

3 years agogh-93353: Fix importlib.resources._tempfile() finalizer (#93377)
Victor Stinner [Mon, 13 Jun 2022 17:24:00 +0000 (19:24 +0200)] 
gh-93353: Fix importlib.resources._tempfile() finalizer (#93377)

Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.

3 years agogh-84623: Remove unused imports in tests (#93772)
Victor Stinner [Mon, 13 Jun 2022 14:56:03 +0000 (16:56 +0200)] 
gh-84623: Remove unused imports in tests (#93772)

3 years agogh-91731: Don't define 'static_assert' in C++11 where is a keyword to avoid UB (GH...
Pablo Galindo Salgado [Mon, 13 Jun 2022 14:49:08 +0000 (15:49 +0100)] 
gh-91731: Don't define 'static_assert' in C++11 where is a keyword to avoid UB (GH-93700)

3 years agogh-84623: Remove unused imports in stdlib (#93773)
Victor Stinner [Mon, 13 Jun 2022 14:28:41 +0000 (16:28 +0200)] 
gh-84623: Remove unused imports in stdlib (#93773)

3 years agoRemove ANY_VARARGS() macro from the C API (#93764)
Victor Stinner [Mon, 13 Jun 2022 14:24:19 +0000 (16:24 +0200)] 
Remove ANY_VARARGS() macro from the C API (#93764)

The macro was exposed by mistake.

3 years agogh-89653: PEP 670: Convert PyFunction macros (#93765)
Victor Stinner [Mon, 13 Jun 2022 13:15:27 +0000 (15:15 +0200)] 
gh-89653: PEP 670: Convert PyFunction macros (#93765)

Convert PyFunction macros to static inline functions.

3 years agoAdd more FOR_ITER specialization stats (GH-32151)
Dennis Sweeney [Mon, 13 Jun 2022 05:40:54 +0000 (01:40 -0400)] 
Add more FOR_ITER specialization stats (GH-32151)

3 years agoGH-90699: use statically allocated strings in typeobject.c (gh-93751)
Kumar Aditya [Sun, 12 Jun 2022 16:38:18 +0000 (22:08 +0530)] 
GH-90699: use statically allocated strings in typeobject.c (gh-93751)

3 years agogh-93747: Fix Refleak when handling multiple Py_tp_doc slots (gh-93749)
Dong-hee Na [Sun, 12 Jun 2022 15:55:01 +0000 (00:55 +0900)] 
gh-93747: Fix Refleak when handling multiple Py_tp_doc slots (gh-93749)

3 years agogh-93728: fix memory leak in deepfrozen code objects (GH-93729)
Kumar Aditya [Sun, 12 Jun 2022 14:42:18 +0000 (20:12 +0530)] 
gh-93728: fix memory leak in deepfrozen code objects (GH-93729)

3 years agogh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar and TypeV...
Serhiy Storchaka [Sun, 12 Jun 2022 13:22:01 +0000 (16:22 +0300)] 
gh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar and TypeVarTuple parameters (alt) (GH-93412)

For example:

  A[T, *Ts][*tuple[int, ...]] -> A[int, *tuple[int, ...]]
  A[*Ts, T][*tuple[int, ...]] -> A[*tuple[int, ...], int]

3 years agoRemove usage of _Py_IDENTIFIER from math module (#93739)
Dong-hee Na [Sun, 12 Jun 2022 09:45:02 +0000 (18:45 +0900)] 
Remove usage of _Py_IDENTIFIER from math module (#93739)

3 years agogh-84508: tool to generate cjk traditional chinese mappings (gh-93272)
Davide Rizzo [Sat, 11 Jun 2022 14:19:41 +0000 (16:19 +0200)] 
gh-84508: tool to generate cjk traditional chinese mappings (gh-93272)

3 years agoChange list to view object (#93661)
Pamela Fox [Sat, 11 Jun 2022 10:54:31 +0000 (03:54 -0700)] 
Change list to view object (#93661)

3 years agogh-86404: [doc] A make sucpicious false positive. (GH-93710)
Julien Palard [Sat, 11 Jun 2022 10:52:25 +0000 (12:52 +0200)] 
gh-86404: [doc] A make sucpicious false positive. (GH-93710)

3 years agogh-90153: whatsnew: "z" option in format spec (GH-93624)
John Belmonte [Sat, 11 Jun 2022 09:58:49 +0000 (18:58 +0900)] 
gh-90153:  whatsnew: "z" option in format spec (GH-93624)

Add what's new entry for PEP 682 in Python 3.11.

3 years agogh-90473: Skip test_queue when threading is not available (GH-93712)
Christian Heimes [Sat, 11 Jun 2022 09:55:11 +0000 (11:55 +0200)] 
gh-90473: Skip test_queue when threading is not available (GH-93712)

3 years agogh-84461: Use HOSTRUNNER to run regression tests (GH-93694)
Christian Heimes [Sat, 11 Jun 2022 06:42:23 +0000 (08:42 +0200)] 
gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)

Co-authored-by: Brett Cannon <brett@python.org>
3 years agogh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931) 93670/head
Dennis Sweeney [Sat, 11 Jun 2022 01:50:11 +0000 (21:50 -0400)] 
gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)

3 years agogh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimpo...
jackh-ncl [Fri, 10 Jun 2022 22:57:04 +0000 (23:57 +0100)] 
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimport.py` (GH-93236)

3 years agogh-91317: Document that Path does not collapse initial `//` (GH-32193)
Oleg Iarygin [Fri, 10 Jun 2022 22:52:36 +0000 (01:52 +0300)] 
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.

3 years agogh-93461: Invalidate sys.path_importer_cache entries with relative paths (GH-93653)
Christian Heimes [Fri, 10 Jun 2022 21:56:26 +0000 (23:56 +0200)] 
gh-93461: Invalidate sys.path_importer_cache entries with relative paths (GH-93653)

3 years agoGH-93621: reorder code in with/async-with exception exit path to reduce the size...
Irit Katriel [Fri, 10 Jun 2022 16:53:34 +0000 (17:53 +0100)] 
GH-93621: reorder code in with/async-with exception exit path to reduce the size of the exception table (GH-93622)

3 years agogh-81790: support "UNC" device paths in `ntpath.splitdrive()` (GH-91882)
Barney Gale [Fri, 10 Jun 2022 15:59:55 +0000 (16:59 +0100)] 
gh-81790: support "UNC" device paths in `ntpath.splitdrive()` (GH-91882)

3 years agogh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match...
Pablo Galindo Salgado [Fri, 10 Jun 2022 15:56:45 +0000 (16:56 +0100)] 
gh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match statements (GH-93680)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agogh-93466: Document PyType_Spec doesn't accept repeated slot IDs; raise where this...
Petr Viktorin [Fri, 10 Jun 2022 13:55:09 +0000 (15:55 +0200)] 
gh-93466: Document PyType_Spec doesn't accept repeated slot IDs; raise where this was problematic (GH-93471)

3 years agogh-93491: Add support tier detection to configure (GH-93492)
Christian Heimes [Fri, 10 Jun 2022 13:25:33 +0000 (15:25 +0200)] 
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>
3 years agogh-90763: Modernise xx template module initialisation (#93078)
Erlend Egeberg Aasland [Fri, 10 Jun 2022 10:39:02 +0000 (12:39 +0200)] 
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.

3 years agogh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems...
neonene [Fri, 10 Jun 2022 08:10:04 +0000 (17:10 +0900)] 
gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems (#93090)

3 years agogh-90549: Fix leak of global named resources using multiprocessing spawn (#30617)
Leo Trol [Thu, 9 Jun 2022 16:55:12 +0000 (00:55 +0800)] 
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>
3 years agogh-90473: Skip get_config_h() tests on WASI (GH-93645)
Christian Heimes [Thu, 9 Jun 2022 16:08:03 +0000 (18:08 +0200)] 
gh-90473: Skip get_config_h() tests on WASI (GH-93645)

3 years agogh-90473: disable user site packages on WASI/Emscripten (GH-93633)
Christian Heimes [Thu, 9 Jun 2022 15:45:29 +0000 (17:45 +0200)] 
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)

3 years agoImprove logging documentation with example and additional cookbook re… (GH-93644)
Vinay Sajip [Thu, 9 Jun 2022 15:43:35 +0000 (16:43 +0100)] 
Improve logging documentation with example and additional cookbook re… (GH-93644)

3 years agobpo-45383: Get metaclass from bases in PyType_From* (GH-28748)
Sebastian Berg [Thu, 9 Jun 2022 15:11:08 +0000 (08:11 -0700)] 
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>
3 years agoDoc: Update references and examples of old, unsupported OSes and uarches (GH-92791)
CAM Gerlach [Thu, 9 Jun 2022 13:55:06 +0000 (08:55 -0500)] 
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791)

3 years agogh-90494: Reject 6th element of the __reduce__() tuple (GH-93609)
Serhiy Storchaka [Thu, 9 Jun 2022 07:12:43 +0000 (10:12 +0300)] 
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.

3 years agogh-93616: Fix env changed issue in test_modulefinder (GH-93617)
Christian Heimes [Thu, 9 Jun 2022 06:32:35 +0000 (08:32 +0200)] 
gh-93616: Fix env changed issue in test_modulefinder (GH-93617)

3 years agogh-79096: Fix/improve http cookiejar tests (GH-93614)
Christian Heimes [Wed, 8 Jun 2022 21:51:04 +0000 (23:51 +0200)] 
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>
3 years agogh-90473: Define HOSTRUNNER for WASI (GH-93606)
Christian Heimes [Wed, 8 Jun 2022 18:18:46 +0000 (20:18 +0200)] 
gh-90473: Define HOSTRUNNER for WASI (GH-93606)

3 years agogh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602)
Christian Heimes [Wed, 8 Jun 2022 18:18:08 +0000 (20:18 +0200)] 
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

3 years agogh-93180: Update os.copy_file_range() documentation (#93182)
Illia Volochii [Wed, 8 Jun 2022 15:49:13 +0000 (18:49 +0300)] 
gh-93180: Update os.copy_file_range() documentation (#93182)

3 years agogh-87961: Remove outdated notes from functions that aren't in the Limited API (GH...
Petr Viktorin [Wed, 8 Jun 2022 15:03:07 +0000 (17:03 +0200)] 
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

3 years agogh-93584: Make all install+tests targets depends on all (GH-93589)
Christian Heimes [Wed, 8 Jun 2022 13:16:20 +0000 (15:16 +0200)] 
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.

3 years agogh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (#93526)
Erlend Egeberg Aasland [Wed, 8 Jun 2022 10:43:54 +0000 (12:43 +0200)] 
gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (#93526)

3 years agoGH-93521: For dataclasses, filter out `__weakref__` slot if present in bases (GH...
Bluenix [Wed, 8 Jun 2022 00:53:08 +0000 (02:53 +0200)] 
GH-93521: For dataclasses, filter out `__weakref__` slot if present in bases (GH-93535)

3 years agogh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)
Kalyan [Tue, 7 Jun 2022 23:34:50 +0000 (05:04 +0530)] 
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>
3 years agoGH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483)
Irit Katriel [Tue, 7 Jun 2022 20:35:11 +0000 (21:35 +0100)] 
GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483)

3 years agoFix `PurePath.relative_to` links in the pathlib documentation. (GH-93268)
jacksonriley [Tue, 7 Jun 2022 18:54:16 +0000 (19:54 +0100)] 
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`.

3 years agogh-92592: Allow logging filters to return a LogRecord. (GH-92591)
Adrian Garcia Badaracco [Tue, 7 Jun 2022 15:53:57 +0000 (08:53 -0700)] 
gh-92592: Allow logging filters to return a LogRecord. (GH-92591)

3 years agogh-84461: Emscripten's faccessat() does not accept flags (GHß92353)
Christian Heimes [Tue, 7 Jun 2022 12:04:27 +0000 (14:04 +0200)] 
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353)

3 years agogh-93162: test_config_queue_handler requires threading (GH-93572)
Christian Heimes [Tue, 7 Jun 2022 10:34:08 +0000 (12:34 +0200)] 
gh-93162: test_config_queue_handler requires threading (GH-93572)

3 years agoFix MSVC compiler warnings in ceval.c (#93569)
Ken Jin [Tue, 7 Jun 2022 10:32:42 +0000 (18:32 +0800)] 
Fix MSVC compiler warnings in ceval.c (#93569)

3 years agoShrink the LOAD_METHOD cache by one codeunit. (#93537)
Mark Shannon [Tue, 7 Jun 2022 09:28:53 +0000 (10:28 +0100)] 
Shrink the LOAD_METHOD cache by one codeunit. (#93537)

3 years agogh-88831: In docs for asyncio.create_task, explain why strong references to tasks...
Andreas Grommek [Tue, 7 Jun 2022 08:56:09 +0000 (10:56 +0200)] 
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>
3 years agogh-57539: Increase calendar test coverage (GH-93468)
Hugo van Kemenade [Tue, 7 Jun 2022 08:44:29 +0000 (11:44 +0300)] 
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>
3 years agogh-93162: Add ability to configure QueueHandler/QueueListener together (GH-93269)
Vinay Sajip [Tue, 7 Jun 2022 08:20:35 +0000 (09:20 +0100)] 
gh-93162: Add ability to configure QueueHandler/QueueListener together (GH-93269)

Also, provide getHandlerByName() and getHandlerNames() APIs.

Closes #93162.

3 years agogh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH-93463)
Pascal Wittmann [Tue, 7 Jun 2022 08:11:03 +0000 (10:11 +0200)] 
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.

3 years agogh-86986: bump min sphinx version to 3.2 (GH-93337)
Davide Rizzo [Tue, 7 Jun 2022 08:05:38 +0000 (10:05 +0200)] 
gh-86986: bump min sphinx version to 3.2 (GH-93337)

3 years agoGrammar fix to socket error string (GH-93523)
Evorage [Tue, 7 Jun 2022 07:43:16 +0000 (08:43 +0100)] 
Grammar fix to socket error string (GH-93523)

3 years agoFix contributor name in WhatsNew 3.11 (GH-93556)
Samodya Abeysiriwardane [Tue, 7 Jun 2022 04:05:00 +0000 (23:05 -0500)] 
Fix contributor name in WhatsNew 3.11 (GH-93556)

3 years agobpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-foldin...
AN Long [Mon, 6 Jun 2022 23:47:27 +0000 (07:47 +0800)] 
bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-32010)

3 years agogh-89018: Improve documentation of `sqlite3` exceptions (#27645)
Erlend Egeberg Aasland [Mon, 6 Jun 2022 21:47:15 +0000 (23:47 +0200)] 
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>
3 years agogh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478)
Illia Volochii [Mon, 6 Jun 2022 21:21:58 +0000 (00:21 +0300)] 
gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478)

3 years ago[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552)
Thomas Grainger [Mon, 6 Jun 2022 18:10:42 +0000 (19:10 +0100)] 
[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552)

3 years agoRemove action=None kwarg from Barrier docs (GH-93538)
Thomas Grainger [Mon, 6 Jun 2022 17:28:05 +0000 (18:28 +0100)] 
Remove action=None kwarg from Barrier docs (GH-93538)

3 years agogh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)
Christian Heimes [Mon, 6 Jun 2022 17:24:11 +0000 (19:24 +0200)] 
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)

WASI does not have the ``chmod(2)`` syscall yet.

3 years agogh-83728: Add hmac.new default parameter deprecation (GH-91939)
Stanley [Mon, 6 Jun 2022 16:47:40 +0000 (09:47 -0700)] 
gh-83728: Add hmac.new default parameter deprecation (GH-91939)

3 years agoasyncio.Barrier docs: Fix typo (#93371)
Omer Katz [Mon, 6 Jun 2022 14:39:51 +0000 (17:39 +0300)] 
asyncio.Barrier docs: Fix typo (#93371)

taks -> tasks

3 years agogh-90473: Skip POSIX tests that don't apply to WASI (GH-93536)
Christian Heimes [Mon, 6 Jun 2022 14:31:59 +0000 (16:31 +0200)] 
gh-90473: Skip POSIX tests that don't apply to WASI (GH-93536)

3 years agoGH-92308 What's New: list pending removals in 3.13 and future versions (#92562)
Hugo van Kemenade [Mon, 6 Jun 2022 10:12:03 +0000 (13:12 +0300)] 
GH-92308 What's New: list pending removals in 3.13 and future versions (#92562)

3 years agogh-90473: WASI requires proper open(2) flags (GH-93529)
Christian Heimes [Mon, 6 Jun 2022 10:08:07 +0000 (12:08 +0200)] 
gh-90473: WASI requires proper open(2) flags (GH-93529)

3 years agogh-93247: Fix assert function in asyncio locks test (#93248)
Cyker Way [Mon, 6 Jun 2022 01:19:18 +0000 (21:19 -0400)] 
gh-93247: Fix assert function in asyncio locks test (#93248)

3 years agoDocument LOAD_FAST_CHECK opcode (#93498)
Dennis Sweeney [Sun, 5 Jun 2022 15:24:09 +0000 (11:24 -0400)] 
Document LOAD_FAST_CHECK opcode (#93498)

3 years agogh-89973: Fix re.error in the fnmatch module. (GH-93072)
Serhiy Storchaka [Sun, 5 Jun 2022 08:46:29 +0000 (11:46 +0300)] 
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.

3 years agogh-90473: wasmtime does not support absolute symlinks (GH-93490)
Christian Heimes [Sun, 5 Jun 2022 07:59:47 +0000 (09:59 +0200)] 
gh-90473: wasmtime does not support absolute symlinks (GH-93490)

3 years agogh-93442: Add test for _Py_CAST(nullptr). (gh-93505)
Neil Schemenauer [Sun, 5 Jun 2022 03:53:16 +0000 (20:53 -0700)] 
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505)

3 years agogh-93442: Make C++ version of _Py_CAST work with 0/NULL. (#93500)
Neil Schemenauer [Sun, 5 Jun 2022 01:49:39 +0000 (18:49 -0700)] 
gh-93442: Make C++ version of _Py_CAST work with 0/NULL. (#93500)

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
3 years ago[doc] Correct a grammatical error in a docstring. (GH-93441)
Colin Delahunty [Sat, 4 Jun 2022 16:42:08 +0000 (12:42 -0400)] 
[doc] Correct a grammatical error in a docstring. (GH-93441)

3 years agoFix missing word in sys.float_info docstring (GH-93489)
Mark Dickinson [Sat, 4 Jun 2022 16:28:14 +0000 (17:28 +0100)] 
Fix missing word in sys.float_info docstring (GH-93489)