summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43253: Don't call shutdown() for invalid socket handles (GH-31892)Miss Islington (bot)2022-03-151-0/+1
| | | | | (cherry picked from commit 70155412f1543f100d4aa309b8691cbcabd3e0e1) Co-authored-by: Maximilian Hils <git@maximilianhils.com>
* bpo-20392: Fix inconsistency with uppercase file extensions in ↵Miss Islington (bot)2022-03-151-0/+1
| | | | | | | mimetypes.guess_type (GH-30229) (cherry picked from commit 5dd7ec52b83e7f239774cf7478106fcc7b0a36f3) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* But Add missing newline to NEWS entry (GH-31893)Miss Islington (bot)2022-03-151-1/+1
| | | | | (cherry picked from commit 16995ed0f2b697ca1ff966741288e787e1701ca9) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)Miss Islington (bot)2022-03-141-0/+1
| | | | | (cherry picked from commit e3d348a5252549708fd19338b675a2c23b60d677) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31880)Ned Deily2022-03-141-1/+0
| | | | This reverts commit 25962e4e60235645f945d23281431b30b3c3d573 as it breaks test_bdb and test_distutils with installed Pythons.
* [3.10] bpo-47004: Sync with importlib_metadata 4.11.3. (GH-31854). (GH-31857)Jason R. Coombs2022-03-131-0/+3
| | | | | (cherry picked from commit b1e286860742e7ba6fadc75e3ddb6c2899a56919) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)Miss Islington (bot)2022-03-131-0/+1
| | | | | (cherry picked from commit c99ac3c364ee21be72263791b71ee8b55f64de08) Co-authored-by: Pradyun Gedam <pgedam@bloomberg.net>
* [3.10] bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31849)Miss Islington (bot)2022-03-131-0/+1
| | | | | | | | (cherry picked from commit d87f1b787ed38dfd307d82452f2efe9dc5b93942) Co-authored-by: Pradyun Gedam <pgedam@bloomberg.net> Automerge-Triggered-By: GH:ned-deily
* bpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789) (GH-31830)Victor Stinner2022-03-111-0/+5
| | | | | | | | | | | | | | | In Linux kernel 5.14 one can dynamically request size of altstacksize based on hardware capabilities with getauxval(AT_MINSIGSTKSZ). This changes allows for Python extension's request to Linux kernel to use AMX_TILE instruction set on Sapphire Rapids Xeon processor to succeed, unblocking use of the ISA in frameworks. Introduced HAVE_LINUX_AUXVEC_H in configure.ac and pyconfig.h.in Used cpython_autoconf:269 docker container to generate configure. (cherry picked from commit 3b128c054885fe881c3b57a5978de3ea89c81a9c) Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
* [3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with ↵Matt Bogosian2022-03-112-0/+3
| | | | | | | | | | | | | | | | | (GH-31061) (GH-31821) (Cherry-picked from 32bf3597922ac3f613989582afa2bff43bea8a2f.) GH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others. Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped ↵Miss Islington (bot)2022-03-081-0/+1
| | | | | | | from chained exceptions (GH-23688) (cherry picked from commit 88b7d86a73da9388aa65c96401c2984c8c16f8db) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)Miss Islington (bot)2022-03-081-0/+2
| | | | | | | | | 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 da80d6b2f3beff519cb1457d5e055168c89f7224) Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)Miss Islington (bot)2022-03-081-0/+2
| | | | | (cherry picked from commit c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)Miss Islington (bot)2022-03-081-0/+2
| | | | | | Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com> (cherry picked from commit 36dd7396fcd26d8bf9919d536d05d7000becbe5b) Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
* bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)Miss Islington (bot)2022-03-071-0/+1
| | | | | (cherry picked from commit 176835c3d5c70f4c1b152cc2062b549144e37094) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 ↵Steve Dower2022-03-071-0/+2
| | | | and CVE-2019-12900 (GH-31732)
* bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly ↵Steve Dower2022-03-071-0/+2
| | | | uses the install path during repair (GH-31727)
* [3.10] bpo-46940: Don't override existing AttributeError suggestion ↵Pablo Galindo Salgado2022-03-071-0/+2
| | | | | | | | | | | | | | | 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 3b3be05a164da43f201e35b6dafbc840993a4d18) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)Miss Islington (bot)2022-03-072-0/+3
| | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 496c428de3318c9c5770937491b71dc3d3f18a6a) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* bpo-14156: Make argparse.FileType work correctly for binary file modes when ↵Miss Islington (bot)2022-03-061-0/+4
| | | | | | | | | 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 eafec26ae5327bb23b6dace2650b074c3327dfa0) Co-authored-by: MojoVampire <shadowranger+github@gmail.com>
* [3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan ↵Victor Stinner2022-03-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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 4173d677a1d7c72bb32d292fbff1b4cf073d615c) * bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672) Disable undefined behavior sanitizer (UBSan) on faulthandler._read_null(). (cherry picked from commit 65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549) * 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 6d0d7d2b8c1e04fd51c6cb29cc09a41b60b97b7b) * 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 ad1b04451d3aca2c6fa6dbe2891676a4e0baac49)
* bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)Miss Islington (bot)2022-03-031-0/+1
| | | | | (cherry picked from commit 75d2d945b4e28ca34506b2d4902367b61a8dff82) Co-authored-by: Gregory Beauregard <greg@greg.red>
* bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) ↵Victor Stinner2022-02-251-0/+3
| | | | | | | | | | | | | | | (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 b5c51d3dd95bbfde533655fb86ac0f96f771ba7b. (cherry picked from commit 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6)
* bpo-46756: Fix authorization check in urllib.request (GH-31353)Miss Islington (bot)2022-02-251-0/+5
| | | | | | | | | 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>
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Miss Islington (bot)2022-02-231-0/+2
| | | | | | | | | (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-46794: Bump up the libexpat version into 2.4.6 (GH-31487)Miss Islington (bot)2022-02-231-0/+1
| | | | | (cherry picked from commit 1935e1cc284942bec8006287c939e295e1a7bf13) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)Miss Islington (bot)2022-02-221-0/+1
| | | | | | | | 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/+3
| | | | | | | | | | | (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>
* [3.10] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31473)Miss Islington (bot)2022-02-211-0/+2
| | | | | | (cherry picked from commit 0a222db2bca63070f429c0e613707da1bdfaf0e0) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)Miss Islington (bot)2022-02-211-0/+1
| | | | | | | | | | | | | | | | | | | 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-46232: Fix parsing of certs with bit string in DN (GH-30351)Miss Islington (bot)2022-02-211-0/+2
| | | | | (cherry picked from commit be095f6c32188bba02079d086ac8639ea37cec3c) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-39327: Close file descriptors as soon as possible in shutil.rmtree ↵Miss Islington (bot)2022-02-212-0/+3
| | | | | | | | | | | (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>
* bpo-46672: fix `NameError` in `asyncio.gather` if type check fails ↵Miss Islington (bot)2022-02-201-0/+1
| | | | | | | | | | (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] Raise TypeError if SSLSocket is passed to asyncio transport-based ↵Andrew Svetlov2022-02-201-0/+2
| | | | | | | methods (GH-31442). (GH-31443) (cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.10] bpo-46784: Add newly exported expat symbols to the namespace. ↵Gregory P. Smith2022-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | (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 6312c1052c0186b4596fc45c42fd3ade9f8f5911) Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com> Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
* bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296)Dong-hee Na2022-02-171-0/+1
| | | Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
* [3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)Miss Islington (bot)2022-02-172-0/+5
| | | | | | | | | | | | | | | 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-0/+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-46436: Fix command-line option -d/--directory in module http.server ↵Miss Islington (bot)2022-02-141-0/+3
| | | | | | | | | | | | | (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-131-0/+2
| | | | | | | | | | | 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/+5
| | | | | | | | 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/+1
| | | | | | 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/+2
| | | | | | | (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-111-0/+2
| | | | | | | | | | 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] Fix warning: asyncio.events._event_loop_policy was modified by ↵Andrew Svetlov2022-02-101-0/+2
| | | | | | | 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/+2
| | | | | | | 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-091-0/+1
| | | | | | | | | | | | | 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-46678: Fix Invalid cross device link in ↵Miss Islington (bot)2022-02-081-0/+3
| | | | | | | | | | 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-0/+2
| | | | | | | (GH-31010). (GH-31213) (cherry picked from commit 69e10976b2e7682c6d57f4272932ebc19f8e8859) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>