3.9
Commits on Aug 4, 2022
Commits on Jul 29, 2022
Commits on Jul 27, 2022
Commits on Jul 26, 2022
-
gh-94821: Fix autobind of empty unix domain address (GH-94826) (GH-94875
) When binding a unix socket to an empty address on Linux, the socket is automatically bound to an available address in the abstract namespace. >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.bind("") >>> s.getsockname() b'\x0075499' Since python 3.9, the socket is bound to the one address: >>> s.getsockname() b'\x00' And trying to bind multiple sockets will fail with: Traceback (most recent call last): File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind s2.bind("") OSError: [Errno 98] Address already in use Added 2 tests: - Auto binding empty address on Linux - Failing to bind an empty address on other platforms Fixes f6b3a07 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (cherry picked from commit c22f134) Co-authored-by: Nir Soffer <nsoffer@redhat.com>
Commits on Jul 5, 2022
Commits on Jul 1, 2022
Commits on Jun 22, 2022
-
gh-91172: Create a workflow for verifying bundled pip and setuptools (G…
-
gh-87389: Fix an open redirection vulnerability in http.server. (GH-9…
…3879) (GH-94093) Fix an open redirection vulnerability in the `http.server` module when an URI path starts with `//` that could produce a 301 Location header with a misleading target. Vulnerability discovered, and logic fix proposed, by Hamza Avvan (@hamzaavvan). Test and comments authored by Gregory P. Smith [Google]. (cherry picked from commit 4abab6b) Co-authored-by: Gregory P. Smith <greg@krypto.org>
Commits on Jun 16, 2022
-
gh-91810: Fix regression with writing an XML declaration with encodin…
…g='unicode' (GH-93426) (GH-93791) 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. (cherry picked from commit d7db9dc) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Commits on Jun 6, 2022
Commits on May 24, 2022
Commits on May 19, 2022
Commits on May 17, 2022
Commits on May 16, 2022
-
[3.9] bpo-34480: fix bug where match variable is used prior to being …
-
Check result of utc_to_seconds and skip fold probe in pure Python (GH…
…-91582) (GH-92748) The `utc_to_seconds` call can fail, here's a minimal reproducer on Linux: TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)" The old behavior still raised an error in a similar way, but only because subsequent calculations happened to fail as well. Better to fail fast. This also refactors the tests to split out the `fromtimestamp` and `utcfromtimestamp` tests, and to get us closer to the actual desired limits of the functions. As part of this, we also changed the way we detect platforms where the same limits don't necessarily apply (e.g. Windows). As part of refactoring the tests to hit this condition explicitly (even though the user-facing behvior doesn't change in any way we plan to guarantee), I noticed that there was a difference in the places that `datetime.utcfromtimestamp` fails in the C and pure Python versions, which was fixed by skipping the "probe for fold" logic for UTC specifically — since UTC doesn't have any folds or gaps, we were never going to find a fold value anyway. This should prevent some failures in the pure python `utcfromtimestamp` method on timestamps close to 0001-01-01. There are two separate news entries for this because one is a potentially user-facing change, the other is an internal code correctness change that, if anything, changes some error messages. The two happen to be coupled because of the test refactoring, but they are probably best thought of as independent changes. Fixes GH-91581 (cherry picked from commit 83c0247) Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
-
gh-92530: Fix an issue that occurred after interrupting threading.Con…
…dition.notify (GH-92534) (GH-92831) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-
gh-87670: Add web.archive redirects from effbot (GH-92816)
(cherry picked from commit 3ed1cae) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Commits on May 13, 2022
-
gh-92611: Link to PEP 594 sections & add key detail in doc deprecatio…
-
Document Py_ssize_t. (GH-92512)
It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But there's 8182 errors left. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit 664aa94) Co-authored-by: Julien Palard <julien@palard.fr>
Commits on May 12, 2022
Commits on May 11, 2022
-
[3.9] gh-91810: ElementTree: Use text file's encoding by default in X…
…ML declaration (GH-91903) (GH-92665) ElementTree method write() and function tostring() now use the text file's encoding ("UTF-8" if not available) instead of locale encoding in XML declaration when encoding="unicode" is specified. (cherry picked from commit 707839b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Automerge-Triggered-By: GH:serhiy-storchaka
-
[3.9] Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (G…
Commits on May 10, 2022
-
gh-92256: Improve Argument Clinic parser error messages (GH-92268)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit 4bd07d1) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
-
bpo-13553: Document tkinter.Tk args (GH-4786)
(cherry picked from commit c56e2bb) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>