Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v3.11.5 #152

Closed
wants to merge 5,412 commits into from
Closed

Update to v3.11.5 #152

wants to merge 5,412 commits into from

Conversation

lazka
Copy link
Member

@lazka lazka commented Aug 25, 2023

No description provided.

miss-islington and others added 30 commits June 27, 2023 17:37
…) (python#106153)

IDLE: Condense run.main threading.Thread start. (pythonGH-106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit eaa1eae)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
python#106169) (python#106175)

pythongh-101634: regrtest reports decoding error as failed test (python#106169)

When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.

(cherry picked from commit 2ac3eec)
…ython#106177)

Fix c-analyzer for GCC: ignore LANG env var (pythonGH-106173)

The c-analyzer doesn't support GCC localized messages, so just unset
the LANG environment variable.
(cherry picked from commit 1f74b9e)

Co-authored-by: Victor Stinner <vstinner@python.org>
…asyncio-task.rst` (pythonGH-106136) (python#106180)

Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
…-100341) (python#106066)

(cherry picked from commit 75c8133)

Co-authored-by: Kushal Das <mail@kushaldas.in>
…GH-106172) (python#106192)

pythongh-101100: Fix reference to asynchronous methods (pythonGH-106172)
(cherry picked from commit bbf722d)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
…ventLoop.start_tls` docs (pythonGH-105995) (python#106189)

pythongh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (pythonGH-105995)
(cherry picked from commit 6b52a58)

Co-authored-by: Sam Bull <git@sambull.org>
…t` (pythonGH-105265) (python#106205)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
…pythonGH-101007) (pythonGH-106227)

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ythonGH-100409) (pythonGH-106231)

(cherry picked from commit a28d4ed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…ythonGH-106245)

Fix possible refleak in CodeType.replace() (pythonGH-106243)

A reference to c_code was leaked if PySys_Audit() failed.
(cherry picked from commit 3c70d46)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…rs (pythonGH-106278) (python#106282)

pythongh-101100: Docs: Fix references to several numeric dunders (pythonGH-106278)
(cherry picked from commit a8ae739)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…ythonGH-105934) (python#106323)

pythongh-102541: Fix Helper.help("mod") for non-existent mod (pythonGH-105934)

If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None.
---------

(cherry picked from commit 0530f4f)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…ensions (pythonGH-106119) (python#106349)

Replace the esoteric term 'datum' when describing dict comprehensions (pythonGH-106119)
(cherry picked from commit 987b712)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
…n#106369) (python#106374)

Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c812)
…-106384) (python#106388)

(cherry picked from commit 648688c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
…nGH-106389) (python#106391)

Add:

- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
(cherry picked from commit 3406f8c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
… Clinic (pythonGH-106407) (python#106410)

Added new test class PermutationTests()
(cherry picked from commit 8f6df5e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
…c.test.c (pythonGH-106443) (python#106445)

pythongh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (pythonGH-106443)
(cherry picked from commit a941bd6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
…ininstall (pythonGH-104693) (python#105429)

This ensures that `commoninstall` is completed before `bininstall` is
started when parallel builds are used (`make -j install`), and so the
`python3` symlink is only installed after all standard library modules
are installed.

.
(cherry picked from commit 990cb36)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
… (python#106229)

(cherry picked from commit 0e24499)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…nGH-104605) (python#105760)

RTSPS is the permanent scheme defined in
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
alongside RTSP and RTSPU schemes.

---------

(cherry picked from commit f3266c0)

Co-authored-by: zentarim <33746047+zentarim@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
…n#106353)

(cherry picked from commit 0355625)

Co-authored-by: Jeremy Paige <ucodery@gmail.com>
…bers exist. (pythonGH-105542) (python#105571)

When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
(cherry picked from commit 59f009e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
…on#106456)

Clarify state of CancelledError in doc (pythonGH-106453)

This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
(cherry picked from commit 12a9813)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
…when `sys.executable` is `None` (pythonGH-106464) (python#106495)

pythongh-90876: Restore the ability to import multiprocessing when `sys.executable` is `None` (pythonGH-106464)

Prevent `multiprocessing.spawn` from failing to *import* in environments
where `sys.executable` is `None`.  This regressed in 3.11 with the addition
of support for path-like objects in multiprocessing.

Adds a test decorator to have tests only run when part of test_multiprocessing_spawn to `_test_multiprocessing.py` so we can start to avoid re-running the same not-global-state specific test in all 3 modes when there is no need.
(cherry picked from commit c60df36)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
…ests (pythonGH-106302). (pythonGH-106545)

(cherry picked from commit 6e6a4cd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…in documentation (pythonGH-101883) (python#106547)

pythongh-101880: add link to object.__hash__() in hash() builtin documentation (pythonGH-101883)
(cherry picked from commit ec7180b)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
miss-islington and others added 28 commits August 21, 2023 20:35
…icode C API (pythonGH-108077) (pythonGH-108226)

(cherry picked from commit db55383)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… (python#108232)

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

(cherry picked from commit 1cc391d)

Co-authored-by: temach <tematibr@gmail.com>
… docs (python#107933) (python#108264)

(cherry picked from commit 7f87ebb)

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
…H-102531) (python#108266)

pythongh-102507 Remove invisible pagebreak characters (pythonGH-102531)
(cherry picked from commit b097925)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
…ythonGH-107846) (pythonGH-108209)

pythongh-107845: Fix symlink handling for tarfile.data_filter (pythonGH-107846)

(cherry picked from commit acbd3f9)

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>
…the implementation (pythonGH-108285) (python#108288)

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

Co-authored-by: Erlend E. Aasland <erlend@python.org>
…bspath when there are embedded nulls (pythonGH-108248)

pythongh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (pythonGH-108248)

---------

(cherry picked from commit de33b5c)

Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
…-108293) (python#108304)

pythongh-106016: Add Lib/test/test_module/ directory (pythonGH-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 adfc118)

Co-authored-by: Victor Stinner <vstinner@python.org>
… pre-close flaw (python#108317)

pythongh-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>
…ython#108194)

(cherry picked from commit 8f3d09b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
…8034) (python#108233)

(cherry picked from commit d63972e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…3.11 (pythonGH-108260) (python#108300)

(cherry picked from commit e8ef0bd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…H-106580)

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 dac1e36)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
…8027) (python#108330)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
…on#108325) (python#108336)

pythongh-108303: Add Lib/test/test_cppext/ sub-directory (python#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 21dda09)
…ion (python#108343) (python#108347)

pythongh-105776: Fix test_cppext when CC contains -std=c11 option (python#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 9173b2b)
…pythonGH-108355) (python#108357)

pythongh-108267: Dataclasses docs: Fix object.__setattr__ typo (pythonGH-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 79fdacc)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
…07856) (python#108335)

(cherry picked from commit fc23f34)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
…ythonGH-108344) (python#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 pythonGH-108310.
(cherry picked from commit 64f9935)

Co-authored-by: Victor Stinner <vstinner@python.org>
…awn-based Process before serializing it (pythonGH-107275) (python#108378)

pythongh-77377: Ensure multiprocessing SemLock is valid for spawn-based Process before serializing it (pythonGH-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 1700d34)

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>
…t's new. (pythonGH-108379) (python#108385)

pythongh-70766: Mention the object getstate caveat in 3.11 What's new. (pythonGH-108379)
(cherry picked from commit b6be188)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
…ythonGH-108370) (python#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 pythongh-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 592bacb)

Co-authored-by: Victor Stinner <vstinner@python.org>
…in ctypes (pythonGH-107131) (pythonGH-107488)" (python#108412)

This reverts commit 57f27e4.

The fix caused pythongh-107940. Until we have a bulletproof fix for that, the 3.11 backport needs to be reverted to make way for 3.11.5.
pythonGH-107434) (python#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 809ea7c)

Co-authored-by: Daniele Procida <daniele@vurt.org>
@lazka lazka closed this Aug 25, 2023
@lazka
Copy link
Member Author

lazka commented Aug 25, 2023

wrong branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.