summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40447: accept all path-like objects in compileall.compile_file (GH-19883)Miss Islington (bot)2022-12-231-0/+2
| | | | | | | | | (cherry picked from commit 1ecfd1ebf1f53ef6ac82085b25ed09952b470d4e) Co-authored-by: Filipe Laíns <lains@riseup.net> Signed-off-by: Filipe Laíns <lains@archlinux.org> Signed-off-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.10] gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 ↵Miss Islington (bot)2022-12-231-0/+3
| | | | | | | | | | (GH-5576) (#100451) gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero. (cherry picked from commit 84bc6a4f25fcf467813ee12b74118f7b1b54e285) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* gh-100374: Fixed a bug in socket.getfqdn() (gh-100375)Miss Islington (bot)2022-12-211-0/+1
| | | | | (cherry picked from commit 12be23cf3c1301be2c6b8fd4cb2cd35a567d2ea2) Co-authored-by: Dominic Socular <BBH@awsl.rip>
* [3.10] gh-99240: Reset pointer to NULL when the pointed memory is freed in ↵colorfulappl2022-12-211-0/+2
| | | | | | | | argument parsing (GH-99890) (#100386) (cherry picked from commit efbb1eb9f54cad4f7bf5df03eed3a6aba02d99f4) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.10] gh-85267: Improvements to inspect.signature __text_signature__ ↵Shantanu2022-12-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling (GH-98796) (#100393) This makes a couple related changes to inspect.signature's behaviour when parsing a signature from `__text_signature__`. First, `inspect.signature` is documented as only raising ValueError or TypeError. However, in some cases, we could raise RuntimeError. This PR changes that, thereby fixing GH-83685. (Note that the new ValueErrors in RewriteSymbolics are caught and then reraised with a message) Second, `inspect.signature` could randomly drop parameters that it didn't understand (corresponding to `return None` in the `p` function). This is the core issue in GH-85267. I think this is very surprising behaviour and it seems better to fail outright. Third, adding this new failure broke a couple tests. To fix them (and to e.g. allow `inspect.signature(select.epoll.register)` as in GH-85267), I add constant folding of a couple binary operations to RewriteSymbolics. (There's some discussion of making signature expression evaluation arbitrary powerful in GH-68155. I think that's out of scope. The additional constant folding here is pretty straightforward, useful, and not much of a slippery slope) Fourth, while GH-85267 is incorrect about the cause of the issue, it turns out if you had consecutive newlines in __text_signature__, you'd get `tokenize.TokenError`. Finally, the `if name is invalid:` code path was dead, since `parse_name` never returned `invalid`.. (cherry picked from commit 79311cbfe718f17c89bab67d7f89da3931bfa2ac) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.10] gh-99240: Fix double-free bug in Argument Clinic str_converter ↵colorfulappl2022-12-201-0/+2
| | | | | | | generated code (GH-99241) (#100353) (cherry picked from commit 8dbe08eb7c807f484fe9870f5b7f5ae2881fd966) Fix double-free bug mentioned at GH-99240, by moving memory clean up out of "exit" label.
* [3.10] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100232)colorfulappl2022-12-171-0/+1
| | | | | | (cherry picked from commit c450c8c9ed6e420025f39d0e4850a79f8160cdcd) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* bpo-43984: Allow winreg.SetValueEx to set -1 without treating it as an error ↵Miss Islington (bot)2022-12-091-0/+3
| | | | | | | (GH-25775) (cherry picked from commit a29a7b9b786d6b928c4bb4e6e683a3788e3ab1c1) Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
* [3.10] bpo-44817: Ignore additional errors in ntpath.realpath (GH-27574) ↵Miss Islington (bot)2022-12-081-0/+2
| | | | | | | (GH-100023) (cherry picked from commit 124ecd657646f808d1d3282c37ee19aae6bcb47f) Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>
* gh-98778: Update HTTPError to initialize properly even if fp is None (gh-99966)Miss Islington (bot)2022-12-081-0/+2
| | | | | (cherry picked from commit dc8a86893df37e137cfe992e95e7d66cd68e9eaf) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* gh-83035: handle decorator with nested parens in inspect.getsource (GH-99654)Miss Islington (bot)2022-12-071-0/+1
| | | | | (cherry picked from commit 68e41295b8611a990de68f15c89f1eb3dea51867) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.10] gh-100050: Fix an assertion error when raising unclosed parenthesis ↵Pablo Galindo Salgado2022-12-071-0/+2
| | | | | | | | errors in the tokenizer (GH-100065) (#100073) Automerge-Triggered-By: GH:pablogsal. (cherry picked from commit 97e7004cfe48305bcd642c653b406dc7470e196d) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Python 3.10.9v3.10.9Pablo Galindo2022-12-0664-139/+656
|
* [3.10] gh-93453: Only emit deprecation warning in asyncio.get_event_loop ↵Łukasz Langa2022-12-061-0/+3
| | | | | | | | | | | when a new event loop is created (#100059) It no longer emits a deprecation warning if the current event loop was set. (cherry picked from commit 3fae04b10e2655a20a3aadb5e0d63e87206d0c67) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-100001: Also escape \s in http.server log messages. (GH-100038)Miss Islington (bot)2022-12-051-0/+5
| | | | | | | | | | Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so that it is technically possible to parse the line and reconstruct what the original data was. Without this a \xHH is ambiguious as to if it is a hex replacement we put in or the characters r"\x" came through in the original request line. (cherry picked from commit 7e29398407dbd53b714702abb89aa2fd7baca48a) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-100001: Omit control characters in http.server stderr logs. (GH-100002)Miss Islington (bot)2022-12-051-0/+6
| | | | | | Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to. (cherry picked from commit d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-99892: test_unicodedata: skip test on download failure (GH-100011)Miss Islington (bot)2022-12-051-0/+2
| | | | | | | Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net. (cherry picked from commit 2488c1e1b66366a3a933ff248eff080fabd2351c) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-98458: unittest: bugfix for infinite loop while handling chained ↵Miss Islington (bot)2022-12-041-0/+1
| | | | | | | | | | exceptions that contain cycles (GH-98459) * Bugfix addressing infinite loop while handling self-referencing chained exception in TestResult._clean_tracebacks() * Bugfix extended to properly handle exception cycles in _clean_tracebacks. The "seen" set follows the approach used in the TracebackException class (thank you @iritkatriel for pointing it out) * adds a test for a single chained exception that holds a self-loop in its __cause__ and __context__ attributes (cherry picked from commit 72ec518203c3f3577a5e888b12f10bb49060e6c2) Co-authored-by: AlexTate <0xalextate@gmail.com>
* bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)Luke Garland2022-12-021-0/+2
| | | | | | | | In multiprocessing.shared_memory.SharedMemory(), the temporary view returned by MapViewOfFile() should be unmapped when it is no longer needed. (cherry picked from commit 85c128e34daec7625b74746e127afa25888ccde1) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.10] GH-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declara… ↵Sam James2022-12-011-0/+1
| | | | | | | | | | (#99920) [3.10] gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (GH-99406) Follow up to 12078e78f6e4a21f344e4eaff529e1ff3b97734f. (cherry picked from commit e35ca417fe81a64985c2b29e863ce418ae75b96e) Co-authored-by: Sam James <sam@gentoo.org>
* [3.10] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and s… ↵Kumar Aditya2022-11-281-0/+3
| | | | | | | | | | | | (#99842) [3.10] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and segfaults (GH-18640) Co-authored-by: Oren Milman <orenmn@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>. (cherry picked from commit 53eef27133c1da395b3b4d7ce0ab1d5b743ffb41) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* gh-51524: Fix bug when calling trace.CoverageResults with valid infile ↵Miss Islington (bot)2022-11-281-0/+1
| | | | | | | | (GH-99629) (cherry picked from commit 594de165bf2f21d6b28eb17003ea78fc20c0ffed) Co-authored-by: Furkan Onder <furkanonder@protonmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-97966: Restore prior expectation that uname_result._fields and ._asdict ↵Miss Islington (bot)2022-11-261-0/+2
| | | | | | | would include the processor. (gh-98343) (cherry picked from commit dc063a25d29840d863b15c86fdab15b4a1894c73) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-38031: Fix a possible assertion failure in _io.FileIO() (GH-GH-5688)Miss Islington (bot)2022-11-251-0/+2
| | | | | (cherry picked from commit d386115039e75c332c8471c239cf7dc5dee791a7) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* Use faster APIs to calculate paths at startup for Store packaged Python on ↵Miss Islington (bot)2022-11-231-0/+2
| | | | | | | Windows (GH-99345) (cherry picked from commit 71a4a2da983a651bfcbc1be59c6e27508cdd05c6) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] gh-88863: Clear ref cycles to resolve leak when ↵Dong Uk, Kang2022-11-231-0/+3
| | | | | | | | | asyncio.open_connection raises (GH-95739) (#99722) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame. (cherry picked from commit 995f6170c78570eca818f7e7dbd8a7661c171a81) Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
* GH-92892: Add section about variadic functions to ctypes documentation ↵Miss Islington (bot)2022-11-221-0/+1
| | | | | | | | | | | (GH-99529) On some platforms, and in particular macOS/arm64, the calling convention for variadic arguments is different from the regular calling convention. Add a section to the documentation to document this. (cherry picked from commit bc3a11d21ddef28047b18c0f6a5068fa9fb16da2) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.10] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase ↵Serhiy Storchaka2022-11-221-0/+3
| | | | | | | | | (GH-99646) (GH-99699) Now addClassCleanup() uses separate lists for different TestCase subclasses, and doClassCleanups() only cleans up the particular class. (cherry picked from commit c2102136be569e6fc8ed90181f229b46d07142f8)
* [3.10] GH-97001: Release GIL in termios extension (GH-99503) (#99680)Ronald Oussoren2022-11-221-0/+1
| | | | | | Without releasing the GIL calls to termios APIs might block the entire interpreter.. (cherry picked from commit 959ba45d75953caa911e16b4c2a277978fc4b9b0) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* gh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)Miss Islington (bot)2022-11-221-0/+2
| | | | | (cherry picked from commit 1acdfec359fdf3db936168480be0f4157273c200) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* gh-99578: Fix refleak in _imp.create_builtin() (GH-99642)Miss Islington (bot)2022-11-211-0/+3
| | | | | | | Fix a reference bug in _imp.create_builtin() after the creation of the first sub-interpreter for modules "builtins" and "sys". (cherry picked from commit cb2ef8b2acbb231c207207d3375b2f8b0077a6ee) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] gh-99581: Fix a buffer overflow in the tokenizer when copying lines ↵Pablo Galindo Salgado2022-11-201-0/+3
| | | | that fill the available buffer (GH-99605). (#99630)
* [3.10] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) ↵Miss Islington (bot)2022-11-201-0/+1
| | | | | | | | | (GH-99366) gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (cherry picked from commit 67b4d2772c5124b908f8ed9b13166a79bbeb88d2) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Chris Withers <chris@withers.org>
* [3.10] Remove trailing space to fix azure failures (#99611)Stanley2022-11-201-2/+2
|
* gh-87604: Avoid publishing list of active per-interpreter audit hooks via ↵Miss Islington (bot)2022-11-151-0/+2
| | | | | | | the gc module (GH-99373) (cherry picked from commit 4e4b13e8f6211abbc0d53056da11357756daa314) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.10] gh-92119: ctypes: Print exception class name instead of its ↵Kamil Turek2022-11-131-0/+2
| | | | | | | representation (GH-98302) (#99452) gh-92119: ctypes: Print exception class name instead of its representation (#98302) (cherry picked from commit b9dedfe61dce2997e3e6be318d8c50b0c19c9394)
* gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)Miss Islington (bot)2022-11-131-0/+2
| | | | | (cherry picked from commit 343eb0f94b26f2a4c1c15505d417e8157ec19660) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-34272: Reorganize C API tests. (GH-8551)Miss Islington (bot)2022-11-121-0/+1
| | | | | | Move some C API tests into Lib/test/test_capi/. (cherry picked from commit f883b7f8ee3209b52863fc662343c8cd81abdc59) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-80448: argparse: Fix IndexError on store_true action (GH-15656)Miss Islington (bot)2022-11-121-0/+1
| | | | | | | | (cherry picked from commit e02cc6d42aee1f0a9ee629f76576eee478224d9d) Co-authored-by: Hai Shi <shihai1992@gmail.com> Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.10] gh-99130: Apply bugfixes from importlib_metadata 4.11.4. (#99132)Jason R. Coombs2022-11-101-0/+7
|
* gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)Miss Islington (bot)2022-11-101-0/+1
| | | | | (cherry picked from commit dbf2faf579b4094387d65ee41f049456ca67c446) Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
* [3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222)Miss Islington (bot)2022-11-081-0/+6
| | | | | | | | | | | There was an unnecessary quadratic loop in idna decoding. This restores the behavior to linear. (cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d) (cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)Miss Islington (bot)2022-11-071-0/+2
| | | | | (cherry picked from commit 5ff81da6d3a8eb01fc5500fd1c9eaa6543286301) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.10] [ GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols ↵Miss Islington (bot)2022-11-071-0/+1
| | | | (GH-99156). (GH-99188) (GH-99190)
* gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)Miss Islington (bot)2022-11-071-0/+2
| | | | | (cherry picked from commit f626b7b504df454d289527a4f922b09deeae9e21) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.10] gh-99086: Fix implicit int compiler warning in configure check for ↵Erlend E. Aasland2022-11-061-0/+1
| | | | | | | | | PTHREAD_SCOPE_SYSTEM (GH-99085) (#99119) (cherry picked from commit 12078e78f6e4a21f344e4eaff529e1ff3b97734f) Co-authored-by: Sam James <sam@cmpct.info> Co-authored-by: Sam James <sam@cmpct.info>
* gh-83004: Clean up refleak in _pickle initialisation (GH-98841)Miss Islington (bot)2022-11-061-0/+1
| | | | | (cherry picked from commit d3b82b4463c4eb51954c0afd98342f0c5e479baa) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)Miss Islington (bot)2022-11-061-0/+1
| | | | | (cherry picked from commit 31f2f6568d89564cc1d686cd6b75ba5578aaa748) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-99134: Update bundled pip to 22.3.1 (gh-99135)Miss Islington (bot)2022-11-051-0/+1
| | | | | | Update bundled pip to 22.3.1 (cherry picked from commit 47ab8480e71ab3949a336a94c7fd146b1fce595d) Co-authored-by: Paul Moore <p.f.moore@gmail.com>
* gh-83004: Clean up refleak in _io initialisation (GH-98840)Miss Islington (bot)2022-11-031-0/+1
| | | | | (cherry picked from commit 1208037246eeab4c5c003f1651edfefb045e6fb7) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>