Commit graph

109253 commits

Author SHA1 Message Date
Erlend Egeberg Aasland
3ea2a8f425
[3.9] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030) (GH-31586)
(cherry picked from commit 3eb3b4f270)
2022-03-01 20:46:16 -08:00
Jelle Zijlstra
7190617b56
[3.9] Minor fixes to C API docs (GH-31501) (GH-31526)
* 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)
2022-03-01 20:45:54 -08:00
Miss Islington (bot)
de2c91a89a
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)
(cherry picked from commit dd69f73421)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-02-25 09:07:05 -08:00
Victor Stinner
a549cd1fc5
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) (GH-31581)
Rename the private undocumented float.__set_format__() method to
float.__setformat__() to fix a typo introduced in Python 3.7. The
method is only used by test_float.

The change enables again test_float tests on the float format which
were previously skipped because of the typo.

The typo was introduced in Python 3.7 by bpo-20185
in commit b5c51d3dd9.

(cherry picked from commit 7d03c8be5a)
2022-02-25 16:13:34 +01:00
Miss Islington (bot)
4560c7e605
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:56:16 -08:00
Miss Islington (bot)
b7f6e8e135
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:34:15 -08:00
Miss Islington (bot)
763e23e11e
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:15:57 -08:00
Miss Islington (bot)
87cebb1e69
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:57 -08:00
Miss Islington (bot)
f3bb8fe4e8
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (GH-31512)
(cherry picked from commit cff4d5c5d2)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-02-22 16:08:43 -08:00
Miss Islington (bot)
29e8c43b32
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:10:04 -08:00
Miss Islington (bot)
2387aeacc7
[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE (GH-31413) (GH-31507)
(cherry picked from commit bba8008f99)


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

Automerge-Triggered-By: GH:iritkatriel
2022-02-22 10:43:55 -08:00
Miss Islington (bot)
aa9a5c4d72
bpo-36557: Updated wording for using/windows (GH-31457)
(cherry picked from commit 9a0d941df4)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-02-22 10:03:30 -08:00
Miss Islington (bot)
8eb18d842c
[3.9] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31474)
(cherry picked from commit 0a222db2bc)


Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-21 09:18:55 -08:00
Miss Islington (bot)
336a916f75
bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31469)
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>

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2022-02-21 17:16:23 +01:00
Miss Islington (bot)
959846be52
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:54 -08:00
Miss Islington (bot)
e7115d5363
replace self param with more appropriate cls in classmethods (GH-31402) (#31445)
(cherry picked from commit a3fcca4af1)

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

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
2022-02-21 02:10:35 +02:00
Miss Islington (bot)
83eabc6c8f
Improve discussion about how __getattr__ is invoked. (GH-31435) (GH-31438) 2022-02-20 07:37:00 -06:00
Andrew Svetlov
64705e6a94
[3.9] Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442) (GH-31444)
(cherry picked from commit 1f9d4c93af)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-02-20 14:49:27 +02:00
Andrew Svetlov
a6116a980c
[3.9] bpo-46672: fix NameError in asyncio.gather if type check fails (GH-31187) (GH-31441)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-20 14:39:21 +02:00
Miss Islington (bot)
cf1993210f
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:49:48 -08:00
Miss Islington (bot)
9399dc45cb
[docs] Correct typos in SSLContext.sni_callback (GH-30623)
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-18 18:13:33 -08:00
Miss Islington (bot)
9aca412db8
bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397)
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>
2022-02-18 15:13:16 -08:00
Miss Islington (bot)
c11f41b2c9
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:08:28 -08:00
Miss Islington (bot)
e7828904f3
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31295) 2022-02-18 06:58:26 +09:00
Miss Islington (bot)
0da140da71
Update html.parser.rst (GH-30678)
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>
2022-02-17 04:46:25 -08:00
Miss Islington (bot)
d975a40e33
[3.9] Become a CODEOWNER for typing (GH-31374) (GH-31381)
(cherry picked from commit 6f1efd19a7)


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

Automerge-Triggered-By: GH:JelleZijlstra
2022-02-16 20:06:25 -08:00
Miss Islington (bot)
29ae7d3996
bpo-46333: Honor module parameter in ForwardRef (GH-30536)
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>
2022-02-16 19:53:31 -08:00
Miss Islington (bot)
a657bff349
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:18:16 -08:00
Miss Islington (bot)
c292118ef3
bpo-46741: Update asyncio.protocols.BufferedProtocol docstring (31327)
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>
2022-02-15 09:08:24 -08:00
DongGeon Lee
ad47db34be
[3.9] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293). (GH-31356) 2022-02-15 21:22:01 +09:00
Miss Islington (bot)
1933238983
Update the OMG link (GH-30383)
(cherry picked from commit 04215a4272)

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

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2022-02-14 12:13:33 -08:00
Miss Islington (bot)
502ad3930e
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:15 -08:00
Miss Islington (bot)
1953f03174
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:25:15 -08:00
Miss Islington (bot)
0bd2d58f36
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:10:38 -08:00
John Belmonte
0b1417d597
[3.9] Corrections to format precision description. (GH-31291) (GH-31321)
* `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 22:05:11 -05:00
Dennis Sweeney
c31b8a97a8
bpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)
Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.

(cherry picked from commit 4a66615ba7)
2022-02-13 12:29:42 +02:00
Miss Islington (bot)
ebe73e6095
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:36 -08:00
Miss Islington (bot)
1d4d44c385
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>
(cherry picked from commit 9fabcfbe68)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-12 17:19:25 -08:00
Jacob Walls
cc6d8f8828
[3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) (GH-31299)
Both implementations accept target=None now.

(cherry picked from commit 168fd6453b)
2022-02-13 02:16:31 +02:00
Miss Islington (bot)
a7c1cc4169
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:03:45 -08:00
Miss Islington (bot)
c23f4ab3f5
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>
2022-02-11 07:08:44 -08:00
Andrew Svetlov
a65be6e077
[3.9] Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio (GH-31253). (GH-31256)
(cherry picked from commit 012e77eb5c)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-02-10 15:32:05 +02:00
Miss Islington (bot)
b0517a1217
bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)
Numeric fields of type float, notably mtime, can't be represented
exactly in the ustar header, so the pax header is used. But it is
helpful to set them to the nearest int (i.e. second rather than
nanosecond precision mtimes) in the ustar header as well, for the
benefit of unarchivers that don't understand the pax header.

Add test for tarfile.TarInfo.create_pax_header to confirm correct
behaviour.
(cherry picked from commit bf2d44ffb0)

Co-authored-by: Joshua Root <jmr@macports.org>
2022-02-09 09:35:56 -08:00
Miss Islington (bot)
bde3765a3f
bpo-46685: cover TypeError of ForwardRef(1) in test_typing (GH-31223)
(cherry picked from commit d2d1d49eac)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-09 07:12:32 -08:00
Miss Islington (bot)
76b072717a
bpo-46638: Makes registry virtualisation setting stable when building MSIX packages (GH-31130)
(cherry picked from commit 3a5afc14e1)
2022-02-07 17:37:01 +00:00
Miss Islington (bot)
0d74efc54f
bpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP server (GH-31186)
Re-enable test_issue16464() of test_urllib2, move it to urllib2_localnet
and use the local HTTP server rather than an external HTTP server.
(cherry picked from commit 8e98175a03)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-02-07 05:14:06 -08:00
Miss Islington (bot)
0892a0e3ec
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
va_end() must be called before returning.
(cherry picked from commit 59e004af63)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-02-07 00:08:10 -08:00
Miss Islington (bot)
1b8a34ae65
bpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)
POST requests to http://www.example.com/ fail randomly.
(cherry picked from commit 1578de2fcd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-02-06 06:30:18 -08:00
Miss Islington (bot)
459e26f098
[3.9] bpo-46609: Update asyncio-task coroutine doc (GH-31132)
@coroutine in removed in 3.11, not 3.10.
(cherry picked from commit 5603db43ba)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-04 15:46:09 -05:00