summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
Commit message (Collapse)AuthorAgeFilesLines
* GH-114847: Raise FileNotFoundError when getcwd() returns '(unreachable)' ↵Barney Gale2024-04-031-0/+2
| | | | | | | | | (#117481) On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)Zackery Spytz2024-04-031-0/+3
|
* gh-117381: Improve error messages for ntpath.commonpath() (GH-117382)Nice Zombies2024-04-031-0/+1
|
* GH-70647: Deprecate strptime day of month parsing without a year present to ↵Gregory P. Smith2024-04-031-0/+7
| | | | avoid leap-year bugs (GH-117107)
* gh-117431: Adapt bytes and bytearray .startswith() and .endswith() to ↵Erlend E. Aasland2024-04-031-0/+6
| | | | | | Argument Clinic (#117495) This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
* gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (#117466)Erlend E. Aasland2024-04-031-0/+2
| | | | This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
* gh-117349: Micro-optimize a few `os.path` functions (#117350)Nice Zombies2024-04-021-0/+1
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* GH-115776: Embed the values array into the object, for "normal" Python ↵Mark Shannon2024-04-021-0/+4
| | | | objects. (GH-116115)
* gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)Grigoriev Semyon2024-04-021-0/+2
|
* gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private ↵Irit Katriel2024-04-021-0/+1
| | | | (#117412)
* GH-117337: Deprecate `glob.glob0()` and `glob.glob1()`. (#117371)Barney Gale2024-04-011-0/+3
| | | | These undocumented functions are no longer used by `msilib`, so there's no reason to keep them around.
* gh-77714: Provide an async iterator version of as_completed (GH-22491)Justin Turner Arthur2024-04-011-0/+5
| | | | | | | | | * as_completed returns object that is both iterator and async iterator * Existing tests adjusted to test both the old and new style * New test to ensure iterator can be resumed * New test to ensure async iterator yields any passed-in Futures as-is Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568)Steve (Gadget) Barnes2024-04-011-0/+1
| | | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-117348: Refactored RawConfigParser._read for similicity and ↵Jason R. Coombs2024-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comprehensibility (#117372) * Extract method for _read_inner, reducing complexity and indentation by 1. * Extract method for _raise_all and yield ParseErrors from _read_inner. Reduces complexity by 1 and reduces touch points for handling errors in _read_inner. * Prefer iterators to splat expansion and literal indexing. * Extract method for _strip_comments. Reduces complexity by 7. * Model the file lines in a class to encapsulate the comment status and cleaned value. * Encapsulate the read state as a dataclass * Extract _handle_continuation_line and _handle_rest methods. Reduces complexity by 8. * Reindent * At least for now, collect errors in the ReadState * Check for missing section header separately. * Extract methods for _handle_header and _handle_option. Reduces complexity by 6. * Remove unreachable code. Reduces complexity by 4. * Remove unreachable branch * Handle error condition early. Reduces complexity by 1. * Add blurb * Move _raise_all to ParsingError, as its behavior is most closely related to the exception class and not the reader. * Split _strip* into separate methods. * Refactor _strip_full to compute the strip just once and use 'not any' to determine the factor. * Replace use of 'sys.maxsize' with direct computation of the stripped value. * Extract has_comments as a dynamic property. * Implement clean as a cached property. * Model comment prefixes in the RawConfigParser within a prefixes namespace. * Use a regular expression to search for the first match. Avoids mutating variables and tricky logic and over-computing all of the starts when only the first is relevant.
* gh-66449: configparser: Add support for unnamed sections (#117273)Pedro Lacerda2024-03-291-0/+2
| | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-117110: Fix subclasses of typing.Any with custom constructors (#117111)傅立业(Chris Fu)2024-03-291-0/+1
|
* gh-117335: Handle non-iterables for `ntpath.commonpath` (GH-117336)Nice Zombies2024-03-281-0/+1
|
* gh-117294: Report DocTestCase as skipped if all examples in the doctest are ↵Malcolm Smith2024-03-281-0/+2
| | | | skipped (GH-117297)
* bpo-43848: explain optional argument mtime in gzip.py. (GH-25410)Joachim Wuttke2024-03-281-0/+3
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-117178: Recover lazy loading of self-referential modules (#117179)Chris Markiewicz2024-03-281-0/+2
|
* gh-117266: Fix crashes on user-created AST subclasses (GH-117276)Jelle Zijlstra2024-03-281-0/+2
| | | Fix crashes on user-created AST subclasses
* gh-117310: Remove extra DECREF on "no ciphers" error path in ↵Gregory P. Smith2024-03-281-0/+4
| | | | | | | | | | `_ssl._SSLContext` constructor (#117309) Remove extra self DECREF on ssl "no ciphers" error path. This doesn't come up in practice because nobody links against a broken OpenSSL library that provides nothing.
* gh-114099: Add documentation for iOS platform (GH-117057)Russell Keith-Magee2024-03-282-0/+2
| | | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* gh-114099: Additions to standard library to support iOS (GH-117052)Russell Keith-Magee2024-03-281-0/+1
| | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* gh-89739: gh-77140: Support zip64 in zipimport (GH-94146)Tim Hatch2024-03-281-0/+1
| | | | | | | | | | | | | | | * Reads zip64 files as produced by the zipfile module * Include tests (somewhat slow, however, because of the need to create "large" zips) * About the same amount of strictness reading invalid zip files as zipfile has * Still works on files with prepended data (like pex) There are a lot more test cases at https://github.com/thatch/zipimport64/ that give me confidence that this works for real-world files. Fixes #89739 and #77140. --------- Co-authored-by: Itamar Ostricher <itamarost@gmail.com> Reviewed-by: Gregory P. Smith <greg@krypto.org>
* gh-71042: Add `platform.android_ver` (#116674)Malcolm Smith2024-03-271-0/+2
|
* gh-117225: doctest: only print "and X failed" when non-zero, don't pluralise ↵Hugo van Kemenade2024-03-271-0/+2
| | | | "1 items" (#117228)
* gh-113548: Allow CLI arguments to `pdb -m` (#113557)Tian Gao2024-03-271-0/+1
|
* gh-115775: Compiler adds __static_attributes__ field to classes (#115913)Irit Katriel2024-03-261-0/+3
|
* gh-97901 add missing text/rtf to mimetypes (GH-97902)Antonio2024-03-261-0/+1
| | | | Co-authored-by: Noam Cohen <noam@noam.me>
* gh-98966: Handle stdout=subprocess.STDOUT (GH-98967)Paulo Neves2024-03-261-0/+2
| | | | | | | Explicitly handle the case where stdout=STDOUT as otherwise the existing error handling gets confused and reports hard to understand errors. Signed-off-by: Paulo Neves <ptsneves@gmail.com>
* gh-66543: Fix mimetype.guess_type() (GH-117217)Serhiy Storchaka2024-03-261-0/+4
| | | | | | | | | | Fix parsing of the following corner cases: * URLs with only a host name * URLs containing a fragment * URLs containing a query * filenames with only a UNC sharepoint on Windows Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* GH-117108: Set the "old space bit" to "visited" for all young objects (#117213)Mark Shannon2024-03-261-0/+3
| | | | Change old space bit of young objects from 0 to gcstate->visited_space. This ensures that any object created *and* collected during cycle GC has the bit set correctly.
* bpo-24612: Improve syntax error for 'not' after an operator (GH-28170)Pablo Galindo Salgado2024-03-261-0/+2
| | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* gh-115627: Fix PySSL_SetError handling SSL_ERROR_SYSCALL (GH-115628)yevgeny hong2024-03-261-0/+2
| | | | | | | | | | | | | | | | | Python 3.10 changed from using SSL_write() and SSL_read() to SSL_write_ex() and SSL_read_ex(), but did not update handling of the return value. Change error handling so that the return value is not examined. OSError (not EOF) is now returned when retval is 0. According to *recent* man pages of all functions for which we call PySSL_SetError, (in OpenSSL 3.0 and 1.1.1), their return value should be used to determine whether an error happened (i.e. if PySSL_SetError should be called), but not what kind of error happened (so, PySSL_SetError shouldn't need retval). To get the error, we need to use SSL_get_error. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-83434: Disable XML in regrtest when -R option is used (#117232)Victor Stinner2024-03-261-0/+3
|
* gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203)Sebastian Pipping2024-03-261-0/+1
| | | | | | | | | | | This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix. When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing. * sax|etree: Simplify Expat version guard where simplifiable Idea by Matěj Cepl * sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0 This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix. (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package)
* gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237)Jonathan Protzenko2024-03-261-0/+6
| | | Pulls in a new update from https://github.com/hacl-star/hacl-star and fixes our C "namespacing" done by `Modules/_hacl/refresh.sh`.
* gh-109870: Dataclasses: batch up exec calls (gh-110851)Eric V. Smith2024-03-251-0/+3
| | | Instead of calling `exec()` once for each function added to a dataclass, only call `exec()` once per dataclass. This can lead to speed improvements of up to 20%.
* gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115)Nice Zombies2024-03-251-0/+1
|
* gh-116936: Add PyType_GetModuleByDef() to the limited C API (#116937)Victor Stinner2024-03-251-0/+2
|
* gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() ↵Serhiy Storchaka2024-03-251-0/+3
| | | | | (GH-117160) Create a new bytes object and destroy the old one if it has refcount > 1.
* gh-112948: Make pdb completion similar to repl completion (#112950)Tian Gao2024-03-251-0/+1
|
* gh-112383: teach dis how to interpret ENTER_EXECUTOR (#117171)Irit Katriel2024-03-231-0/+1
|
* gh-91227: Ignore ERROR_PORT_UNREACHABLE in proactor recvfrom() (#32011)Erik Soma2024-03-231-0/+1
|
* GH-117108: Change the size of the GC increment to about 1% of the total heap ↵Mark Shannon2024-03-221-0/+3
| | | | size. (GH-117120)
* gh-113024: C API: Add PyObject_GenericHash() function (GH-113025)Serhiy Storchaka2024-03-221-0/+1
|
* gh-117084: Fix ZIP file extraction for directory entry names with ↵Serhiy Storchaka2024-03-221-0/+2
| | | | backslashes on Windows (GH-117129)
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)Jakub Stasiak2024-03-221-0/+9
| | | | | | | | | | | | | | | | | | | | | * GH-113171: Fix "private" (really non-global) IP address ranges The _private_networks variables, used by various is_private implementations, were missing some ranges and at the same time had overly strict ranges (where there are more specific ranges considered globally reachable by the IANA registries). This patch updates the ranges with what was missing or otherwise incorrect. I left 100.64.0.0/10 alone, for now, as it's been made special in [1] and I'm not sure if we want to undo that as I don't quite understand the motivation behind it. The _address_exclude_many() call returns 8 networks for IPv4, 121 networks for IPv6. [1] https://github.com/python/cpython/issues/61602
* gh-71052: Add Android build script and instructions (#116426)Malcolm Smith2024-03-211-0/+1
|