]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-108113: Make it possible to optimize an AST (#108282)
Irit Katriel [Wed, 23 Aug 2023 08:01:17 +0000 (09:01 +0100)] 
gh-108113: Make it possible to optimize an AST (#108282)

2 years agogh-108267: Dataclasses docs: Fix object.__setattr__ typo (#108355)
FrozenBob [Wed, 23 Aug 2023 07:11:15 +0000 (00:11 -0700)] 
gh-108267: Dataclasses docs: Fix object.__setattr__ typo (#108355)

Fixed a sentence in dataclasses.rst

Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general.

2 years agogh-108342: Break ref cycle in SSLSocket._create() exc (#108344)
Victor Stinner [Wed, 23 Aug 2023 05:26:01 +0000 (07:26 +0200)] 
gh-108342: Break ref cycle in SSLSocket._create() exc (#108344)

Explicitly break a reference cycle when SSLSocket._create() raises an
exception. Clear the variable storing the exception, since the
exception traceback contains the variables and so creates a reference
cycle.

This test leak was introduced by the test added for the fix of #108310.

2 years agogh-105776: Fix test_cppext when CC contains -std=c11 option (#108343)
Victor Stinner [Wed, 23 Aug 2023 02:52:56 +0000 (04:52 +0200)] 
gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.

2 years agogh-90791: test.pythoninfo logs ASAN_OPTIONS env var (#108289)
Victor Stinner [Tue, 22 Aug 2023 23:39:50 +0000 (01:39 +0200)] 
gh-90791: test.pythoninfo logs ASAN_OPTIONS env var (#108289)

* Cleanup libregrtest code logging ASAN_OPTIONS.
* Fix a typo on "ASAN_OPTIONS" vs "MSAN_OPTIONS".

2 years agoFix spurious diff if the cases generator is run on Windows (#108319)
Alex Waygood [Tue, 22 Aug 2023 19:49:39 +0000 (20:49 +0100)] 
Fix spurious diff if the cases generator is run on Windows (#108319)

2 years agogh-107136: Remove Plausible for docs metrics (#107856)
Hugo van Kemenade [Tue, 22 Aug 2023 18:45:22 +0000 (21:45 +0300)] 
gh-107136: Remove Plausible for docs metrics (#107856)

2 years agoGH-92584: Remove distutils from the newtypes tutorial includes (#108024)
Adam Turner [Tue, 22 Aug 2023 18:42:51 +0000 (19:42 +0100)] 
GH-92584: Remove distutils from the newtypes tutorial includes (#108024)

2 years agogh-105857: Document that asyncio subprocess std{in,out,err} can be file handles ...
Hadházy Tamás [Tue, 22 Aug 2023 18:41:56 +0000 (19:41 +0100)] 
gh-105857: Document that asyncio subprocess std{in,out,err} can be file handles (#107986)

stdin/out can be filehandles -> add to docs.

2 years agoDocument 3.13, 3.14 and future removals (#108055)
Hugo van Kemenade [Tue, 22 Aug 2023 18:40:46 +0000 (21:40 +0300)] 
Document 3.13, 3.14 and future removals (#108055)

2 years agoDocs: Add link to skip to datetime's format codes (#108027)
Hugo van Kemenade [Tue, 22 Aug 2023 18:38:38 +0000 (21:38 +0300)] 
Docs: Add link to skip to datetime's format codes (#108027)

2 years agogh-108303: Add Lib/test/test_cppext/ sub-directory (#108325)
Victor Stinner [Tue, 22 Aug 2023 18:30:18 +0000 (20:30 +0200)] 
gh-108303: Add Lib/test/test_cppext/ sub-directory (#108325)

* Move test_cppext to its own directory
* Rename setup_testcppext.py to setup.py
* Rename _testcppext.cpp to extension.cpp
* The source (extension.cpp) is now also copied by the test.

2 years agogh-89745: Remove commented code in getpath.c (#108307)
Victor Stinner [Tue, 22 Aug 2023 18:25:06 +0000 (20:25 +0200)] 
gh-89745: Remove commented code in getpath.c (#108307)

2 years agogh-106320: Remove _PyDict_GetItemStringWithError() function (#108313)
Victor Stinner [Tue, 22 Aug 2023 18:17:25 +0000 (20:17 +0200)] 
gh-106320: Remove _PyDict_GetItemStringWithError() function (#108313)

Remove private _PyDict_GetItemStringWithError() function of the
public C API: the new PyDict_GetItemStringRef() can be used instead.

* Move private _PyDict_GetItemStringWithError() to the internal C API.
* _testcapi get_code_extra_index() uses PyDict_GetItemStringRef().
  Avoid using private functions in _testcapi which tests the public C
  API.

2 years agogh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108315)
Łukasz Langa [Tue, 22 Aug 2023 17:53:15 +0000 (19:53 +0200)] 
gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108315)

Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake
and included protections (like certificate verification) and treating sent
unencrypted data as if it were post-handshake TLS encrypted data.

The vulnerability is caused when a socket is connected, data is sent by the
malicious peer and stored in a buffer, and then the malicious peer closes the
socket within a small timing window before the other peers’ TLS handshake can
begin. After this sequence of events the closed socket will not immediately
attempt a TLS handshake due to not being connected but will also allow the
buffered data to be read as if a successful TLS handshake had occurred.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2 years agogh-108303: Remove unused Lib/test/sgml_input.html (#108305)
Victor Stinner [Tue, 22 Aug 2023 17:12:51 +0000 (19:12 +0200)] 
gh-108303: Remove unused Lib/test/sgml_input.html (#108305)

In Python 2.7, the file was used by Lib/test/test_sgmllib.py to test
Lib/sgmllib.py. The sgmllib module and its tests have been removed in
Python 3.0.

2 years agogh-108253: Fix bug in func version cache (#108296)
Guido van Rossum [Tue, 22 Aug 2023 15:29:49 +0000 (08:29 -0700)] 
gh-108253: Fix bug in func version cache (#108296)

When a function object changed its version, a stale pointer might remain in the cache.
Zap these whenever `func_version` changes (even when set to 0).

2 years agogh-106016: Add Lib/test/test_module/ directory (#108293)
Victor Stinner [Tue, 22 Aug 2023 14:53:49 +0000 (16:53 +0200)] 
gh-106016: Add Lib/test/test_module/ directory (#108293)

* Move Python scripts related to test_module to this new directory:
  good_getattr.py and bad_getattrX.py scripts.
* Move Lib/test/test_module.py to Lib/test/test_module/__init__.py.

2 years agogh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260)
Nikita Sobolev [Tue, 22 Aug 2023 14:34:18 +0000 (17:34 +0300)] 
gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260)

2 years agoIgnore _Py_write_noraise() result: cast to (void) (#108291)
Victor Stinner [Tue, 22 Aug 2023 14:28:20 +0000 (16:28 +0200)] 
Ignore _Py_write_noraise() result: cast to (void) (#108291)

Code using _Py_write_noraise() usually cannot report. Ignore errors
is the least surprising behavior for users.

2 years agogh-90791: Enable test___all__ on ASAN build (#108286)
Victor Stinner [Tue, 22 Aug 2023 13:52:32 +0000 (15:52 +0200)] 
gh-90791: Enable test___all__ on ASAN build (#108286)

* Only skip modules and tests related to X11 on ASAN builds: run
  other tests with ASAN.
* Use print(flush=True) to see output earlier when it's redirected to
  a pipe.
* Update issue reference: replace bpo-46633 with gh-90791.

2 years agoDocs: align the param spec of sqlite3.Connection methods with the implementation...
Erlend E. Aasland [Tue, 22 Aug 2023 13:20:58 +0000 (15:20 +0200)] 
Docs: align the param spec of sqlite3.Connection methods with the implementation (#108285)

- no parameters of create_aggregate() are positional-only
- all parameters of create_collation() are positional-only

2 years agogh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)
Serhiy Storchaka [Tue, 22 Aug 2023 12:50:30 +0000 (15:50 +0300)] 
gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)

2 years agogh-106971: Docs: Add missing issue reference (#106992)
Junya Fukuda [Tue, 22 Aug 2023 12:38:01 +0000 (21:38 +0900)] 
gh-106971: Docs: Add missing issue reference (#106992)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly (#108015)
Erlend E. Aasland [Tue, 22 Aug 2023 11:10:29 +0000 (13:10 +0200)] 
gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly (#108015)

2 years agogh-108179: Add error message for parser stack overflows (#108256)
Dennis Sweeney [Tue, 22 Aug 2023 07:41:50 +0000 (03:41 -0400)] 
gh-108179: Add error message for parser stack overflows (#108256)

2 years agogh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933)
Erlend E. Aasland [Tue, 22 Aug 2023 07:37:53 +0000 (09:37 +0200)] 
gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream

2 years agoFix test_faulthandler for sanitizers (#108245)
Victor Stinner [Tue, 22 Aug 2023 01:16:12 +0000 (03:16 +0200)] 
Fix test_faulthandler for sanitizers (#108245)

Set environment options to ask sanitizers to not handle SIGSEGV.

This change allows running test_enable_fd() and test_enable_file()
with sanitizers. Previously, they were skipped.

2 years agoDefine _Py_NULL as nullptr on C23 and newer (#108244)
Victor Stinner [Tue, 22 Aug 2023 00:37:32 +0000 (02:37 +0200)] 
Define _Py_NULL as nullptr on C23 and newer (#108244)

C23 standard added nullptr constant:
https://en.wikipedia.org/wiki/C23_(C_standard_revision)

2 years agogh-106242: Make ntpath.realpath errors consistent with abspath when there are embedde...
Steve Dower [Tue, 22 Aug 2023 00:16:02 +0000 (01:16 +0100)] 
gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (GH-108248)

* gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls

* Update 2023-08-22-00-36-57.gh-issue-106242.q24ITw.rst

mention Windows and the former incorrect ValueError.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agoFix test_generators: save/restore warnings filters (#108246)
Victor Stinner [Mon, 21 Aug 2023 23:41:13 +0000 (01:41 +0200)] 
Fix test_generators: save/restore warnings filters (#108246)

Previously, depending on existing filters, the test
could modify the warnings and so fail as "env changed".

2 years agogh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (#108242)
Irit Katriel [Mon, 21 Aug 2023 22:44:31 +0000 (23:44 +0100)] 
gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (#108242)

2 years agogh-107265: Fix code_hash for ENTER_EXECUTOR case (#108188)
Dong-hee Na [Mon, 21 Aug 2023 21:22:18 +0000 (06:22 +0900)] 
gh-107265: Fix code_hash for ENTER_EXECUTOR case (#108188)

2 years agogh-108223: Document --disable-gil flag in configure (#108236)
Sam Gross [Mon, 21 Aug 2023 20:37:07 +0000 (16:37 -0400)] 
gh-108223: Document --disable-gil flag in configure (#108236)

2 years agogh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)
Victor Stinner [Mon, 21 Aug 2023 20:16:23 +0000 (22:16 +0200)] 
gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)

Enable with --disable-gil --without-pydebug:

    $ make pythoninfo|grep NOGIL
    sysconfig[Py_NOGIL]: 1

    $ ./python -m test
    ...
    == Python build: nogil debug
    ...

2 years agogh-107298: Fix C API datetime documentation (GH-108034)
Serhiy Storchaka [Mon, 21 Aug 2023 18:15:46 +0000 (21:15 +0300)] 
gh-107298: Fix C API datetime documentation (GH-108034)

2 years agogh-107211: No longer export pycore_strhex.h functions (#108229)
Victor Stinner [Mon, 21 Aug 2023 18:12:22 +0000 (20:12 +0200)] 
gh-107211: No longer export pycore_strhex.h functions (#108229)

No longer export functions:

* _Py_strhex_bytes()
* _Py_strhex_with_sep()

2 years agogh-108224: Fix asyncio doc inconsistency (#108230)
temach [Mon, 21 Aug 2023 18:08:04 +0000 (00:08 +0600)] 
gh-108224: Fix asyncio doc inconsistency (#108230)

(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)

2 years agogh-108216: Cleanup #include in internal header files (#108228)
Victor Stinner [Mon, 21 Aug 2023 18:05:59 +0000 (20:05 +0200)] 
gh-108216: Cleanup #include in internal header files (#108228)

* Add missing includes.
* Remove unused includes.
* Update old include/symbol names to newer names.
* Mention at least one included symbol.
* Sort includes.
* Update Tools/cases_generator/generate_cases.py used to generated
  pycore_opcode_metadata.h.
* Update Parser/asdl_c.py used to generate pycore_ast.h.
* Cleanup also includes in _testcapimodule.c and _testinternalcapi.c.

2 years agogh-108223: Add --disable-gil to configure (gh-108227)
Sam Gross [Mon, 21 Aug 2023 17:50:35 +0000 (13:50 -0400)] 
gh-108223: Add --disable-gil to configure (gh-108227)

The `--disable-gil` flags does not do anything yet other than define the
Py_NOGIL macro. This is intended to support setting up additional
buildbots.

2 years agogh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221)
Victor Stinner [Mon, 21 Aug 2023 17:15:52 +0000 (19:15 +0200)] 
gh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221)

* pycore_intrinsics.h does nothing if included twice
  (add #ifndef and #define).
* Update Tools/cases_generator/generate_cases.py to generate the
  Py_BUILD_CORE test.
* _bz2, _lzma, _opcode and zlib extensions now define the
  Py_BUILD_CORE_MODULE macro to use internal headers
  (pycore_code.h, pycore_intrinsics.h and pycore_blocks_output_buffer.h).

2 years agogh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077)
Serhiy Storchaka [Mon, 21 Aug 2023 17:05:15 +0000 (20:05 +0300)] 
gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077)

2 years agogh-108113: Make it possible to create an optimized AST (#108154)
Irit Katriel [Mon, 21 Aug 2023 16:31:30 +0000 (17:31 +0100)] 
gh-108113: Make it possible to create an optimized AST (#108154)

2 years agodocs: fix grammar in isolating-extensions.rst (#108037)
David Lechner [Mon, 21 Aug 2023 15:41:34 +0000 (10:41 -0500)] 
docs: fix grammar in isolating-extensions.rst (#108037)

2 years agogh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from...
Serhiy Storchaka [Mon, 21 Aug 2023 13:59:58 +0000 (16:59 +0300)] 
gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers (GH-108132)

2 years agogh-107905: Test raising `__value__` for `TypeAliasType` (#107997)
Nikita Sobolev [Mon, 21 Aug 2023 13:52:37 +0000 (16:52 +0300)] 
gh-107905: Test raising `__value__` for `TypeAliasType` (#107997)

2 years agoRun sphinx-lint on Misc/NEWS.d/next/ (#108212)
Hugo van Kemenade [Mon, 21 Aug 2023 13:13:55 +0000 (16:13 +0300)] 
Run sphinx-lint on Misc/NEWS.d/next/ (#108212)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)
balmeida-nokia [Mon, 21 Aug 2023 11:39:06 +0000 (12:39 +0100)] 
gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().

2 years agogh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWith...
Serhiy Storchaka [Mon, 21 Aug 2023 11:16:31 +0000 (14:16 +0300)] 
gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929)

2 years agogh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)
Petr Viktorin [Mon, 21 Aug 2023 10:56:46 +0000 (12:56 +0200)] 
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2 years agoImprove references in the tutorial (GH-108069)
Serhiy Storchaka [Mon, 21 Aug 2023 10:41:01 +0000 (13:41 +0300)] 
Improve references in the tutorial (GH-108069)

* Use full qualified names for references (even if they do not work now,
  they will work in future).
* Silence references to examples.

2 years agogh-105736: Sync pure python version of OrderedDict with the C version (#108098)
Raymond Hettinger [Mon, 21 Aug 2023 09:49:08 +0000 (04:49 -0500)] 
gh-105736: Sync pure python version of OrderedDict with the C version (#108098)

2 years agogh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode...
Joon Hwan 김준환 [Mon, 21 Aug 2023 07:55:09 +0000 (16:55 +0900)] 
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168)

2 years agoResolve reference warnings in faq/gui.rst (#108147)
Adam Turner [Mon, 21 Aug 2023 07:37:52 +0000 (08:37 +0100)] 
Resolve reference warnings in faq/gui.rst (#108147)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-107265: Fix code_richcompare for ENTER_EXECUTOR case (gh-108165)
Dong-hee Na [Mon, 21 Aug 2023 05:50:09 +0000 (14:50 +0900)] 
gh-107265: Fix code_richcompare for ENTER_EXECUTOR case (gh-108165)

2 years agogh-107526: Fix test_module_level_callable_unrepresentable_default (gh-108187)
Dong-hee Na [Mon, 21 Aug 2023 04:51:31 +0000 (13:51 +0900)] 
gh-107526: Fix test_module_level_callable_unrepresentable_default (gh-108187)

2 years agogh-107526: Revert "gh-100357: Convert several functions in bltinsmodule to AC" (...
Nikita Sobolev [Mon, 21 Aug 2023 00:54:10 +0000 (03:54 +0300)] 
gh-107526: Revert "gh-100357: Convert several functions in bltinsmodule to AC" (#107542)

2 years agogh-104504: cases generator: Add `--warn-unreachable` to the mypy config (#108112)
Alex Waygood [Sun, 20 Aug 2023 23:40:41 +0000 (00:40 +0100)] 
gh-104504: cases generator: Add `--warn-unreachable` to the mypy config (#108112)

2 years agoResolve reference warnings in faq/library.rst (#108149)
Adam Turner [Sun, 20 Aug 2023 19:01:13 +0000 (20:01 +0100)] 
Resolve reference warnings in faq/library.rst (#108149)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agoResolve reference warnings in faq/design.rst (#108148)
Adam Turner [Sun, 20 Aug 2023 18:34:27 +0000 (19:34 +0100)] 
Resolve reference warnings in faq/design.rst (#108148)

2 years agoDocs: document 'manager' and '_log' attrs of logging.Logging (#108145)
Erlend E. Aasland [Sun, 20 Aug 2023 16:01:10 +0000 (18:01 +0200)] 
Docs: document 'manager' and '_log' attrs of logging.Logging (#108145)

Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agoResolve reference warnings in faq/programming.rst (#108150)
Adam Turner [Sun, 20 Aug 2023 13:53:28 +0000 (14:53 +0100)] 
Resolve reference warnings in faq/programming.rst (#108150)

2 years agoDocs: Fix Sphinx warnings in logging.rst (GH-108139)
Erlend E. Aasland [Sun, 20 Aug 2023 11:19:07 +0000 (13:19 +0200)] 
Docs: Fix Sphinx warnings in logging.rst (GH-108139)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2 years agoDocs: Fix Sphinx warnings in license.rst (#108142)
Erlend E. Aasland [Sun, 20 Aug 2023 11:10:48 +0000 (13:10 +0200)] 
Docs: Fix Sphinx warnings in license.rst (#108142)

- Fix links to stdlib modules
- Silence links to external functions

2 years agoDocs: Fix Sphinx warnings in sys.rst (#108106)
Erlend E. Aasland [Sun, 20 Aug 2023 11:09:33 +0000 (13:09 +0200)] 
Docs: Fix Sphinx warnings in sys.rst (#108106)

- Mark up named tuple attributes as attributes
- Remove links for external functions
- io.BufferedIOBase has no 'buffer' attribute;
  remove the link and mark up using :attr:`!buffer`
- (Re)format some tables as bullet lists:
  - sys._emscripten_info
  - sys.hash_info
  - sys.int_info
  - sys.thread_info
- In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes',
  add links to the frame objects reference.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER...
Tomas R [Sun, 20 Aug 2023 10:54:06 +0000 (12:54 +0200)] 
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (#107769)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years agogh-107619: Extend functools LRU cache docs with generators and async functions (...
Hadházy Tamás [Sun, 20 Aug 2023 10:33:15 +0000 (11:33 +0100)] 
gh-107619: Extend functools LRU cache docs with generators and async functions (#107934)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years agoFix patchcheck for `asyncio.tasks` (#108159)
Kumar Aditya [Sun, 20 Aug 2023 09:00:42 +0000 (14:30 +0530)] 
Fix patchcheck for `asyncio.tasks` (#108159)

2 years agoFix misspellings in sysconfig docs (#108156)
Rafael Fontenelle [Sun, 20 Aug 2023 08:11:39 +0000 (05:11 -0300)] 
Fix misspellings in sysconfig docs (#108156)

2 years agogh-107980: fix doc role for asyncio.timeouts (#108126)
Tin Tvrtković [Sat, 19 Aug 2023 20:14:38 +0000 (22:14 +0200)] 
gh-107980: fix doc role for asyncio.timeouts (#108126)

2 years agoDocs: Remove links to external C functions and macros in os.rst (#108138)
Erlend E. Aasland [Sat, 19 Aug 2023 17:03:26 +0000 (19:03 +0200)] 
Docs: Remove links to external C functions and macros in os.rst (#108138)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)
Serhiy Storchaka [Sat, 19 Aug 2023 11:51:03 +0000 (14:51 +0300)] 
gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)

Such C API functions as PyErr_SetString(), PyErr_Format(),
PyErr_SetFromErrnoWithFilename() and many others no longer crash or
ignore errors if it failed to format the error message or decode the
filename. Instead, they keep a corresponding error.

2 years agogh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)
Serhiy Storchaka [Sat, 19 Aug 2023 11:48:02 +0000 (14:48 +0300)] 
gh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)

Add tkinter.Misc methods: tk_busy_hold(), tk_busy_configure(), tk_busy_cget(),
tk_busy_forget(), tk_busy_current(), and tk_busy_status().

2 years agoDocs: format sys.float_info properly (#108107)
Erlend E. Aasland [Sat, 19 Aug 2023 08:34:34 +0000 (10:34 +0200)] 
Docs: format sys.float_info properly (#108107)

- Normalise capitalisation and punctuation
- Use attribute markup for named tuple attributes
- Use :c:macro: markup for C macros
- Use a list for the 'rounds' attribute values
- Use list-table, for better .rst readability
- Remove one unneeded sys.float_info.dig link

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107704: Argument Clinic: add support for deprecating keyword use of parameters...
Serhiy Storchaka [Sat, 19 Aug 2023 07:13:35 +0000 (10:13 +0300)] 
gh-107704: Argument Clinic: add support for deprecating keyword use of parameters (GH-107984)

It is now possible to deprecate passing keyword arguments for
keyword-or-positional parameters with Argument Clinic, using the new
'/ [from X.Y]' syntax.
(To be read as "positional-only from Python version X.Y")

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-101100: Only show GitHub check annotations on changed doc paragraphs (#108065)
C.A.M. Gerlach [Sat, 19 Aug 2023 00:43:28 +0000 (19:43 -0500)] 
gh-101100: Only show GitHub check annotations on changed doc paragraphs (#108065)

* Only show GitHub check annotations on changed doc paragraphs
* Improve check-warnings script arg parsing following Hugo's suggestions
* Factor filtering warnings by modified diffs into helper function
* Build docs on unmerged branch so warning lines match & avoid deep clone

---------

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897)
Ned Deily [Fri, 18 Aug 2023 21:38:24 +0000 (17:38 -0400)] 
gh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897)

2 years agogh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3...
Ned Deily [Fri, 18 Aug 2023 19:48:20 +0000 (15:48 -0400)] 
gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-107896)

2 years agogh-107801: Improve the accuracy of os.lseek docs (#107935)
Erlend E. Aasland [Fri, 18 Aug 2023 17:53:51 +0000 (19:53 +0200)] 
gh-107801: Improve the accuracy of os.lseek docs (#107935)

- name the last parameter *whence*, like it is for seek() methods on
  file objects
- add param docstrings
- structure the valid *whence* params

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agoMinor code clean-up for the factor() recipe (GH-108114)
Raymond Hettinger [Fri, 18 Aug 2023 17:13:58 +0000 (12:13 -0500)] 
Minor code clean-up for the factor() recipe (GH-108114)

2 years agogh-107995: Fix doctest collection of functools.cached_property objects (#107996)
Tyler Smart [Fri, 18 Aug 2023 15:44:38 +0000 (08:44 -0700)] 
gh-107995: Fix doctest collection of functools.cached_property objects (#107996)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-104504: Run mypy on cases_generator in CI (and blacken the code) (gh-108090)
Dong-hee Na [Fri, 18 Aug 2023 13:42:45 +0000 (22:42 +0900)] 
gh-104504: Run mypy on cases_generator in CI (and blacken the code) (gh-108090)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close()... 104245/head
Erlend E. Aasland [Fri, 18 Aug 2023 11:39:12 +0000 (13:39 +0200)] 
gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084)

- Add explanatory comments
- Add return value to connection_close() for propagating errors
- Always check the return value of connection_exec_stmt()
- Assert pre/post state in remove_callbacks()
- Don't log unraisable exceptions in case of interpreter shutdown
- Make sure we're not initialized if reinit fails
- Try to close the database even if ROLLBACK fails

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-108014: Add Py_IsFinalizing() function (#108032)
Victor Stinner [Fri, 18 Aug 2023 10:34:41 +0000 (12:34 +0200)] 
gh-108014: Add Py_IsFinalizing() function (#108032)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agoDocs: emphasise warning and add accurate markups for sys.unraisablehook (#108105)
Erlend E. Aasland [Fri, 18 Aug 2023 10:16:22 +0000 (12:16 +0200)] 
Docs: emphasise warning and add accurate markups for sys.unraisablehook (#108105)

2 years agogh-107801: Improve the docs of the SEEK_* constants (#108099)
Erlend E. Aasland [Thu, 17 Aug 2023 20:41:35 +0000 (22:41 +0200)] 
gh-107801: Improve the docs of the SEEK_* constants (#108099)

2 years agoDocs: Fix Sphinx warnings in io.rst (#107903)
Erlend E. Aasland [Thu, 17 Aug 2023 19:19:01 +0000 (21:19 +0200)] 
Docs: Fix Sphinx warnings in io.rst (#107903)

- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107944: Improve error message for function calls with bad keyword arguments (...
Pablo Galindo Salgado [Thu, 17 Aug 2023 18:39:42 +0000 (19:39 +0100)] 
gh-107944: Improve error message for function calls with bad keyword arguments (#107969)

2 years agogh-106581: Project through calls (#108067)
Guido van Rossum [Thu, 17 Aug 2023 18:29:58 +0000 (11:29 -0700)] 
gh-106581: Project through calls (#108067)

This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.

2 years agogh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)
Erlend E. Aasland [Thu, 17 Aug 2023 18:16:08 +0000 (20:16 +0200)] 
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)

'not hasattr(parent, "classes")' is always false, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.

2 years agogh-102029: Deprecate passing arguments to `_PyRLock` in `threading` (#102071)
Nikita Sobolev [Thu, 17 Aug 2023 16:19:07 +0000 (19:19 +0300)] 
gh-102029: Deprecate passing arguments to `_PyRLock` in `threading` (#102071)

2 years agogh-105481: opcode.h is no longer generated during the build (#108080)
Irit Katriel [Thu, 17 Aug 2023 16:07:58 +0000 (17:07 +0100)] 
gh-105481: opcode.h is no longer generated during the build (#108080)

2 years agoAdd workflow for automatic issue headers (#108054)
Adam Turner [Thu, 17 Aug 2023 15:37:07 +0000 (16:37 +0100)] 
Add workflow for automatic issue headers (#108054)

We don't get the "Bug report" and "Feature or enhancement" titles anymore, with the new issue forms. This brings them back!

2 years agogh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)
Erlend E. Aasland [Thu, 17 Aug 2023 14:14:01 +0000 (16:14 +0200)] 
gh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2 years agogh-105481: fix out of date comment (#108079)
Irit Katriel [Thu, 17 Aug 2023 10:25:28 +0000 (11:25 +0100)] 
gh-105481: fix out of date comment (#108079)

2 years agoGH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance...
Mark Shannon [Thu, 17 Aug 2023 10:16:03 +0000 (11:16 +0100)] 
GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance. (GH-108036)

2 years agoGH-107987: Remove the Distributing Python Modules guide (#108016)
Adam Turner [Thu, 17 Aug 2023 10:01:14 +0000 (11:01 +0100)] 
GH-107987: Remove the Distributing Python Modules guide (#108016)

2 years agogh-107298: Fix some references in the C API documentation (GH-108072)
Serhiy Storchaka [Thu, 17 Aug 2023 08:16:00 +0000 (11:16 +0300)] 
gh-107298: Fix some references in the C API documentation (GH-108072)

2 years agogh-105539: Explict resource management for connection objects in sqlite3 tests (...
Erlend E. Aasland [Thu, 17 Aug 2023 06:45:48 +0000 (08:45 +0200)] 
gh-105539: Explict resource management for connection objects in sqlite3 tests (#108017)

- Use memory_database() helper
- Move test utility functions to util.py
- Add convenience memory database mixin
- Add check() helper for closed connection tests

2 years agogh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029)
Serhiy Storchaka [Thu, 17 Aug 2023 06:44:05 +0000 (09:44 +0300)] 
gh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029)