Commit graph

111133 commits

Author SHA1 Message Date
Miss Islington (bot)
2b7e04d612
bpo-46756: Fix authorization check in urllib.request (GH-31353)
Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which
allowed to bypass authorization. For example, access to URI "example.org/foobar"
was allowed if the user was authorized for URI "example.org/foo".
(cherry picked from commit e2e72567a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-02-25 03:57:30 -08:00
Miss Islington (bot)
632a8121d4
bpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547)
(cherry picked from commit 53ecf9e08d)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-02-25 03:30:31 -08:00
Miss Islington (bot)
c7a0fd2d3f
bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)
(cherry picked from commit 98c3bea4d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-02-25 00:49:55 -08:00
Miss Islington (bot)
b0de6299a8
bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)
Fix PyFrame_GetBack() and PyFrame_GetCode() return type in
the documentation.
(cherry picked from commit 78859e58e4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-02-23 11:12:51 -08:00
Miss Islington (bot)
6717edcf84
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (GH-31512) (GH-31514)
(cherry picked from commit cff4d5c5d2)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-02-23 14:04:49 +02:00
Miss Islington (bot)
28d9353305
Minor fixes to C API docs (GH-31501)
* C API docs: move PyErr_SetImportErrorSubclass docs

It was in the section about warnings, but it makes more sense to
put it with PyErr_SetImportError.

* C API docs: document closeit argument to PyRun_AnyFileExFlags

It was already documented for PyRun_SimpleFileExFlags.

* textual fixes to unicode docs

* Move paragraph about tp_dealloc into tp_dealloc section

* __aiter__ returns an async iterator, not an awaitable
(cherry picked from commit 43cf44ddcc)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-22 20:57:02 -08:00
Miss Islington (bot)
4955a9ed14
bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487)
(cherry picked from commit 1935e1cc28)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-02-22 18:50:38 -08:00
Miss Islington (bot)
d327517b54
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8fb94893e4)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-02-22 13:09:35 -08:00
Miss Islington (bot)
a7af34d407
[3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31506)
(cherry picked from commit bba8008f99)


Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
2022-02-22 10:28:34 -08:00
Miss Islington (bot)
d04fb9213a
[3.10] bpo-36557: Updated wording for using/windows (GH-31457) (GH-31504)
(cherry picked from commit 9a0d941df4)


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

Automerge-Triggered-By: GH:iritkatriel
2022-02-22 09:57:01 -08:00
Miss Islington (bot)
f20ac2ed07
bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" (GH-31479) (GH-31493)
Fix parsing a numeric literal immediately (without spaces) followed by
"not in" keywords, like in "1not in x". Now the parser only emits
a warning, not a syntax error.
(cherry picked from commit 090e5c4b94)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-02-22 12:00:50 +02:00
Miss Islington (bot)
c596ecbf82
[3.10] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31473)
(cherry picked from commit 0a222db2bc)


Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-21 09:18:48 -08:00
Miss Islington (bot)
7da97f6181
bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)
Curly brackets were never allowed in namespace URIs
according to RFC 3986, and so-called namespace-validating
XML parsers have the right to reject them a invalid URIs.

libexpat >=2.4.5 has become strcter in that regard due to
related security issues; with ET.XML instantiating a
namespace-aware parser under the hood, this test has no
future in CPython.

References:
- https://datatracker.ietf.org/doc/html/rfc3968
- https://www.w3.org/TR/xml-names/

Also, test_minidom.py: Support Expat >=2.4.5
(cherry picked from commit 2cae93832f)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2022-02-21 17:16:09 +01:00
Miss Islington (bot)
633d0f90f9
bpo-46232: Fix parsing of certs with bit string in DN (GH-30351)
(cherry picked from commit be095f6c32)

Co-authored-by: Christian Heimes <christian@python.org>
2022-02-21 01:37:26 -08:00
Miss Islington (bot)
95d6271f19
bpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)
It fixes the "Text File Busy" OSError when using 'rmtree' on a
windows-managed filesystem in via the VirtualBox shared folder
(and possible other scenarios like a windows-managed network file
system).
(cherry picked from commit b77158b4da)

Co-authored-by: Lital Natan <litaln@gmail.com>
2022-02-21 00:07:46 -08:00
Miss Islington (bot)
a2e13ec0ce
[docs] Correct typos in SSLContext.sni_callback (GH-30623) (GH-31421)
Co-authored-by: Jörn Heissler <nosuchaddress@joern-heissler.de>
(cherry picked from commit f80a97b492)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
2022-02-20 16:17:56 -08:00
Erlend Egeberg Aasland
ba457fe6f8
[3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)
* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642).
(cherry picked from commit 3eb3b4f270)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

* Fix test_func_return_too_large_int

GH-27613 (bpo 44839) was not backported, so exceptions differ between
main (3.11) and older versions.
2022-02-20 16:13:04 -08:00
Miss Islington (bot)
f1916cde24
bpo-46672: fix NameError in asyncio.gather if type check fails (GH-31187) (GH-31440)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 4ab8167b9c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-20 17:28:42 +02:00
Andrew Svetlov
fa621a7388
[3.10] replace self param with more appropriate cls in classmethods (GH-31402) (GH-31446)
(cherry picked from commit a3fcca4af1)

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
2022-02-20 15:45:13 +02:00
Andrew Svetlov
dde048819f
[3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442). (GH-31443)
(cherry picked from commit 1f9d4c93af)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-02-20 14:45:02 +02:00
Miss Islington (bot)
ea3e0421b0
Improve discussion about how __getattr__ is invoked. (GH-31435) (GH-31437) 2022-02-19 23:25:57 -06:00
Miss Islington (bot)
75c5dbc27e
Counter doc mentions three methods, but lists four (GH-30706)
Was probably caused by the addition of the `total()` method
(cherry picked from commit 99331fcf17)

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>
2022-02-18 18:45:56 -08:00
Miss Islington (bot)
103f3ca806
bpo-46603: improve coverage of typing._strip_annotations (GH-31063)
(cherry picked from commit 25c0b9d243)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-18 18:15:56 -08:00
Gregory P. Smith
e05e3d20d3
[3.10] bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) (GH-31420)
The libexpat 2.4.1 upgrade from  introduced the following new exported symbols:

* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`

We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)

(The newer libexpat upgrade  has no new symbols).

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 6312c1052c)

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
2022-02-18 16:53:49 -08:00
Miss Islington (bot)
6eb34772fd
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388)
(cherry picked from commit 2923d87ca2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-02-18 01:30:36 -08:00
Miss Islington (bot)
feb4455088
docs: Link match statement in tutorial (GH-31396)
Add a link to the `match` statement from its section in the tutorial.

Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 35f55cc5c6)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2022-02-17 23:15:00 -05:00
Miss Islington (bot)
095ffe715e
Fix mistake in barry_as_FLUFL test (GH-31392)
Use assertEqual(), not assertTrue(lineno, 2)
(cherry picked from commit 5f1c205dce)

Co-authored-by: Patrick Reader <_@pxeger.com>
2022-02-17 18:11:34 -08:00
Dong-hee Na
cb7551d566
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296)
Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
2022-02-18 06:58:02 +09:00
Miss Islington (bot)
68e80c4e74
[3.10] Update html.parser.rst (GH-30678) (GH-31385)
This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will

- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
(cherry picked from commit 2945f5a7c5)


Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Automerge-Triggered-By: GH:merwok
2022-02-17 04:41:07 -08:00
Miss Islington (bot)
a481be0c5f
[3.10] Become a CODEOWNER for typing (GH-31374) (GH-31382)
(cherry picked from commit 6f1efd19a7)


Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Automerge-Triggered-By: GH:JelleZijlstra
2022-02-16 20:09:06 -08:00
Miss Islington (bot)
a17d59a6df
[3.10] bpo-46333: Honor module parameter in ForwardRef (GH-30536) (GH-31379)
The `module` parameter carries semantic information about the forward ref.
Forward refs are different if they refer to different module even if they
have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods.

Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 6e7b813195)


Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com>

Automerge-Triggered-By: GH:JelleZijlstra
2022-02-16 19:53:03 -08:00
Mark Shannon
d4e4ef107a
[3.10] bpo-46724: Use JUMP_ABSOLUTE for all backward jumps. (GH-31326) (GH-31354) 2022-02-16 11:26:02 +00:00
Miss Islington (bot)
3d407b9311
bpo-46762: Fix an assert failure in f-strings where > or < is the last character if the f-string is missing a trailing right brace. (GH-31365)
(cherry picked from commit ffd9f8ff84)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2022-02-16 03:16:05 -08:00
Miss Islington (bot)
5b63ba3ff5
Update the OMG link (GH-30383)
(cherry picked from commit 04215a4272)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-02-15 09:17:00 -08:00
Miss Islington (bot)
72c46462aa
bpo-46741: Update asyncio.protocols.BufferedProtocol docstring (GH-31327) (GH-31362)
The docstring for `BufferedProtocol` states that the class is still an "experimental API", but it has been considered stable since 3.8.
(cherry picked from commit 1d81fdc4c0)

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

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-15 19:14:09 +02:00
DongGeon Lee
ac55cea3cb
[3.10] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293) (GH-31350) 2022-02-15 19:24:04 +09:00
Miss Islington (bot)
b27195332e
bpo-46436: Fix command-line option -d/--directory in module http.server (GH-30701)
Fix command-line option -d/--directory in http.server main
function that was ignored when combined with --cgi.

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 2d080347d7)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-02-14 12:12:30 -08:00
Miss Islington (bot)
543242ad8c
Fix the signature of multiprocessing.set_executable (GH-31276)
Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4f9386661d)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-02-14 12:11:02 -08:00
Miss Islington (bot)
a414cb35c2
Update __main__.rst (GH-30896)
The reference to `venv` appears in the paragraph below, instead of above.
Fixed the documentation.
(cherry picked from commit 4e4e7c2684)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-02-14 12:10:34 -08:00
Miss Islington (bot)
c5a987bf4d
doc: use colon for all color's rangs (GH-28998) (#31336)
(cherry picked from commit 6b9f27dd0b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2022-02-14 12:10:05 -08:00
Miss Islington (bot)
828253227e
bpo-38619: Update the documentation for UUID.hex (GH-29830)
Explicitly state that it is lowercase.

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 5d53cf30f9)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-02-14 11:20:48 -08:00
Miss Islington (bot)
5574cacf57
Fix minor grammar error (GH-31325)
"an" followed by consonant should be "a"
(cherry picked from commit 0d29e7a06f)

Co-authored-by: Scott Noyes <snoyes@gmail.com>
2022-02-14 11:09:57 -08:00
Miss Islington (bot)
a606c6a350
Fix a typo in Doc/faq/programming.rst (GH-31243)
is not longer used -> is no longer used
(cherry picked from commit ff5a167597)

Co-authored-by: Cooper Lees <me@cooperlees.com>
2022-02-14 11:08:39 -08:00
Dennis Sweeney
841c77d802
[3.10] bpo-46747: Add missing key parameters in the bisect docs (GH-31323) (GH-31329)
Added *key* parameter to `bisect.bisect()` and `bisect.insort()` in bisect module docs.
(cherry picked from commit 96084f4256)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-02-14 11:51:16 -05:00
Miss Islington (bot)
6a7dd3f9e9
Corrections to format precision description. (GH-31291)
* `precision` field is a decimal integer
  * clarify that stated limitations are on presentation type
    rather than input value type.  Especially misleading is
    "precision is not allowed for integer values", since integer
    value input to a format like `.1f` is fine.
  * regarding max field size, replace "non-number" with "string",
    which is the only non-numeric presentation type

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 1d6ce67c29)

Co-authored-by: John Belmonte <john@neggie.net>
2022-02-13 16:21:32 -08:00
Miss Islington (bot)
44666c3285
bpo-45447: Add entry to What's new 3.10 (GH-31304)
(cherry picked from commit 2d98433549)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-12 22:31:03 -08:00
Miss Islington (bot)
5698e0be8e
bpo-45447: Add entry to What's new 3.9 (GH-31305)
(cherry picked from commit cef91ca80c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-12 22:30:25 -08:00
Terry Jan Reedy
9fabcfbe68
bpo-45447: Add syntax highlighting for .pyi files in IDLE (GH-28950)
Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-12 19:52:37 -05:00
Miss Islington (bot)
b7a65c939c
bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152)
Both implementations accept target=None now.
(cherry picked from commit 168fd6453b)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2022-02-12 00:50:11 -08:00
Miss Islington (bot)
f2fbfbe0ec
bpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)
Remove pathlib classes from the list in stdtypes.rst of classes
that can be parameterized at runtime.
(cherry picked from commit e0bc8ee945)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-11 13:04:01 -08:00