summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
Commit message (Collapse)AuthorAgeFilesLines
* gh-93627: Align Python implementation of pickle with C implementation of ↵Pieter Eendebak2023-09-101-0/+1
| | | | | pickle (GH-103035) If a method like __reduce_ex_ or __reduce__ is set to None, a TypeError is raised.
* gh-109174: Add support of SimpleNamespace in copy.replace() (GH-109175)Serhiy Storchaka2023-09-101-0/+1
|
* gh-109118: Fix runtime crash when NameError happens in PEP 695 function ↵Jelle Zijlstra2023-09-091-0/+2
| | | | (#109123)
* gh-109052: Use the base opcode when comparing code objects (gh-109107)Tian Gao2023-09-091-0/+1
|
* gh-108996: add tests for msvcrt (#109004)AN Long2023-09-081-0/+1
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-109054: configure checks if libatomic is needed (#109101)Victor Stinner2023-09-081-0/+6
| | | | | | | | | | | | | | | | Fix building the _testcapi extension on Linux AArch64 which requires linking to libatomic when <cpython/pyatomic.h> is used: the _Py_atomic_or_uint64() function requires libatomic __atomic_fetch_or_8() on this platform. The configure script now checks if linking to libatomic is needed and generates a new LIBATOMIC variable used to build the _testcapi extension. Building the _testcapi extension now uses the LIBATOMIC variable in its LDFLAGS, since Modules/_testcapi/pyatomic.c uses <cpython/pyatomic.h>. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-109114: Relax the check for invalid lambdas inside f-strings to avoid ↵Pablo Galindo Salgado2023-09-081-0/+3
| | | | false positives (#109121)
* gh-106922: Fix error location for constructs with spaces and parentheses ↵Pablo Galindo Salgado2023-09-081-0/+2
| | | | (#108959)
* GH-108716: Turn off deep-freezing of code objects. (GH-108722)Mark Shannon2023-09-081-0/+2
|
* gh-109022: [Enum] require `names=()` to create empty enum type (GH-109048)Ethan Furman2023-09-081-0/+2
| | | | | | | add guard so that ``Enum('bar')`` raises a TypeError instead of creating a new enum class called `bar`. To create the new but empty class, use: huh = Enum('bar', names=())
* gh-108732: include comprehension locals in frame.f_locals (#109026)Carl Meyer2023-09-071-0/+2
| | | | Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-102823: Document return type of floor division on floats (#102824)Mark Dickinson2023-09-071-0/+2
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-88943: Improve syntax error for non-ASCII character that follows a ↵Serhiy Storchaka2023-09-071-0/+3
| | | | | numerical literal (GH-109081) It now points on the invalid non-ASCII character, not on the valid numerical literal.
* GH-108614: Add `RESUME_CHECK` instruction (GH-108630)Mark Shannon2023-09-071-0/+2
|
* gh-103186: Suppress and assert expected RuntimeWarnings in test_sys_settrace ↵Ijtaba Hussain2023-09-071-0/+1
| | | | | | (GH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised.
* gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016)Victor Stinner2023-09-061-0/+6
| | | | Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2).
* GH-104584: Restore frame->stacktop on optimizer error (GH-108953)Brandt Bucher2023-09-061-0/+2
|
* gh-108751: Add copy.replace() function (GH-108752)Serhiy Storchaka2023-09-061-0/+2
| | | | | | | | | It creates a modified copy of an object by calling the object's __replace__() method. It is a generalization of dataclasses.replace(), named tuple's _replace() method and replace() methods in various classes, and supports all these stdlib classes.
* gh-108740: Fix "make regen-all" race condition (#108741)Victor Stinner2023-09-061-0/+4
| | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all". The deepfreeze.c source and files generated by Argument Clinic are now generated or updated before generating "global objects". Previously, some identifiers may miss depending on the order in which these files were generated. * "make regen-global-objects": Make sure that deepfreeze.c is generated and up to date, and always run "make clinic". * "make clinic" no longer runs generate_global_objects.py script. * "make regen-deepfreeze" now only updates deepfreeze.c (C file). It doesn't build deepfreeze.o (object) anymore. * Remove misleading messages in "make regen-global-objects" and "make clinic". They are now outdated, these commands are now safe to use. * Document generates files in Doc/using/configure.rst. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108851: Fix tomllib recursion tests (#108853)Victor Stinner2023-09-062-0/+5
| | | | | | | | | | | * Add get_recursion_available() and get_recursion_depth() functions to the test.support module. * Change infinite_recursion() default max_depth from 75 to 100. * Fix test_tomllib recursion tests for WASI buildbots: reduce the recursion limit and compute the maximum nested array/dict depending on the current available recursion limit. * test.pythoninfo logs sys.getrecursionlimit(). * Enhance test_sys tests on sys.getrecursionlimit() and sys.setrecursionlimit().
* gh-91960: Add FreeBSD build and test using Cirrus-CI (#91961)Ed Maste2023-09-061-0/+1
| | | | | | | Cirrus-CI is a hosted CI service that supports FreeBSD, Linux, macOS, and Windows. Add a .cirrus.yml configuration file to provide CI coverage on pull requests for FreeBSD 13.2. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-91960: Skip test_gdb if gdb cannot retrive Python frames (#108999)Victor Stinner2023-09-061-0/+7
| | | | | | | | | | Skip test_gdb if gdb is unable to retrieve Python frame objects: if a frame is "<optimized out>". When Python is built with "clang -Og", gdb can fail to retrive the 'frame' parameter of _PyEval_EvalFrameDefault(). In this case, tests like py_bt() are likely to fail. Without getting access to Python frames, python-gdb.py is mostly clueless on retrieving the Python traceback. Moreover, test_gdb is no longer skipped on macOS if Python is built with Clang.
* gh-108962: Skip test_tempfile.test_flags() if not supported (#108964)Victor Stinner2023-09-051-0/+3
| | | | Skip test_tempfile.test_flags() if chflags() fails with "OSError: [Errno 45] Operation not supported" (ex: on FreeBSD 13).
* gh-108469: Update ast.unparse for unescaped quote support from PEP701 [3.12] ↵Anthony Shaw2023-09-051-0/+3
| | | | | | (#108553) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
* gh-107565: Update Windows build to use OpenSSL 3.0.10 (GH-108928)Zachary Ware2023-09-054-4/+1
| | | Also clean up some intermediate NEWS entries about previous versions.
* GH-108390: Prevent non-local events being set with ↵Mark Shannon2023-09-051-0/+4
| | | | `sys.monitoring.set_local_events()` (GH-108420)
* gh-89392: Remove support of test_main() in libregrtest (GH-108876)Serhiy Storchaka2023-09-051-0/+2
|
* gh-108463: Make expressions/statements work as expected in pdb (#108464)Tian Gao2023-09-041-0/+1
|
* Revert "gh-46376: Return existing pointer when possible in ctypes (#1… ↵Victor Stinner2023-09-041-1/+0
| | | | | | | | (#108688) This reverts commit 08447b5deb47e2a0df87fa0a0576d300e5c909b4. Revert also _ctypes.c changes of the PyDict_ContainsString() change, commit 67266266469fe0e817736227f39537182534c1a5.
* gh-108834: regrtest reruns failed tests in subprocesses (#108839)Victor Stinner2023-09-033-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using --rerun option, regrtest now re-runs failed tests in verbose mode in fresh worker processes to have more deterministic behavior. So it can write its final report even if a test killed a worker progress. Add --fail-rerun option to regrtest: exit with non-zero exit code if a test failed pass passed when re-run in verbose mode (in a fresh process). That's now more useful since tests can pass when re-run in a fresh worker progress, whereas they failed when run after other tests when tests are run sequentially. Rename --verbose2 option (-w) to --rerun. Keep --verbose2 as a deprecated alias. Changes: * Fix and enhance statistics in regrtest summary. Add "(filtered)" when --match and/or --ignore options are used. * Add RunTests class. * Add TestResult.get_rerun_match_tests() method * Rewrite code to serialize/deserialize worker arguments as JSON using a new WorkerJob class. * Fix stats when a test is run with --forever --rerun. * If failed test names cannot be parsed, log a warning and don't filter tests. * test_regrtest.test_rerun_success() now uses a marker file, since the test is re-run in a separated process. * Add tests on normalize_test_name() function. * Add test_success() and test_skip() tests to test_regrtest.
* gh-108765: Python.h no longer includes <ctype.h> (#108831)Victor Stinner2023-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Remove <ctype.h> in C files which don't use it; only sre.c and _decimal.c still use it. Remove _PY_PORT_CTYPE_UTF8_ISSUE code from pyport.h: * Code added by commit b5047fd01948ab108edcc1b3c2c901d915814cfd in 2004 for MacOSX and FreeBSD. * Test removed by commit 52ddaefb6bab1a74ecffe8519c02735794ebfbe1 in 2007, since Python str type now uses locale independent functions like Py_ISALPHA() and Py_TOLOWER() and the Unicode database. Modules/_sre/sre.c replaces _PY_PORT_CTYPE_UTF8_ISSUE with new functions: sre_isalnum(), sre_tolower(), sre_toupper(). Remove unused includes: * _localemodule.c: remove <stdio.h>. * getargs.c: remove <float.h>. * dynload_win.c: remove <direct.h>, it no longer calls _getcwd() since commit fb1f68ed7cc1536482d1debd70a53c5442135fe2 (in 2001).
* gh-63760: Don't declare gethostname() on Solaris (#108817)Victor Stinner2023-09-021-0/+3
| | | | | | | | | | | | | Since 2005, Solaris defines gethostname(). socketmodule.c no longer has to define gethostname() for Solaris. Oracle Solaris and OpenSolaris have patches to remove the gethostname() definition in Python: * https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch * https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch * https://github.com/omniosorg/omnios-build/blob/master/build/python27/patches/24-gethostname.patch Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* gh-108822: Add Changelog entry for regrtest statistics (#108821)Victor Stinner2023-09-021-0/+4
|
* gh-108765: Python.h no longer includes <sys/time.h> (#108775)Victor Stinner2023-09-021-0/+6
| | | | | | | | | Python.h no longer includes <time.h>, <sys/select.h> and <sys/time.h> standard header files. * Add <time.h> include to xxsubtype.c. * Add <sys/time.h> include to posixmodule.c and semaphore.c. * readline.c includes <sys/select.h> instead of <sys/time.h>. * resource.c no longer includes <time.h> and <sys/time.h>.
* GH-78722: Raise exceptions from `pathlib.Path.iterdir()` without delay. ↵Barney Gale2023-09-021-0/+2
| | | | | | | (#107320) `pathlib.Path.iterdir()` now immediately raises any `OSError` exception from `os.listdir()`, rather than waiting until its result is iterated over.
* gh-108765: Python.h no longer includes <unistd.h> (#108783)Victor Stinner2023-09-021-0/+4
|
* gh-108794: doctest counts skipped tests (#108795)Victor Stinner2023-09-021-0/+3
| | | | | | | | | | | | * Add 'skipped' attribute to TestResults. * Add 'skips' attribute to DocTestRunner. * Rename private DocTestRunner._name2ft attribute to DocTestRunner._stats. * Use f-string for string formatting. * Add some tests. * Document DocTestRunner attributes and its API for statistics. * Document TestResults class. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-108765: Python.h no longer includes <ieeefp.h> (#108781)Victor Stinner2023-09-021-0/+4
| | | | Remove also the HAVE_IEEEFP_H macro: remove ieeefp.h from the AC_CHECK_HEADERS() check of configure.ac.
* gh-105509: Simplify implementation of `typing.Annotated` (#105510)Alex Waygood2023-09-011-0/+3
|
* gh-108727: Fix segfault due to missing tp_dealloc definition for ↵Irit Katriel2023-09-011-0/+2
| | | | CounterOptimizer_Type (GH-108734)
* gh-107805: Fix signatures of module-level generated functions in `turtle` ↵Nikita Sobolev2023-09-011-0/+1
| | | | | (#107807) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-108337: Add pyatomic.h header (#108701)Victor Stinner2023-08-311-0/+1
| | | | | | | | This adds a new header that provides atomic operations on common data types. The intention is that this will be exposed through Python.h, although that is not the case yet. The only immediate use is in the test file. Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-108682: [Enum] raise TypeError if super().__new__ called in custom ↵Ethan Furman2023-08-311-0/+2
| | | | | | | | | | | __new__ (GH-108704) When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. . member = object.__new__(cls) member = int.__new__(cls, value) member = str.__new__(cls, value) Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected.
* gh-108634: Py_TRACE_REFS uses a hash table (#108663)Victor Stinner2023-08-312-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python built with "configure --with-trace-refs" (tracing references) is now ABI compatible with Python release build and debug build. Moreover, it now also supports the Limited API. Change Py_TRACE_REFS build: * Remove _PyObject_EXTRA_INIT macro. * The PyObject structure no longer has two extra members (_ob_prev and _ob_next). * Use a hash table (_Py_hashtable_t) to trace references (all objects): PyInterpreterState.object_state.refchain. * Py_TRACE_REFS build is now ABI compatible with release build and debug build. * Limited C API extensions can now be built with Py_TRACE_REFS: xxlimited, xxlimited_35, _testclinic_limited. * No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2() functions to PyModule_Create2TraceRefs() and PyModule_FromDefAndSpec2TraceRefs(). * _Py_PrintReferenceAddresses() is now called before finalize_interp_delete() which deletes the refchain hash table. * test_tracemalloc find_trace() now also filters by size to ignore the memory allocated by _PyRefchain_Trace(). Test changes for Py_TRACE_REFS: * Add test.support.Py_TRACE_REFS constant. * Add test_sys.test_getobjects() to test sys.getobjects() function. * test_exceptions skips test_recursion_normalizing_with_no_memory() and test_memory_error_in_PyErr_PrintEx() if Python is built with Py_TRACE_REFS. * test_repl skips test_no_memory(). * test_capi skisp test_set_nomemory().
* gh-108654: restore comprehension locals before handling exception (#108659)Carl Meyer2023-08-301-0/+2
| | | Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* gh-108520: Fix bad fork detection in nested multiprocessing use case (#108568)albanD2023-08-301-0/+3
| | | | | | | | gh-107275 introduced a regression where a SemLock would fail being passed along nested child processes, as the `is_fork_ctx` attribute would be left missing after the first deserialization. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* gh-108590: Revert gh-108657 (commit 400a1cebc) (#108686)Erlend E. Aasland2023-08-301-1/+0
| | | Reverted per Serhiy's request.
* gh-108494: Argument Clinic: Document how to generate code that uses the ↵Victor Stinner2023-08-301-1/+2
| | | | | | limited C API (#108584) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (#108657)Corvin2023-08-301-0/+1
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108278: Deprecate passing the first param of sqlite3.Connection callback ↵Erlend E. Aasland2023-08-291-0/+10
| | | | | | | | | | | | APIs by keyword (#108632) Deprecate passing the callback callable by keyword for the following sqlite3.Connection APIs: - set_authorizer(authorizer_callback) - set_progress_handler(progress_handler, ...) - set_trace_callback(trace_callback) The affected parameters will become positional-only in Python 3.15.