Commit graph

117842 commits

Author SHA1 Message Date
Miss Islington (bot)
92cbe739d4
[3.12] Docs: Add link to skip to datetime's format codes (GH-108027) (#108329)
Docs: Add link to skip to datetime's format codes (GH-108027)
(cherry picked from commit 35cb1605d0)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-22 22:06:53 +02:00
Miss Islington (bot)
b539dd3073
[3.12] gh-108303: Add Lib/test/test_cppext/ sub-directory (GH-108325) (#108328)
gh-108303: Add Lib/test/test_cppext/ sub-directory (GH-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.
(cherry picked from commit 21dda09600)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-22 22:06:33 +02:00
Victor Stinner
ca47a2183a
[3.12] gh-106016: Add Lib/test/test_module/ directory (#108293) (#108306)
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.

(cherry picked from commit adfc118fda)
2023-08-22 22:06:07 +02:00
Miss Islington (bot)
fad80598dc
[3.12] Document 3.13, 3.14 and future removals (GH-108055) (#108331)
(cherry picked from commit 39de79b345)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-22 21:38:13 +02:00
Miss Islington (bot)
3cdaa6a794
[3.12] gh-105857: Document that asyncio subprocess std{in,out,err} can be file handles (GH-107986) (#108332)
(cherry picked from commit 13966da71b)

Co-authored-by: Hadházy Tamás <85063808+Hels15@users.noreply.github.com>
2023-08-22 21:37:14 +02:00
Łukasz Langa
256586ab87
[3.12] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108316)
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>
2023-08-22 21:03:20 +02:00
Miss Islington (bot)
1dbf11814f
[3.12] gh-107700: [Enum] Document that EnumType was added in 3.11 (GH-108260) (#108301)
(cherry picked from commit e8ef0bdd8c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-08-22 20:34:56 +02:00
Miss Islington (bot)
68fd6db981
[3.12] Docs: align the param spec of sqlite3.Connection methods with the implementation (GH-108285) (#108287)
Docs: align the param spec of sqlite3.Connection methods with the implementation (GH-108285)

- no parameters of create_aggregate() are positional-only
- all parameters of create_collation() are positional-only
(cherry picked from commit 893215a4e7)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-22 16:17:03 +02:00
Miss Islington (bot)
e5d779c0e2
[3.12] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108284)
gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)
(cherry picked from commit d7202e4879)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-22 16:16:31 +02:00
Miss Islington (bot)
a2b680d9e9
[3.12] gh-106971: Docs: Add missing issue reference (GH-106992) (#108283)
gh-106971: Docs: Add missing issue reference (GH-106992)
(cherry picked from commit c556f9a3c9)

Co-authored-by: Junya Fukuda <junya.fukuda.e@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-22 16:15:59 +02:00
Miss Islington (bot)
4ee9454792
[3.12] gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (GH-108242) (#108275)
gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop (GH-108242)
(cherry picked from commit a1cc74c4ee)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-08-22 16:15:34 +02:00
Miss Islington (bot)
149d70c254
[3.12] gh-108179: Add error message for parser stack overflows (GH-108256) (#108263)
gh-108179: Add error message for parser stack overflows (GH-108256)
(cherry picked from commit 86617518c4)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2023-08-22 12:02:32 +02:00
Erlend E. Aasland
ef4d427fd8
[3.12] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933) (#108262)
(cherry picked from commit 7f87ebbc3f)

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
2023-08-22 12:01:38 +02:00
Miss Islington (bot)
dd73f2f76a
[3.12] gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (GH-108248) (#108251)
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.

---------

(cherry picked from commit de33b5c662)

Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-08-22 12:01:24 +02:00
Miss Islington (bot)
b26a7b78c9
[3.12] Fix test_generators: save/restore warnings filters (GH-108246) (#108249)
Fix test_generators: save/restore warnings filters (GH-108246)

Previously, depending on existing filters, the test
could modify the warnings and so fail as "env changed".
(cherry picked from commit 531930f47f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-22 12:00:07 +02:00
Serhiy Storchaka
47f60c3f67
[3.12] gh-107298: Fix C API datetime documentation (GH-108034). (#108234)
(cherry picked from commit d63972e289)
2023-08-21 21:44:45 +02:00
Miss Islington (bot)
f51cdfaaac
[3.12] gh-108224: Fix asyncio doc inconsistency (GH-108230) (#108231)
gh-108224: Fix asyncio doc inconsistency (GH-108230)

(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)
(cherry picked from commit 1cc391d9e2)

Co-authored-by: temach <tematibr@gmail.com>
2023-08-21 21:44:08 +02:00
Miss Islington (bot)
78a2a8c026
[3.12] gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077) (#108225)
gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077)
(cherry picked from commit db55383829)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-21 21:43:28 +02:00
Miss Islington (bot)
a27f18a382
[3.12] docs: fix grammar in isolating-extensions.rst (GH-108037) (#108218)
docs: fix grammar in isolating-extensions.rst (GH-108037)
(cherry picked from commit 47022a079e)

Co-authored-by: David Lechner <david@pybricks.com>
2023-08-21 21:40:08 +02:00
T. Wouters
bc97eb76bb
[3.12] Fix sphinx-lint issue now that lint runs on Misc/NEWS.d (#108237)
Fix lint warnings in Misc/NEWS.d/next/Library/2023-08-17-14-45-25.gh-issue-105736.NJsH7r.rst
(effectively a backport of GH-108212).
2023-08-21 19:39:45 +00:00
Miss Islington (bot)
f04024d588
[3.12] gh-107905: Test raising __value__ for TypeAliasType (GH-107997) (#108217)
gh-107905: Test raising `__value__` for `TypeAliasType` (GH-107997)
(cherry picked from commit 13104f3b74)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-08-21 21:18:42 +02:00
Hugo van Kemenade
90a22eae45
[3.12] Run sphinx-lint on Misc/NEWS.d/next/ (GH-108212) (#108213)
Run sphinx-lint on Misc/NEWS.d/next/
2023-08-21 15:32:33 +02:00
Miss Islington (bot)
a909ec399d
[3.12] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (#108211)
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)

(cherry picked from commit acbd3f9c5c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2023-08-21 15:31:40 +02:00
Miss Islington (bot)
e1b069fe06
[3.12] gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485) (#108207)
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().
(cherry picked from commit 37135d25e2)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
2023-08-21 14:35:18 +02:00
Miss Islington (bot)
238c8d236b
[3.12] gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929) (#108205)
gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929)
(cherry picked from commit 80bdebdd85)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-21 14:33:46 +02:00
Miss Islington (bot)
1ce8b92ce9
[3.12] gh-105736: Sync pure python version of OrderedDict with the C version (GH-108098) (#108200)
gh-105736: Sync pure python version of OrderedDict with the C version (GH-108098)
(cherry picked from commit 20cc90c0df)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-08-21 14:31:11 +02:00
Miss Islington (bot)
f798a6360b
[3.12] Improve references in the tutorial (GH-108069) (#108203)
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.
(cherry picked from commit 622ddc4167)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-21 13:20:21 +02:00
Miss Islington (bot)
639ffd5aa0
[3.12] gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) (#108196)
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168)
(cherry picked from commit 014a5b71e7)

Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
2023-08-21 13:18:04 +02:00
Miss Islington (bot)
9cd15cab77
[3.12] Docs: document 'manager' and '_log' attrs of logging.Logging (GH-108145) (#108190)
Docs: document 'manager' and '_log' attrs of logging.Logging (GH-108145)
(cherry picked from commit f904aa4e1f)


Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-21 13:16:53 +02:00
Miss Islington (bot)
f2cc00527e
[3.12] Resolve reference warnings in faq/library.rst (GH-108149) (#108182)
Resolve reference warnings in faq/library.rst (GH-108149)
(cherry picked from commit 6323bc33ff)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-20 23:09:18 +02:00
Miss Islington (bot)
a6f15af866
[3.12] Resolve reference warnings in faq/design.rst (GH-108148) (#108180)
Resolve reference warnings in faq/design.rst (GH-108148)
(cherry picked from commit 92815cc7cf)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 23:08:57 +02:00
Erlend E. Aasland
399825ed26
[3.12] Docs: Fix Sphinx warnings in sys.rst (#108106) (#108178)
(cherry picked from commit 29fa7afef9)

- 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>
2023-08-20 23:08:39 +02:00
Erlend E. Aasland
fa6cd7f43f
[3.12] Docs: Fix Sphinx warnings in logging.rst (GH-108139) (#108174)
(cherry picked from commit c735e79afb)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-20 23:08:16 +02:00
Miss Islington (bot)
97d67e9dab
[3.12] gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918) (#108134)
* 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.
(cherry picked from commit 633ea217a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Define PY_SSIZE_T_CLEAN.

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-20 23:07:24 +02:00
Miss Islington (bot)
7f5a741a28
[3.12] Resolve reference warnings in faq/programming.rst (GH-108150) (#108170)
Resolve reference warnings in faq/programming.rst (GH-108150)
(cherry picked from commit a390ec20f5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 16:44:43 +02:00
Miss Islington (bot)
ff125c4bd8
[3.12] Docs: Fix Sphinx warnings in license.rst (GH-108142) (#108167)
Docs: Fix Sphinx warnings in license.rst (GH-108142)

- Fix links to stdlib modules
- Silence links to external functions
(cherry picked from commit 4d4393139f)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-20 15:50:29 +02:00
Miss Islington (bot)
590bc6a226
[3.12] gh-107659: Improve wording of the description of ctypes.pointer and ctypes.POINTER (GH-107769) (#108163)
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769)
(cherry picked from commit beffb30dc7)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 15:50:09 +02:00
Miss Islington (bot)
fbe1cff015
[3.12] gh-107619: Extend functools LRU cache docs with generators and async functions (GH-107934) (#108161)
gh-107619: Extend functools LRU cache docs with generators and async functions (GH-107934)
(cherry picked from commit 1a713eac47)

Co-authored-by: Hadházy Tamás <85063808+Hels15@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 15:49:32 +02:00
Miss Islington (bot)
1e46f1a9a4
[3.12] Fix patchcheck for asyncio.tasks (GH-108159) (#108160)
Fix patchcheck for `asyncio.tasks` (GH-108159)
(cherry picked from commit b1e5d2c601)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 15:49:03 +02:00
Miss Islington (bot)
a4a494aff4
[3.12] Fix misspellings in sysconfig docs (GH-108156) (#108157)
Fix misspellings in sysconfig docs (GH-108156)
(cherry picked from commit 1dc0c58d2b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2023-08-20 15:48:46 +02:00
Miss Islington (bot)
0e5eee0130
[3.12] gh-107980: fix doc role for asyncio.timeouts (GH-108126) (#108152)
gh-107980: fix doc role for asyncio.timeouts (GH-108126)
(cherry picked from commit a47c13cae5)

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
2023-08-20 01:08:40 +02:00
Miss Islington (bot)
540c0d99ea
[3.12] Docs: Remove links to external C functions and macros in os.rst (GH-108138) (#108143)
Docs: Remove links to external C functions and macros in os.rst (GH-108138)
(cherry picked from commit c31c61c04e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 01:08:14 +02:00
Erlend E. Aasland
0c21298f2b
[3.12] gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084) (#108141)
- 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

(cherry picked from commit fd19509220)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-20 01:07:41 +02:00
Erlend E. Aasland
41634edb2b
[3.12] gh-107801: Improve the accuracy of os.lseek docs (#107935) (#108136)
- name the last parameter *whence*, like it is for seek() methods on
  file objects
- add param docstrings
- structure the valid *whence* params

(cherry picked from commit dd4442c8f5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 01:05:00 +02:00
Miss Islington (bot)
2807430657
[3.12] Docs: format sys.float_info properly (GH-108107) (#108130)
Docs: format sys.float_info properly (GH-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

(cherry picked from commit ca0c6c1f1e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 01:00:31 +02:00
Miss Islington (bot)
71e3581c96
[3.12] gh-101100: Only show GitHub check annotations on changed doc paragraphs (GH-108065) (#108127)
gh-101100: Only show GitHub check annotations on changed doc paragraphs (GH-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

---------

(cherry picked from commit eb953d6e44)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 01:00:09 +02:00
Miss Islington (bot)
a1808b8358
[3.12] gh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897) (#108121)
gh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897)
(cherry picked from commit dc7b630b23)

Co-authored-by: Ned Deily <nad@python.org>
2023-08-20 00:59:32 +02:00
C.A.M. Gerlach
daed54d8de
[3.12] gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460) (#108116)
* gh-101100: Docs: Check Sphinx warnings and fail if improved (#106460)

(cherry picked from commit 806d7c98a5)

* [3.12] gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460).
(cherry picked from commit 806d7c98a5)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

---------

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-18 23:21:16 +02:00
Miss Islington (bot)
359cff5c41
[3.12] gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-108118)
Co-authored-by: Ned Deily <nad@python.org>
2023-08-18 20:30:34 +00:00
Miss Islington (bot)
af6e5fa718
[3.12] Docs: emphasise warning and add accurate markups for sys.unraisablehook (GH-108105) (#108109)
Docs: emphasise warning and add accurate markups for sys.unraisablehook (GH-108105)
(cherry picked from commit cc58ec9724)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-18 14:17:12 +02:00