Commit graph

111169 commits

Author SHA1 Message Date
Jelle Zijlstra
4199b7ffbb
[3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31796)
(cherry picked from commit 6c83c8e6b5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-03-10 13:53:50 -08:00
Miss Islington (bot)
3386f87dcb
Remove print race from task_done example. (GH-31795)
(cherry picked from commit a0eb69c1a2)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-03-10 09:22:46 -08:00
Jelle Zijlstra
5dfe981791
[3.10] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31777)
Replace two instances of "pysqlite" with "sqlite3" in sqlite3
docstrings. Also reword "is a no-op" to "does nothing" for clarity..
(cherry picked from commit b33a1ae703)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-09 10:19:27 -08:00
Miss Islington (bot)
26fa25a9a7
bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped from chained exceptions (GH-23688)
(cherry picked from commit 88b7d86a73)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-03-08 14:09:28 -08:00
Miss Islington (bot)
8de434b332
bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)
This change aligns the documentation at https://docs.python.org/3/library/asyncio-eventloop.htmlGH-asyncio.Server
with the actual implementation

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit da80d6b2f3)

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2022-03-08 13:36:35 -08:00
Miss Islington (bot)
95b001fe67
bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)
(cherry picked from commit c8a47e76a3)

Co-authored-by: Christian Heimes <christian@python.org>
2022-03-08 10:53:24 -08:00
Miss Islington (bot)
ef54c4df82
Removed confusing reference to sys (GH-31638)
(cherry picked from commit 28f84c72b6)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-03-08 08:04:56 -08:00
Jelle Zijlstra
5d2b9c9fe4
[3.10] docs: Don't use code formatting for emphasis (GH-30519) (GH-31764)
(cherry picked from commit badb637c8c)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2022-03-08 07:42:54 -08:00
Erlend Egeberg Aasland
f3d3b2d5c5
[3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) (GH-31753)
(cherry picked from commit 4d95fa1ac5)
2022-03-08 07:30:14 -08:00
Miss Islington (bot)
21c5b3f73f
bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)
Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
(cherry picked from commit 36dd7396fc)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2022-03-08 02:03:12 -08:00
Miss Islington (bot)
b099363fa7
Removed ambiguity in __init_subclass__ docs (GH-31540)
(cherry picked from commit ab014978ae)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-03-07 20:33:19 -08:00
Miss Islington (bot)
e053f0e9f4
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
(cherry picked from commit 8debeed307)

Co-authored-by: Meer Suri <46469858+meersuri@users.noreply.github.com>
2022-03-07 20:25:30 -08:00
Miss Islington (bot)
f6cdf5bdcc
importlib.metadata: Remove empty footnote section (GH-30451)
(cherry picked from commit 13331a12c3)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-03-07 20:21:32 -08:00
Miss Islington (bot)
06108c08dd
bpo-45680: Improve docs on subscriptions w.r.t. GenericAlias objects (GH-29479)
(cherry picked from commit 50731297a9)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-03-07 20:12:59 -08:00
Miss Islington (bot)
1e52e782f9
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
(cherry picked from commit 176835c3d5)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-03-07 14:17:29 -08:00
Steve Dower
58d576a43c
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 and CVE-2019-12900 (GH-31732) 2022-03-07 19:15:04 +00:00
Steve Dower
136842c91b
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31727) 2022-03-07 17:23:20 +00:00
Luca Chiodini
0ff033b859
[3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719)
(cherry picked from commit 7f07b5ee9c)

Co-authored-by: Luca Chiodini <luca@chiodini.org>
2022-03-07 14:54:08 +00:00
Pablo Galindo Salgado
3594ebca2c
[3.10] bpo-46940: Don't override existing AttributeError suggestion information (GH-31710) (GH-31724)
When an exception is created in a nested call to PyObject_GetAttr, any
external calls will override the context information of the
AttributeError that we have already placed in the most internal call.
This will cause the suggestions we create to nor work properly as the
attribute name and object that we will be using are the incorrect ones.

To avoid this, we need to check first if these attributes are already
set and bail out if that's the case..
(cherry picked from commit 3b3be05a16)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-03-07 13:18:36 +00:00
Miss Islington (bot)
8acbb93c07
bpo-43292: Fix file leak in ET.iterparse() when not exhausted (GH-31696)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 496c428de3)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2022-03-07 02:31:52 -08:00
Miss Islington (bot)
ee18df4252
bpo-14156: Make argparse.FileType work correctly for binary file modes when argument is '-' (GH-13165)
Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb').
(cherry picked from commit eafec26ae5)

Co-authored-by: MojoVampire <shadowranger+github@gmail.com>
2022-03-06 04:12:06 -08:00
Miss Islington (bot)
4716f70c85
Lib/typing.py copy edits originating from GH-31061 (GH-31684)
(cherry picked from commit 2031149b9a)

Co-authored-by: Matt Bogosian <eb3f73+github+com@yaymail.com>
2022-03-04 19:17:32 -08:00
Miss Islington (bot)
fa69ec8939
bpo-38738: Fix formatting of True and False in the threading documentation (GH-31678)
* Fix formatting of True and False in the threading documentation
* Update threading.rst
(cherry picked from commit 46a116c1c9)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-03-04 12:37:56 -08:00
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