summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.13.0a2v3.13.0a2Thomas Wouters2023-11-22153-382/+1622
|
* gh-110745: add a newline argument to pathlib.Path.read_text (#110880)Junya Okabe2023-11-211-0/+2
| | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Barney Gale <barney.gale@gmail.com>
* gh-111863: Rename blurb snippet placed in the wrong directory by accident. ↵T. Wouters2023-11-211-0/+0
| | | | | (#112300) Rename blurb snippet placed in the wrong directory by accident.
* gh-110950: add upstream Tk fixes to macOS installer. (GH-111041)Christopher Chavez2023-11-213-0/+8
| | | | | | | | | | | | | | | | Add upstream Tk patches for three problems affecting tkinter users: - Update macOS installer to include a fix accepted by upstream Tcl/Tk for a crash encountered after the first :meth:`tkinter.Tk` instance is destroyed. (gh-92603) - Update macOS installer to include an upstream Tcl/Tk fix for the ``ttk::ThemeChanged`` error encountered in Tkinter. (gh-71383) - Update macOS installer to include an upstream Tcl/Tk fix for the ``Secure coding is not enabled for restorable state!`` warning encountered in Tkinter on macOS 14 Sonoma. (gh-110950) Co-authored-by: Ned Deily <nad@python.org>
* gh-59703: use the system dladdr function in getpath.c for macOS framework ↵AN Long2023-11-211-0/+4
| | | | | builds (GH-111546) Co-authored-by: Ned Deily <nad@python.org>
* gh-112287: Speed up Tier 2 (uop) interpreter a little (#112286)Guido van Rossum2023-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes the Tier 2 interpreter a little faster. I calculated by about 3%, though I hesitate to claim an exact number. This starts by doubling the trace size limit (to 512), making it more likely that loops fit in a trace. The rest of the approach is to only load `oparg` and `operand` in cases that use them. The code generator know when these are used. For `oparg`, it will conditionally emit ``` oparg = CURRENT_OPARG(); ``` at the top of the case block. (The `oparg` variable may be referenced multiple times by the instructions code block, so it must be in a variable.) For `operand`, it will use `CURRENT_OPERAND()` directly instead of referencing the `operand` variable, which no longer exists. (There is only one place where this will be used.)
* gh-106529: Make FOR_ITER a viable uop (#112134)Guido van Rossum2023-11-201-0/+1
| | | | | | | | | | This uses the new mechanism whereby certain uops are replaced by others during translation, using the `_PyUop_Replacements` table. We further special-case the `_FOR_ITER_TIER_TWO` uop to update the deoptimization target to point just past the corresponding `END_FOR` opcode. Two tiny code cleanups are also part of this PR.
* gh-112243: Don't include comments in f-string debug expressions (#112284)Pablo Galindo Salgado2023-11-201-0/+1
|
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-201-0/+1
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* bpo-45759: Better error messages for non-matching 'elif'/'else' statements ↵Crowthebird2023-11-201-0/+1
| | | | (#29513)
* GH-111807: Lower the parser stack depth under WASI debug builds (#112225)Brett Cannon2023-11-201-0/+1
|
* gh-73561: Omit interface scope from IPv6 when used as Host header (#93324)Michael2023-11-191-0/+1
| | | | | | | Omit the `@interface_scope` from an IPv6 address when used as Host header by `http.client`. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google LLC]
* gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` ↵Nikita Sobolev2023-11-191-0/+2
| | | | docstrings (#112268)
* gh-79871: IDLE - Fix and test debugger module (#11451)Anthony Shaw2023-11-191-0/+4
| | | | | | | Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes. Expand test_debugger coverage from 19% to 66%. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* GH-111808: Make the default value for `test.support.infinite_recursion()` ↵Brett Cannon2023-11-171-0/+4
| | | | | conditional on compiler optimizations (GH-112223) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-111956: Add thread-safe one-time initialization. (gh-111960)Sam Gross2023-11-161-0/+2
|
* gh-111798: Use lower Py_C_RECURSION_LIMIT in debug mode (#112124)Victor Stinner2023-11-161-0/+4
| | | | | | | * Run again test_ast_recursion_limit() on WASI platform. * Add _testinternalcapi.get_c_recursion_remaining(). * Fix test_ast and test_sys_settrace: test_ast_recursion_limit() and test_trace_unpack_long_sequence() now adjust the maximum recursion depth depending on the the remaining C recursion.
* gh-111916: Make hashlib related modules thread-safe without the GIL (#111981)Tomas R2023-11-151-0/+1
| | | | | Always use an individual lock on hash objects when in free-threaded builds. Fixes #111916
* gh-112088: Run autoreconf in GHA check_generated_files (#112090)Victor Stinner2023-11-151-0/+5
| | | | | | | | | | | The "Check if generated files are up to date" job of GitHub Actions now runs the "autoreconf -ivf -Werror" command instead of the "make regen-configure" command to avoid depending on the external quay.io server. Add Tools/build/regen-configure.sh script to regenerate the configure with an Ubuntu container image. The "quay.io/tiran/cpython_autoconf:271" container image (https://github.com/tiran/cpython_autoconf) is no longer used.
* gh-112026: Add again _PyThreadState_UncheckedGet() function (#112121)Victor Stinner2023-11-151-0/+3
| | | | Add again the private _PyThreadState_UncheckedGet() function as an alias to the new public PyThreadState_GetUnchecked() function.
* gh-112026: Restore removed _PyDict_GetItemStringWithError() (#112119)Victor Stinner2023-11-151-0/+2
| | | | Restore the removed _PyDict_GetItemStringWithError() function. It is used by numpy.
* gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118)Miro Hrončok2023-11-151-0/+1
| | | | | | | | | This avoids: python3.13 Tools/unicode/makeunicodedata.py python3.13: can't open file '.../build/debug/Tools/unicode/makeunicodedata.py': [Errno 2] No such file or directory make: *** [Makefile:1498: regen-unicodedata] Error 2 Re-run `make regen-unicodedata` to update the script path in generated files.
* gh-112026: Restore removed private C API (#112115)Victor Stinner2023-11-151-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore removed private C API functions, macros and structures which have no simple replacement for now: * _PyDict_GetItem_KnownHash() * _PyDict_NewPresized() * _PyHASH_BITS * _PyHASH_IMAG * _PyHASH_INF * _PyHASH_MODULUS * _PyHASH_MULTIPLIER * _PyLong_Copy() * _PyLong_FromDigits() * _PyLong_New() * _PyLong_Sign() * _PyObject_CallMethodId() * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_EXTRA_INIT * _PyObject_FastCallDict() * _PyObject_GetAttrId() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyStack_AsDict() * _PyThread_CurrentFrames() * _PyUnicodeWriter structure * _PyUnicodeWriter_Dealloc() * _PyUnicodeWriter_Finish() * _PyUnicodeWriter_Init() * _PyUnicodeWriter_Prepare() * _PyUnicodeWriter_PrepareKind() * _PyUnicodeWriter_WriteASCIIString() * _PyUnicodeWriter_WriteChar() * _PyUnicodeWriter_WriteLatin1String() * _PyUnicodeWriter_WriteStr() * _PyUnicodeWriter_WriteSubstring() * _PyUnicode_AsString() * _PyUnicode_FromId() * _PyVectorcall_Function() * _Py_HashDouble() * _Py_HashPointer() * _Py_IDENTIFIER() * _Py_c_abs() * _Py_c_diff() * _Py_c_neg() * _Py_c_pow() * _Py_c_prod() * _Py_c_quot() * _Py_c_sum() * _Py_static_string() * _Py_static_string_init()
* gh-112026: Add again <unistd.h> include in Python.h (#112046)Victor Stinner2023-11-151-0/+3
| | | | Add again <ctype.h> and <unistd.h> includes in Python.h, but don't include them in the limited C API version 3.13 and newer.
* gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop ↵DPR2023-11-151-0/+1
| | | | | | | (#111983) Issue a ResourceWarning instead. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-111995: Add getnameinfo extension flag (#111994)adder322023-11-151-0/+2
| | | Add getnameinfo extension NI_IDN flag.
* gh-111942: Fix SystemError in the TextIOWrapper constructor (#112061)Serhiy Storchaka2023-11-141-0/+2
| | | | | | In non-debug more the check for the "errors" argument is skipped, and then PyUnicode_AsUTF8() can fail, but its result was not checked. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976)Serhiy Storchaka2023-11-141-0/+2
| | | | | | | | * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.
* gh-111262: Add PyDict_Pop() function (#112028)Victor Stinner2023-11-141-0/+4
| | | | | | | _PyDict_Pop_KnownHash(): remove the default value and the return type becomes an int. Co-authored-by: Stefan Behnel <stefan_ml@behnel.de> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* gh-110944: Make pdb completion work for alias and convenience vars (GH-110945)Tian Gao2023-11-141-0/+1
|
* gh-111903: Add `@critical_section` directive to Argument Clinic. (#111904)Sam Gross2023-11-141-0/+4
| | | | | | | | | The `@critical_section` directive instructs Argument Clinic to generate calls to `Py_BEGIN_CRITICAL_SECTION()` and `Py_END_CRITICAL_SECTION()` around the bound function. In `--disable-gil` builds, these calls will lock and unlock the `self` object. They are no-ops in the default build. This is used in one place (`_io._Buffered.close`) as a demonstration. Subsequent PRs will use it more widely in the `_io.Buffered` bindings.
* GH-72904: Add `glob.translate()` function (#106703)Barney Gale2023-11-131-0/+2
| | | | | | | | | | | Add `glob.translate()` function that converts a pathname with shell wildcards to a regular expression. The regular expression is used by pathlib to implement `match()` and `glob()`. This function differs from `fnmatch.translate()` in that wildcards do not match path separators by default, and that a `*` pattern segment matches precisely one path segment. When *recursive* is set to true, `**` pattern segments match any number of path segments, and `**` cannot appear outside its own segment. In pathlib, this change speeds up directory walking (because `_make_child_relpath()` does less work), makes path objects smaller (they don't need a `_lines` slot), and removes the need for some gnarly code. Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-111138: Add PyList_Extend() and PyList_Clear() functions (#111862)Victor Stinner2023-11-131-0/+2
| | | | | | * Split list_extend() into two sub-functions: list_extend_fast() and list_extend_iter(). * list_inplace_concat() no longer has to call Py_DECREF() on the list_extend() result, since list_extend() now returns an int.
* gh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (GH-112038)AN Long2023-11-131-0/+2
|
* gh-111460: Restore ncurses widechar support on macOS (#111878)Davide Rizzo2023-11-131-0/+3
|
* gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)Markus Mohrhard2023-11-131-0/+1
| | | | | | | | | | * gh-106905: avoid incorrect SystemError about recursion depth mismatch * Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst --------- Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* GH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431)Barney Gale2023-11-121-0/+2
|
* gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)Stephen Gildea2023-11-112-0/+8
| | | | | | | | | | | | | | | New methods to access mailbox.Maildir message info and flags: get_info, set_info, get_flags, set_flags, add_flag, remove_flag. These methods speed up accessing a message's info and/or flags and are useful when it is not necessary to access the message's contents, as when iterating over a Maildir to find messages with specific flags. --------- * Add more str type checking * modernize to f-strings instead of % Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic ↵Nikita Sobolev2023-11-101-0/+2
| | | | | | | | (#107433) Make `multiprocessing.managers.{DictProxy,ListProxy}` generic for type annotation use. `ListProxy[str]` for example. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-80731: Avoid executing code in except block in cmd (GH-111740)Tian Gao2023-11-101-0/+1
|
* gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)Łukasz Langa2023-11-101-0/+2
| | | | | | | | | | | Now all results from worker processes are aggregated and displayed together as a summary at the end of a regrtest run. The traditional trace is left in place for use with sequential in-process test runs but now raises a warning that those numbers are not precise. `-T -j` requires `--with-pydebug` as it relies on `-Xpresite=`.
* gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows ↵Serhiy Storchaka2023-11-101-0/+2
| | | | (GH-111842)
* gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)Zac Hatfield-Dodds2023-11-101-0/+3
|
* gh-111356: io: Add missing documented objects to io.__all__ (#111370)Nicolas Tessore2023-11-101-0/+1
| | | Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
* gh-81925: Implement native thread ids for kFreeBSD (#111761)Samuel Thibault2023-11-091-0/+1
| | | | | --------- Co-authored-by: Antoine Pitrou <antoine@python.org>
* GH-111843: Tier 2 exponential backoff (GH-111850)Mark Shannon2023-11-091-0/+2
|
* GH-109369: Exit tier 2 if executor is invalid (GH-111657)Mark Shannon2023-11-091-0/+1
|
* gh-111835: Add seekable method to mmap.mmap (gh-111852)Donghee Na2023-11-091-0/+4
|
* GH-111804: Drop posix.fallocate() under WASI (GH-111869)Brett Cannon2023-11-091-0/+2
| | | | | | | Drop posix.fallocate() under WASI. The underlying POSIX function, posix_fallocate(), was found to vary too much between implementations to remain in WASI. As such, while it was available in WASI preview1, it's been dropped in preview2.
* gh-111569: Implement Python critical section API (gh-111571)Sam Gross2023-11-081-0/+3
| | | | | | | | Critical sections are helpers to replace the global interpreter lock with finer grained locking. They provide similar guarantees to the GIL and avoid the deadlock risk that plain locking involves. Critical sections are implicitly ended whenever the GIL would be released. They are resumed when the GIL would be acquired. Nested critical sections behave as if the sections were interleaved.