summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.11.5v3.11.5Pablo Galindo2023-08-2489-207/+909
|
* [3.11] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) ↵Miss Islington (bot)2023-08-241-121/+94
| | | | | | | | | | | (#108410) https://docs.python.org/3/howto/pyporting.html was written for another time. In this patch: - material that frames Python 3 as "new" is removed - descriptions and directions have been trimmed (cherry picked from commit 809ea7c4b6c2b818ae510f1f58e82b6b05ed4ef9) Co-authored-by: Daniele Procida <daniele@vurt.org>
* [3.11] Revert "gh-46376: Return existing pointer when possible in ctypes ↵Łukasz Langa2023-08-243-57/+0
| | | | | | | (GH-107131) (GH-107488)" (#108412) This reverts commit 57f27e444175a8a5ffcd86971e06de61c1c38628. The fix caused gh-107940. Until we have a bulletproof fix for that, the 3.11 backport needs to be reverted to make way for 3.11.5.
* [3.11] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) ↵Łukasz Langa2023-08-241-31/+71
| | | | | | | | | | | | | | | | | | | | | | (#108405) * In preauth tests of test_ssl, explicitly break reference cycles invoving SingleConnectionTestServerThread to make sure that the thread is deleted. Otherwise, the test marks the environment as altered because the threading module sees a "dangling thread" (SingleConnectionTestServerThread). This test leak was introduced by the test added for the fix of issue gh-108310. * Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds timeout. * SingleConnectionTestServerThread.run() catchs TimeoutError * Fix a race condition (missing synchronization) in test_preauth_data_to_tls_client(): the server now waits until the client connect() completed in call_after_accept(). * test_https_client_non_tls_response_ignored() calls server.join() explicitly. * Replace "localhost" with server.listener.getsockname()[0]. (cherry picked from commit 592bacb6fc0833336c0453e818e9b95016e9fd47) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-70766: Mention the object getstate caveat in 3.11 What's new. ↵Miss Islington (bot)2023-08-231-0/+4
| | | | | | | | (GH-108379) (#108385) gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379) (cherry picked from commit b6be18812c68fce5ab56c266dc5fc5a3cceb09c0) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.11] gh-77377: Ensure multiprocessing SemLock is valid for spawn-based ↵Miss Islington (bot)2023-08-233-2/+30
| | | | | | | | | | | | | | | | | Process before serializing it (GH-107275) (#108378) gh-77377: Ensure multiprocessing SemLock is valid for spawn-based Process before serializing it (GH-107275) Ensure multiprocessing SemLock is valid for spawn Process before serializing it. Creating a multiprocessing SemLock with a fork context, and then trying to pass it to a spawn-created Process, would segfault if not detected early. --------- (cherry picked from commit 1700d34d314f5304a7a75363bda295a8c15c371f) Co-authored-by: albanD <desmaison.alban@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* [3.11] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) ↵Miss Islington (bot)2023-08-231-1/+5
| | | | | | | | | | | | | (#108349) 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 GH-108310. (cherry picked from commit 64f99350351bc46e016b2286f36ba7cd669b79e3) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107136: Remove Plausible for docs metrics (GH-107856) (#108335)Miss Islington (bot)2023-08-231-3/+0
| | | | | (cherry picked from commit fc23f34cc9701949e6832eb32f26ea89f6622b82) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) ↵Miss Islington (bot)2023-08-231-1/+1
| | | | | | | | | | | | (#108357) gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-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. (cherry picked from commit 79fdacc0059a3959074d2d9d054653eae1dcfe06) Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
* [3.11] gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343) ↵Victor Stinner2023-08-232-0/+15
| | | | | | | | | | (#108347) 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. (cherry picked from commit 9173b2bbe13aeccc075b571da05c653a2a91de1b)
* [3.11] gh-108303: Add Lib/test/test_cppext/ sub-directory (#108325) (#108336)Victor Stinner2023-08-234-7/+8
| | | | | | | | | | 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. (cherry picked from commit 21dda09600848ac280481f7c64f8d9516dc69bb2)
* [3.11] Docs: Add link to skip to datetime's format codes (GH-108027) (#108330)Miss Islington (bot)2023-08-221-0/+6
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.11] Clarify how topics.py gets created. (GH-106121) (GH-106580)Miss Islington (bot)2023-08-221-0/+1
| | | | | | | | | | | | When changing docs, it was easy to find text in topics.py, and I wondered whether I was supposed to edit it. Thankfully, the top of the file says it's auto-generated, so I knew I didn't have to edit it. But I didn't know what started the auto-generation process. It's part of the release process, so I'll leave a note here for future editors. (cherry picked from commit dac1e364901d3668742e6eecc2ce63586330c11f) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.11] gh-107700: [Enum] Document that `EnumType` was added in 3.11 ↵Miss Islington (bot)2023-08-221-0/+4
| | | | | | | (GH-108260) (#108300) (cherry picked from commit e8ef0bdd8c613a722bf7965bf1da912882141a52) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-107298: Fix numerous ref errors and typos in the C API docs ↵Serhiy Storchaka2023-08-2227-92/+101
| | | | | (GH-108258) (#108290) (cherry picked from commit d7202e4879bf4e7e00a69500ddcb3143864139b4)
* [3.11] gh-107298: Fix C API datetime documentation (GH-108034) (#108233)Miss Islington (bot)2023-08-222-15/+57
| | | | | (cherry picked from commit d63972e289e05b0d82e59f32f107312a8b3de7b5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] Resolve reference warnings in faq/gui.rst (GH-108147) (#108194)Miss Islington (bot)2023-08-222-5/+5
| | | | | | (cherry picked from commit 8f3d09bf5d16b508fece5420a22abe6f0c1f00b7) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.11] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close ↵Łukasz Langa2023-08-223-1/+248
| | | | | | | | | | | | | | | | | | flaw (#108317) gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw 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>
* [3.11] gh-106016: Add Lib/test/test_module/ directory (GH-108293) (#108304)Miss Islington (bot)2023-08-226-18/+19
| | | | | | | | | | gh-106016: Add Lib/test/test_module/ directory (GH-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 adfc118fdab66882599e01a84c22bd897055f3f1) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-106242: Make ntpath.realpath errors consistent with abspath when ↵Miss Islington (bot)2023-08-223-0/+22
| | | | | | | | | | | | there are embedded nulls (GH-108248) gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (GH-108248) --------- (cherry picked from commit de33b5c662ea8d35d81ed857c6a39e34ab94c510) Co-authored-by: Steve Dower <steve.dower@python.org> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.11] Docs: align the param spec of sqlite3.Connection methods with the ↵Miss Islington (bot)2023-08-221-2/+2
| | | | | | | | | implementation (GH-108285) (#108288) - no parameters of create_aggregate() are positional-only - all parameters of create_collation() are positional-only (cherry picked from commit 893215a4e7f59eabb8ccdf188c4b9b1de5bd8966) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.11] Docs: move sphinx-lint to pre-commit (GH-105750) (#108276)Hugo van Kemenade2023-08-225-14/+11
|
* [3.11] Trim trailing whitespace and test on CI (GH-104275) (#108215)Hugo van Kemenade2023-08-2224-120/+150
|
* [3.11] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) ↵Miss Islington (bot)2023-08-224-9/+156
| | | | | | | | | | | (GH-108209) gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (cherry picked from commit acbd3f9c5c5f23e95267714e41236140d84fe962) 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>
* [3.11] gh-102507 Remove invisible pagebreak characters (GH-102531) (#108266)Miss Islington (bot)2023-08-2216-45/+6
| | | | | | | gh-102507 Remove invisible pagebreak characters (GH-102531) (cherry picked from commit b097925858c6975c73e989226cf278cc382c0416) Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
* [3.11] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs ↵Erlend E. Aasland2023-08-223-5/+55
| | | | | | | | | | | (#107933) (#108264) (cherry picked from commit 7f87ebbc3f52680c939791f397b9a478edf0c8d4) 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
* [3.11] gh-108224: Fix asyncio doc inconsistency (GH-108230) (#108232)Miss Islington (bot)2023-08-211-1/+1
| | | | | | | (Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.) (cherry picked from commit 1cc391d9e2ea24ca750005335507b52933fc0b52) Co-authored-by: temach <tematibr@gmail.com>
* [3.11] gh-107298: Fix references to deprecated and removed PyUnicode C API ↵Miss Islington (bot)2023-08-215-54/+54
| | | | | | | (GH-108077) (GH-108226) (cherry picked from commit db55383829ccd5ce80c551d60f26851346741fdf) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107396: tarfiles: set self.exception before _init_read_gz() ↵Miss Islington (bot)2023-08-213-1/+19
| | | | | | | | | | | | | | | | | (GH-107485) (GH-108208) 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 37135d25e269ede92bc7da363bebfa574782e59a) Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
* [3.11] gh-107916: Save the error code before decoding the filename in ↵Miss Islington (bot)2023-08-212-0/+12
| | | | | | | PyErr_SetFromErrnoWithFilename() etc (GH-107929) (GH-108206) (cherry picked from commit 80bdebdd8593f007a2232ec04a7729bba6ebf12c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] Improve references in the tutorial (GH-108069) (GH-108204)Serhiy Storchaka2023-08-216-49/+48
| | | | | | * 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 622ddc41674c2566062af82f7b079aa01d2aae8c)
* [3.11] Docs: document 'manager' and '_log' attrs of logging.Logging ↵Miss Islington (bot)2023-08-211-0/+8
| | | | | | | (GH-108145) (GH-108189) (cherry picked from commit f904aa4e1f6943e5bd9a8a73cf762f063e6fa247) Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.11] gh-105736: Sync pure python version of OrderedDict with the C version ↵Miss Islington (bot)2023-08-213-7/+23
| | | | | | | (GH-108098) (GH-108201) (cherry picked from commit 20cc90c0df3e368fe7cb63d958f0b17a78fa9d0a) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.11] gh-107895: Fix test_asyncio.test_runners when run it in CPython's ↵Miss Islington (bot)2023-08-211-1/+4
| | | | | | | "development mode" (GH-108168) (GH-108197) (cherry picked from commit 014a5b71e7538926ae1c03c8c5ea13c96e741be3) Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
* [3.11] Resolve reference warnings in faq/library.rst (GH-108149) (#108183)Miss Islington (bot)2023-08-202-6/+8
| | | | | | 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>
* [3.11] Resolve reference warnings in faq/design.rst (GH-108148) (#108181)Adam Turner2023-08-202-3/+2
|
* [3.11] Docs: Fix Sphinx warnings in logging.rst (GH-108139) (#108175)Erlend E. Aasland2023-08-202-19/+20
| | | | | (cherry picked from commit c735e79afb62324624864e1943f84825249f58ed) Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* [3.11] Docs: Fix Sphinx warnings in license.rst (#108142) (#108176)Erlend E. Aasland2023-08-202-5/+4
| | | | | | (cherry picked by commit 4d4393139fae39db26dead33529b6ae0bafbfc58) - Fix links to stdlib modules - Silence links to external functions
* [3.11] Resolve reference warnings in faq/programming.rst (GH-108150) (#108171)Miss Islington (bot)2023-08-202-4/+3
| | | | | | Resolve reference warnings in faq/programming.rst (GH-108150) (cherry picked from commit a390ec20f5a85b9c16e8708f117667783d08863c) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] Docs: Fix Sphinx warnings in sys.rst (GH-108106) (#108166)Miss Islington (bot)2023-08-203-115/+153
| | | | | | | | | | | | | | | | | | | | | Docs: Fix Sphinx warnings in sys.rst (GH-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. (cherry picked from commit 29fa7afef94d74e18d97485c085d1ccf80c16ca3) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-107659: Improve wording of the description of `ctypes.pointer` and ↵Miss Islington (bot)2023-08-201-7/+7
| | | | | | | | | | `ctypes.POINTER` (GH-107769) (#108164) gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769) (cherry picked from commit beffb30dc7a07044f4198245d049ddda1f4b24db) 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>
* [3.11] gh-107619: Extend functools LRU cache docs with generators and async ↵Miss Islington (bot)2023-08-201-2/+3
| | | | | | | | | | functions (GH-107934) (#108162) gh-107619: Extend functools LRU cache docs with generators and async functions (GH-107934) (cherry picked from commit 1a713eac47b26899044752f02cbfcb4d628dda2a) 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>
* [3.11] gh-107980: fix doc role for asyncio.timeouts (GH-108126) (#108153)Miss Islington (bot)2023-08-201-3/+3
| | | | | | gh-107980: fix doc role for asyncio.timeouts (GH-108126) (cherry picked from commit a47c13cae5b32e6f3d7532cc6dbb4e1ac31219de) Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
* [3.11] Fix misspellings in sysconfig docs (GH-108156) (#108158)Miss Islington (bot)2023-08-201-5/+5
| | | | | | Fix misspellings in sysconfig docs (GH-108156) (cherry picked from commit 1dc0c58d2b17819720d184ec0287a8a9b1dc347e) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.11] gh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897) ↵Miss Islington (bot)2023-08-192-3/+4
| | | | (#108122)
* [3.11] Docs: Remove links to external C functions and macros in os.rst ↵Miss Islington (bot)2023-08-191-25/+27
| | | | | | | | (GH-108138) (#108144) (cherry picked from commit c31c61c04e55ef431615ffec959d84ac73a3db81) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-107801: Improve the accuracy of os.lseek docs (#107935) (#108137)Erlend E. Aasland2023-08-193-14/+33
| | | | | | | | | | - 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 dd4442c8f597af1ec3eaf20f7ad89c4ac7e2dbc9) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-107915: Handle errors in C API functions PyErr_Set*() and ↵Serhiy Storchaka2023-08-192-8/+33
| | | | | | | | | PyErr_Format() (GH-107918) (GH-108135) 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 633ea217a85f6b6ba5bdbc73094254d5811b3485)
* [3.11] Docs: format sys.float_info properly (GH-108107) (#108131)Miss Islington (bot)2023-08-191-52/+73
| | | | | | | | | | | | | | | 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 ca0c6c1f1ef79d10bc49b61d638d87cde265aa94) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-107565: Update multissltests and GitHub CI workflows to use ↵Ned Deily2023-08-183-6/+8
| | | | OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-108119)