Commit Graph

109507 Commits

Author SHA1 Message Date
Shantanu d348afa15d
[3.9] gh-91423: Remove bugs.python.org from bugs.rst (GH-91425) (GH-95614)
Co-authored-by: roy reznik <royreznik@gmail.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit df81d2892e)
2022-08-04 18:14:04 +02:00
Miss Islington (bot) 03dc951316
gh-95280: Fix test_get_ciphers on systems without RSA key exchange (GH-95282) (GH-95323)
(cherry picked from commit 565403038b)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-29 17:20:06 +02:00
Dong-hee Na 7b8776511a
[3.9] gh-90359: Update documentation to follow PEP 495. (gh-94800). (gh-94835)
(cherry picked from commit 07374cce52)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-07-28 15:31:17 -04:00
Łukasz Langa 017080f0fa
[3.9] gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347) (GH-95312)
Three test cases were failing on FreeBSD with latest OpenSSL.
(cherry picked from commit 1bc86c2625)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-27 23:43:02 +02:00
Miss Islington (bot) cd0a59f1fa
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 f6b3a07b7d (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
(cherry picked from commit c22f134211)

Co-authored-by: Nir Soffer <nsoffer@redhat.com>
2022-07-26 12:07:41 +02:00
Łukasz Langa eff4aa5409
[3.9] gh-90355: Add isolated flag if currently isolated (GH-92857) (GH-94570)
Co-authored-by: Carter Dodd <carter.dodd@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c8556bcf6c)
2022-07-05 18:06:57 +02:00
Miss Islington (bot) 224cd0c3bf
gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) (GH-94494)
(cherry picked from commit 80aaeabb8b)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-07-01 18:41:54 +02:00
Miss Islington (bot) 66f4593280
gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) (GH-94123)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit d36954b7ea)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2022-06-22 15:58:16 +02:00
Miss Islington (bot) defaa2b19a
gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879) (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 4abab6b603)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-06-22 10:42:02 +02:00
Miss Islington (bot) 893adbf001
gh-91810: Fix regression with writing an XML declaration with encoding='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 d7db9dc3cc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-16 12:16:30 +02:00
Miss Islington (bot) e8f2fe355b
gh-83728: Add hmac.new default parameter deprecation (GH-91939) (GH-93546)
(cherry picked from commit 56b5daf159)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-06-06 19:10:56 +02:00
Miss Islington (bot) 95c9c2b9cb
gh-93065: Fix HAMT to iterate correctly over 7-level deep trees (GH-93066) (#93147)
Also while there, clarify a few things about why we reduce the hash to 32 bits.

Co-authored-by: Eli Libman <eli@hyro.ai>
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>

(cherry picked from commit c1f5c903a7)
2022-05-24 10:52:49 +02:00
Miss Islington (bot) a43f4e7487
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615) (GH-92976)
(cherry picked from commit 2cdd57f119)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Martin Fischer <martin@push-f.com>
2022-05-19 18:03:55 +02:00
Miss Islington (bot) 9f7cdb2cf7
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92967)
(cherry picked from commit fb082c2fc5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-05-19 17:33:09 +02:00
Miss Islington (bot) 3bc3c89612
gh-92417: Update docs and examples of doctest.IGNORE_EXCEPTION_DETAIL for Py>=3 (GH-92502) (GH-92964)
(cherry picked from commit 97b9c1096f)
2022-05-19 17:21:23 +02:00
Łukasz Langa ab003d0ba4
Post 3.9.13 2022-05-17 19:06:39 +02:00
Łukasz Langa 6de2ca5339
Python 3.9.13 2022-05-17 13:12:56 +02:00
Jelle Zijlstra f82b32410b
[3.9] gh-92112: Fix crash triggered by an evil custom `mro()` (GH-92113) (GH-92372)
(cherry picked from commit 85354ed78c)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2022-05-16 18:47:35 +02:00
Marek Suscak 518b238967
[3.9] bpo-34480: fix bug where match variable is used prior to being defined (GH-17643) (GH-32256)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-05-16 18:19:04 +02:00
Miss Islington (bot) 1699a5ee13
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 83c0247d47)

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2022-05-16 17:33:01 +02:00
Miss Islington (bot) 4d05114ae7
gh-80143: Add clarification for escape characters (GH-92292) (GH-92630)
(cherry picked from commit 549567c6e7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-16 17:32:28 +02:00
Miss Islington (bot) 14d05942ea
gh-92530: Fix an issue that occurred after interrupting threading.Condition.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 70af994fee)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-05-16 17:25:31 +02:00
Miss Islington (bot) c4fc53f44e
gh-87670: Add web.archive redirects from effbot (GH-92816)
(cherry picked from commit 3ed1cae9ed)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-05-15 23:32:15 -07:00
Miss Islington (bot) 1aafad1909
gh-92611: Link to PEP 594 sections & add key detail in doc deprecation notices (GH-92612)
(cherry picked from commit 9f68dab3d3)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-05-13 13:13:02 -07:00
Miss Islington (bot) f253cf469d
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 664aa94b57)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-05-13 07:10:10 -07:00
thueringa 256c6d05e2
Fix typo in argparse docs. (GH-92691) (#92731) 2022-05-13 09:01:30 -05:00
Dennis Sweeney 801f77119d
[3.9] gh-92311: Let frame_setlineno jump over listcomps (#92740) 2022-05-12 17:41:34 -04:00
Jelle Zijlstra f6bd1bd19a
[3.9] gh-92436: __future__ docs: add note on expectations for "from __future__ import annotations" (GH-92568). (#92726)
(cherry picked from commit 6582c96454)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-12 14:12:28 -07:00
Miss Islington (bot) 65d2dfd5c2
bpo-42627: Fix incorrect parsing of Windows registry proxy settings (GH-26307)
(cherry picked from commit b69297ea23)

Co-authored-by: 狂男风 <CrazyBoyFeng@Live.com>
2022-05-11 11:42:10 -07:00
Miss Islington (bot) bfc88d3418
[3.9] gh-91810: ElementTree: Use text file's encoding by default in XML 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 707839b0fe)


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

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-11 10:40:05 -07:00
Miss Islington (bot) 3f2113dd08
[3.9] Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631) (GH-92661)
(cherry picked from commit 38486ca212)


Co-authored-by: Mikhail Terekhov <termim@gmail.com>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-11 03:50:00 -07:00
Miss Islington (bot) 7534c50985
[3.9] gh-76773: Update docs mentioning no-longer-supported Windows versions & features (GH-92529) (GH-92610)
(cherry picked from commit f1bbcba74f)


Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-10 02:28:24 -07:00
Miss Islington (bot) 35d589cfb8
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 4bd07d1dbd)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-05-10 00:49:09 -07:00
Miss Islington (bot) b7a87861de
bpo-13553: Document tkinter.Tk args (GH-4786)
(cherry picked from commit c56e2bb994)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-05-09 21:20:37 -07:00
Itai Steinherz 1fb25a96ae
bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858)
* [3.9] bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858).
(cherry picked from commit 39e6b8ae6a)

Co-authored-by: Itai Steinherz <itaisteinherz@gmail.com>
2022-05-09 23:42:59 +01:00
Miss Islington (bot) 249be828e4
Doc: Update py2app link. (GH-91585)
See: https://mail.python.org/archives/list/docs@python.org/thread/KDVFGNGGUGGPVRZT7WZYHHWXCRS2GEN7/
(cherry picked from commit b77a95f44a)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-05-09 14:31:12 -07:00
Miss Islington (bot) ad82e1244e
gh-92417: `asyncio` docs: `asyncio.run()` is available on all supported Python versions (GH-92419)
(cherry picked from commit f4e317b304)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-09 09:49:25 -07:00
Miss Islington (bot) 7ae6f1ae09
CODEOWNERS: Add Erlend Aasland as sqlite3 code owner (GH-92535)
Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 3edda031e4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-05-09 01:32:26 -07:00
Miss Islington (bot) 03aa75221b
bpo-38056: overhaul Error Handlers section in codecs documentation (GH-15732)
* Some handlers were wrongly described as text-encoding only, but actually they can also be used in text-decoding.
* Add more description to each handler.
* Add two REPL examples.
* Add indexes for Error Handler's name.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 5bc2390229)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2022-05-08 20:20:07 -07:00
Miss Islington (bot) bf5fc2adb7
pdb docs: workaround for double semicolon in strings (GH-17011)
see https://github.com/gotcha/ipdb/issues/172

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2888b1107f)

Co-authored-by: Godefroid Chapelle <gotcha@bubblenet.be>
2022-05-08 16:44:33 -07:00
Miss Islington (bot) 0dd32b52c7
gh-77521: Add link to builtin module names in modules tutorial (GH-92438)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 859250cc55)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-08 12:50:28 -07:00
Miss Islington (bot) 8e523c1151
[3.10] gh-90622: Do not spawn ProcessPool workers on demand via fork method. (GH-91598) (GH-92497) (#92499)
Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc3fd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit b795376a62)

Co-authored-by: Gregory P. Smith <greg@krypto.org>

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-05-08 11:22:36 -07:00
Miss Islington (bot) 08907ad687
Fix use of the default role in a news entry. (GH-92500)
(cherry picked from commit 8883172893)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-05-08 10:55:44 -07:00
Miss Islington (bot) 580163d6a9
gh-92417: `logging` docs: Remove warning that only applies to Python <3.2 (GH-92425)
(cherry picked from commit 318c4e91ef)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-08 09:07:49 -07:00
Miss Islington (bot) baed0c31ee
[3.9] gh-92417: `json` docs: `dict` is ordered on all supported Python versions (GH-92422) (GH-92466)
(cherry picked from commit bc098cfdb7)


Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-08 08:30:08 -07:00
Miss Islington (bot) 7fd4e6502e
[3.9] GH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432) (GH-92471)
* Remove redundant footnote ref: the footnote has been removed
* Fix footnote ref to match footnote
* Convert footnotes into reST footnotes: will error if missing
(cherry picked from commit 788ef54bc9)


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

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-08 08:28:37 -07:00
Miss Islington (bot) bab6954482
[3.9] gh-77630: Change Charset to charset (GH-92439) (GH-92477)
(cherry picked from commit 8f29318079)


Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-08 08:28:18 -07:00
Miss Islington (bot) 0cd0d6bf48
[3.9] gh-92417: `stdtypes` docs: delete discussion of Python 2 differences (GH-92423) (GH-92474)
Given that 2.7 has now been end-of-life for two and a half years,
I don't think we need such a detailed explanation here anymore of
the differences between Python 2 and Python 3.
(cherry picked from commit 8efda1e7c6)


Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-08 08:26:50 -07:00
Miss Islington (bot) 731e844b17
gh-92417: `typing` docs: `from __future__ import annotations` can be used in all supported Python versions (GH-92418)
(cherry picked from commit e5b4bd4d60)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-08 08:04:06 -07:00
Dong-hee Na 480234488c
[3.9] gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449). (GH-92458) 2022-05-08 22:21:05 +09:00