summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46756: Fix authorization check in urllib.request (GH-31353)Miss Islington (bot)2022-02-252-8/+25
| | | | | | | | | 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 e2e72567a1c94c548868f6ee5329363e6036057a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)Miss Islington (bot)2022-02-251-89/+25
| | | | | (cherry picked from commit 98c3bea4d1c7335135e60946d0ec8cd5031fb6c0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Miss Islington (bot)2022-02-232-1/+3
| | | | | | | | | (GH-31512) (GH-31514) (cherry picked from commit cff4d5c5d29528299ec1ac5b3b3a6f7735577c01) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)Miss Islington (bot)2022-02-222-1/+21
| | | | | | | | 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 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" ↵Miss Islington (bot)2022-02-221-0/+9
| | | | | | | | | | | (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 090e5c4b946b28f50fce445916c5d3ec45c8f45f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)Miss Islington (bot)2022-02-212-8/+15
| | | | | | | | | | | | | | | | | | | 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 2cae93832f46b245847bdc252456ddf7742ef45e) Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
* bpo-39327: Close file descriptors as soon as possible in shutil.rmtree ↵Miss Islington (bot)2022-02-211-2/+10
| | | | | | | | | | | (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 b77158b4da449ec5b8f682816a79d004fd65ed07) Co-authored-by: Lital Natan <litaln@gmail.com>
* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)Erlend Egeberg Aasland2022-02-211-63/+65
| | | | | | | | | | | * [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642). (cherry picked from commit 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b) 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.
* bpo-46672: fix `NameError` in `asyncio.gather` if type check fails ↵Miss Islington (bot)2022-02-202-1/+16
| | | | | | | | | | (GH-31187) (GH-31440) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 4ab8167b9c60d1a04b2e3116d0c52db254b68cda) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.10] replace `self` param with more appropriate `cls` in classmethods ↵Andrew Svetlov2022-02-201-2/+2
| | | | | | | | | (GH-31402) (GH-31446) (cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) Co-authored-by: Josh Smith <cmyuiosu@gmail.com> Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
* [3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based ↵Andrew Svetlov2022-02-202-10/+20
| | | | | | | methods (GH-31442). (GH-31443) (cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46603: improve coverage of `typing._strip_annotations` (GH-31063)Miss Islington (bot)2022-02-191-0/+9
| | | | | (cherry picked from commit 25c0b9d243b64ccd2eeab483089eaf7e4b4d5834) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Fix mistake in barry_as_FLUFL test (GH-31392)Miss Islington (bot)2022-02-181-1/+1
| | | | | | Use assertEqual(), not assertTrue(lineno, 2) (cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66) Co-authored-by: Patrick Reader <_@pxeger.com>
* [3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)Miss Islington (bot)2022-02-172-2/+15
| | | | | | | | | | | | | | | 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 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a) Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com> Automerge-Triggered-By: GH:JelleZijlstra
* [3.10] bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326) ↵Mark Shannon2022-02-161-2/+2
| | | | (GH-31354)
* bpo-46762: Fix an assert failure in f-strings where > or < is the last ↵Miss Islington (bot)2022-02-161-0/+2
| | | | | | | character if the f-string is missing a trailing right brace. (GH-31365) (cherry picked from commit ffd9f8ff84ed53c956b16d027f7d2926ea631051) Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
* bpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (GH-31327) ↵Miss Islington (bot)2022-02-151-4/+0
| | | | | | | | | | (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 1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-46436: Fix command-line option -d/--directory in module http.server ↵Miss Islington (bot)2022-02-141-13/+14
| | | | | | | | | | | | | (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 2d080347d74078a55c47715d232d1ab8dc8cd603) Co-authored-by: Géry Ogam <gery.ogam@gmail.com> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)Terry Jan Reedy2022-02-139-3/+75
| | | | | | | | | | | 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 50cf4991c49e19f917305dd7b9c71085c11edddb) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-45948: Remove constructor discrepancy in C version of ↵Miss Islington (bot)2022-02-121-0/+9
| | | | | | | | ElementTree.XMLParser (GH-31152) Both implementations accept target=None now. (cherry picked from commit 168fd6453b5de15236116f9261d64601d92571ac) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* bpo-46615: Don't crash when set operations mutate the sets (GH-31120)Miss Islington (bot)2022-02-111-0/+186
| | | | | | 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 4a66615ba736f84eadf9456bfd5d32a94cccf117) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* [3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO ↵Petr Viktorin2022-02-111-0/+16
| | | | | | | (GH-30696) (GH-31262) (cherry picked from commit 0ef08530124c5ca13a9394f4ac18bee8e6c66409)
* bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452)Miss Islington (bot)2022-02-112-0/+7
| | | | | | | | | | Confirmed with @jaraco that this indeed needs a fix. A question that came up while I was digging into the code: I think `SelectableGroups` could similarly use `__slots__ = ()`, since its purpose seems only for convenience around `dict`, not to have attributes of its own. Automerge-Triggered-By: GH:jaraco (cherry picked from commit dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d) Co-authored-by: Arie Bovenberg <a.c.bovenberg@gmail.com>
* [3.10] Allow the parser to avoid nested processing of invalid rules ↵Pablo Galindo Salgado2022-02-101-1/+1
| | | | | | | (GH-31252). (GH-31257) (cherry picked from commit 390459de6db1e68b79c0897cc88c0d562693ec5c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] Fix warning: asyncio.events._event_loop_policy was modified by ↵Andrew Svetlov2022-02-106-4/+28
| | | | | | | test_asyncio (GH-31253) (GH-31255) (cherry picked from commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.10] bpo-46707: Avoid potential exponential backtracking in some syntax ↵Pablo Galindo Salgado2022-02-101-0/+8
| | | | | | | errors (GH-31241). (GH-31242) (cherry picked from commit b71dc71905ab674ccaa4a56230d17a28f61c325c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)Miss Islington (bot)2022-02-092-6/+70
| | | | | | | | | | | | | 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 bf2d44ffb06e8f49aacc6b1c140a6717df5cf897) Co-authored-by: Joshua Root <jmr@macports.org>
* bpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)Miss Islington (bot)2022-02-091-0/+4
| | | | | (cherry picked from commit d2d1d49eaccaa83eb8873ba15f2fc9562143bc56) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-46678: Fix Invalid cross device link in ↵Miss Islington (bot)2022-02-081-1/+2
| | | | | | | | | | Lib/test/support/import_helper.py (GH-31204) (GH-31207) In `Lib/test/support/import_helper.py`, the function `make_legacy_pyc` makes a call to `os.rename` which can fail when the source and target live on different devices. This happens (for example) when `PYTHONPYCACHEPREFIX` is set to a directory anywhere on disk, while a ramdisk is mounted on `/tmp` (the latter of which is the default on various Linux distros). Replacing `os.rename` with `shutil.move` fixes this. Automerge-Triggered-By: GH:brettcannon (cherry picked from commit da576e08296490e94924421af71001bcfbccb317) Co-authored-by: Jason Wilkes <notarealdeveloper@gmail.com>
* [3.10] bpo-46521: Fix codeop to use a new partial-input mode of the parser ↵Pablo Galindo Salgado2022-02-081-43/+11
| | | | | | | (GH-31010). (GH-31213) (cherry picked from commit 69e10976b2e7682c6d57f4272932ebc19f8e8859) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves ↵Gregory Beauregard2022-02-082-0/+18
| | | | | | | (GH-31203) (GH-31210) (cherry picked from commit c8b62bbe46e20d4b6dd556f2fa85960d1269aa45) Co-authored-by: Gregory Beauregard <greg@greg.red>
* [3.10] bpo-46648: Rewrite test_urllib2.test_issue16464() with a local HTTP ↵Miss Islington (bot)2022-02-072-18/+18
| | | | | | | | | | server (GH-31186) (GH-31189) 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 8e98175a03fe03d62822d96007a74e5273013764) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.10] bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156). ↵Gregory Beauregard2022-02-072-1/+6
| | | | | | | (#31175) (cherry picked from commit 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98) Co-authored-by: Gregory Beauregard <greg@greg.red>
* [3.10] bpo-46611: add coverage to instance and class checks in `typing.py` ↵Nikita Sobolev2022-02-072-16/+59
| | | | | | | (GH-31078) (GH-31182) (cherry picked from commit 067c03bf40d13393209f0138fa9c4d5980c4ff8a) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Add more tests for variable substitution in generics (GH-31170)Miss Islington (bot)2022-02-061-0/+27
| | | | | (cherry picked from commit 3da5526136034188185d6a3fdba71e2b56577ee2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46648: Skip test_urllib2.test_issue16464() (GH-31161)Miss Islington (bot)2022-02-061-0/+2
| | | | | | POST requests to http://www.example.com/ fail randomly. (cherry picked from commit 1578de2fcd685c71f9c84e09bac32901dea192c1) Co-authored-by: Victor Stinner <vstinner@python.org>
* Optimize images by IMGbot (GH-21348)Miss Islington (bot)2022-02-0412-0/+0
| | | | Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> (cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88)
* bpo-46588: fix typo in test_calltip.py (GH-31119)Miss Islington (bot)2022-02-041-1/+1
| | | | | (cherry picked from commit 222865daabfa7a8b12ca9a5e9c23b9ce217448f1) Co-authored-by: Caio Agiani <agianicaio@gmail.com>
* bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)Miss Islington (bot)2022-02-032-1/+4
| | | | | | | On Windows, one had to Tab or click on the entry box to get a cursor and be able to enter anything. (cherry picked from commit d1df81a730499cc6286d02afa6028a1e9c22bbbf) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-45975: IDLE - Remove extraneous parens (GH-31107)Miss Islington (bot)2022-02-033-4/+4
| | | | | | | mistakenly included in 3 files in previous PR and backported both to 3.10 and 3.9. (cherry picked from commit 916d0d822c79933f4c420f7a36f16f3eb788646b) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)Miss Islington (bot)2022-02-035-24/+9
| | | | | (cherry picked from commit 51a95be1d035a717ab29e98056b8831a98e61125) Co-authored-by: Nick Drozd <nicholasdrozd@gmail.com>
* bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after ↵Miss Islington (bot)2022-02-021-3/+14
| | | | | | | completion (GH-31086) (cherry picked from commit 89a0a90c2e0e685bc70206fc45e4413c4f4411ed) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 ↵Hugo van Kemenade2022-02-021-4/+4
| | | | | (GH-31084) Cherry-pick of [`b06e9ba`](https://github.com/python/cpython/pull/30952/commits/b06e9ba398fafe39028c3b2dc3943266a16b1416) from https://github.com/python/cpython/pull/30952.
* Fix minor details in the Counter docs (GH-31029) (GH-31072)Miss Islington (bot)2022-02-021-0/+4
|
* bpo-44359: Fix test_ftplib unhandled thread exceptions (GH-31069)Miss Islington (bot)2022-02-021-4/+11
| | | | | | | test_ftplib now silently ignores socket errors to prevent logging unhandled threading exceptions. (cherry picked from commit 0611eafc709cbe8a2a0bdde082d25df0c5034de7) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-46591: Make About IDLE doc link label clickable (GH-30251)Miss Islington (bot)2022-02-023-2/+6
| | | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 53c78080573b3bae4c4e782b9f47dce48aac9688) Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
* bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol ↵Miss Islington (bot)2022-02-012-0/+12
| | | | | | | | transports (GH-30958) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 64568acbd88a88d54ac9b8215447f88280448dd5) Co-authored-by: Emiya <importz750@gmail.com>
* [3.10] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` ↵Miss Islington (bot)2022-02-011-6/+2
| | | | | | | | (GH-31024) (GH-31054) (cherry picked from commit 913e340a323c7e61ae6e4acbb1312b4342657bec) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)Miss Islington (bot)2022-02-011-2/+2
| | | | | (cherry picked from commit 108e66b6d23efd0fc2966163ead9434b328c5f17) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)Miss Islington (bot)2022-02-011-0/+7
| | | | | (cherry picked from commit 4c0612ad00ba45dbea2a86f7db6d21546cf243f8) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>