Commit graph

111146 commits

Author SHA1 Message Date
Miss Islington (bot)
bdce188036
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
(cherry picked from commit cedd2473a9)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-04 10:33:57 -08:00
Victor Stinner
7b5b429ada
[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675)
* bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662)

Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d677a1)

* bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672)

Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92ccdec)

* bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673)

If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2b8c)

* bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674)

If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b04451d)
2022-03-04 01:12:06 +01:00
Miss Islington (bot)
9d9dc59d07
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter (GH-31639)
(cherry picked from commit 10117f1d8c)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
2022-03-03 06:49:22 -08:00
Miss Islington (bot)
fa8c5ed9c8
bpo-46831: Update __build_class__ comment (GH-31522)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 81d968b7c3)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-03-02 22:02:59 -08:00
Miss Islington (bot)
257f5be7f7
bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)
(cherry picked from commit 75d2d945b4)

Co-authored-by: Gregory Beauregard <greg@greg.red>
2022-03-02 18:26:50 -08:00
Miss Islington (bot)
60b561c246
bpo-21910: Clarify docs for codecs writelines method (GH-31245)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a8c87a239e)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-02 17:43:00 -08:00
Irit Katriel
eb65e46b9b
[3.10] bpo-45492: Corrected documentation for co_names in inspect library doc (GH-31456). (GH-31645)
(cherry picked from commit 3257d49d23)

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

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-02 19:37:17 +00:00
Victor Stinner
93264452d9
[3.10] bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632) (GH-31634)
* Refactor sanitiser skip tests into test.support (GH-30889)

* Refactor sanitizer skip tests into test.support

(cherry picked from commit b1cb843050)

* Add skips to crashing tests under sanitizers instead of manually skipping them (GH-30897)

(cherry picked from commit a27505345e)

* bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632)

Skip tests on ASAN and/or MSAN builds:

* multiprocessing tests
* test___all__
* test_concurrent_futures
* test_decimal
* test_peg_generator
* test_tools

(cherry picked from commit 9204bb72a2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-03-02 17:05:14 +01:00
Miss Islington (bot)
7dbb2f8eaf
bpo-42982: update pbkdf2 example & add another link (GH-30966) (#30968)
Automerge-Triggered-By: GH:gpshead
(cherry picked from commit ace0aa2a27)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-03-01 15:56:25 -05:00
Miss Islington (bot)
98e2ee60bd
Add missing "to" to two tp_flags notes (GH-31624)
(cherry picked from commit 422fdb3717)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-02-28 17:45:26 -08:00
Miss Islington (bot)
1f956d11db
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:03:37 -08:00
Miss Islington (bot)
8b37a0c522
Update dict/OrderedDict differences with code equivalents. (GH-31563)
(cherry picked from commit 26aba295a9)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-02-25 07:15:58 -08:00
Victor Stinner
0848da19ce
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) (GH-31578)
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 15:47:07 +01:00
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