summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-111848: Convert remaining jumps to deopts into tier 2 code. (GH-112045)Mark Shannon2023-11-147-129/+184
|
* gh-111789: Simplify bytecodes.c by using PyDict_GetItemRef() (GH-111978)Serhiy Storchaka2023-11-143-140/+51
|
* gh-111262: Add PyDict_Pop() function (#112028)Victor Stinner2023-11-1415-73/+335
| | | | | | | _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-143-1/+39
|
* gh-111903: Add `@critical_section` directive to Argument Clinic. (#111904)Sam Gross2023-11-145-8/+117
| | | | | | | | | 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-111789: Simplify ceval.c by using PyDict_GetItemRef() (GH-111980)Serhiy Storchaka2023-11-141-18/+14
|
* gh-111789: Simplify import.c by using PyDict_GetItemRef() (GH-111979)Serhiy Storchaka2023-11-141-18/+17
|
* gh-111789: Use PyDict_GetItemRef() in _ctypes (GH-111828)Serhiy Storchaka2023-11-142-78/+61
|
* gh-111789: Use PyDict_GetItemRef() in Objects/ (GH-111827)Serhiy Storchaka2023-11-145-120/+76
|
* gh-111622: Fix doc for items views (#112051)Terry Jan Reedy2023-11-141-5/+8
| | | | They are set-like even when some values are not hashable, but work even better when all are.
* GH-111520: Add back the operand local (GH-111813)Brandt Bucher2023-11-143-28/+24
|
* gh-107149: make new opcode util functions private rather than public and ↵Irit Katriel2023-11-145-39/+43
| | | | unstable (#112042)
* gh-112007: Re-organize help utility intro message (#112017)Terry Jan Reedy2023-11-131-11/+13
| | | | | | Most important: move how-to-quit sentence to the end and mention 'q'. Re-group the other sentences and improve some wording. --------- Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-110417: Fix `glob` docs ordering (#110418)Barney Gale2023-11-131-34/+35
| | | | | | | Fix incorrect placement of `translate()` docs from cf67ebf. Move "see also: pathlib" admonition to the bottom of the page, alongside one for fnmatch. This helps the module introduction flow more naturally into the function descriptions. Add an "Examples" subheading just before the examples. This makes it more obvious that examples aren't specifically related to the preceding documentation of `escape()` and `translate()`.
* GH-72904: Add `glob.translate()` function (#106703)Barney Gale2023-11-137-106/+229
| | | | | | | | | | | 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-138-127/+303
| | | | | | * 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-132-3/+10
|
* gh-111460: Restore ncurses widechar support on macOS (#111878)Davide Rizzo2023-11-133-3/+8
|
* gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)Markus Mohrhard2023-11-133-0/+16
| | | | | | | | | | * 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-110944: Move pty helper to test.support and add basic pdb completion test ↵Tian Gao2023-11-133-54/+91
| | | | (GH-111826)
* gh-102837: more tests for the math module (GH-111930)Sergey B Kirpichev2023-11-131-0/+55
| | | | | | | | | | | | | | Add tests to improve coverage: * fsum: L1369, L1379, L1383, L1412 * trunc: L2081 * log: L2267 * dist: L2577, L2579 * hypot: L2632 * sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838 * pow: L2982 * prod: L3294, L3308, L3318-3330 // line numbers wrt to 9dc4fb8204
* Docs: Add `make htmllive` to rebuild and reload HTML files in your browser ↵Hugo van Kemenade2023-11-132-0/+7
| | | | (#111900)
* gh-111999: Add signatures and improve docstrings for builtins (GH-112000)Serhiy Storchaka2023-11-138-39/+74
|
* gh-111928: make "memo" dict local to scan_once call (gh-112005)AN Long2023-11-131-23/+19
| | | Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-111944: Add assignment expression parentheses requirements (#111977)Terry Jan Reedy2023-11-131-4/+5
| | | | | | | gh-111944: Clarify where assignment expressions require ()s Augment the list of places where parentheses are required around assignnment statements. In particular, 'a := 0' and 'a = b := 1' are syntax errors.
* GH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431)Barney Gale2023-11-122-4/+10
|
* gh-111969: refactor to make it easier to construct a dis.Instruction object ↵Irit Katriel2023-11-122-64/+101
| | | | (#111970)
* gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002)Serhiy Storchaka2023-11-121-12/+7
|
* gh-111933: fix broken link to A.Neumaier article (gh-111937)Sergey B Kirpichev2023-11-121-1/+4
|
* gh-111777: Fix assertion errors on incorrectly still-tracked GC object ↵T. Wouters2023-11-121-1/+3
| | | | | | | | | | destruction (#111778) In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that were not properly untracked before starting destruction, take care to untrack the object _before_ warning, to avoid triggering a GC run and causing the problem the code tries to warn about. Also make sure to save and restore any pending exceptions, which the warning would otherwise clobber or trigger an assertion error on.
* Fix undefined behaviour in datetime.time.fromisoformat() (#111982)T. Wouters2023-11-111-1/+1
| | | Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
* gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)Stephen Gildea2023-11-115-1/+247
| | | | | | | | | | | | | | | 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-110481: fix 'unused function' warning for `is_shared_refcnt_dead`. ↵Sam Gross2023-11-101-4/+6
| | | | | | | (gh-111974) Fix 'unused function' warning for `is_shared_refcnt_dead`. The `is_shared_refcnt_dead` function is only used if `Py_REF_DEBUG` is set.
* gh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic ↵Nikita Sobolev2023-11-103-4/+12
| | | | | | | | (#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>
* Remove dead code left after gh-110721 (#111905)Serhiy Storchaka2023-11-101-37/+0
|
* gh-80731: Avoid executing code in except block in cmd (GH-111740)Tian Gao2023-11-104-3/+43
|
* gh-111789: Simplify the sqlite code (GH-111829)Serhiy Storchaka2023-11-102-17/+6
| | | | Use new C API functions PyDict_GetItemRef() and PyMapping_GetOptionalItemString().
* Add private _PyUnicode_AsUTF8NoNUL() function (GH-111957)Serhiy Storchaka2023-11-104-13/+18
| | | | Like PyUnicode_AsUTF8(), but check for embedded null characters.
* gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)Łukasz Langa2023-11-1013-34/+166
| | | | | | | | | | | 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-104-9/+19
| | | | (GH-111842)
* Bump mypy to 1.7.0 (#111961)Alex Waygood2023-11-102-4/+2
|
* gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)Zac Hatfield-Dodds2023-11-104-4/+25
|
* gh-111912: Run test_posix on Windows (GH-111913)Serhiy Storchaka2023-11-101-3/+7
|
* gh-108303: Install `Lib/test/configdata` (#111899)Nikita Sobolev2023-11-101-0/+1
|
* gh-111356: io: Add missing documented objects to io.__all__ (#111370)Nicolas Tessore2023-11-103-11/+17
| | | Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
* gh-111569: Fix critical sections test on WebAssembly (GH-111897)Sam Gross2023-11-092-0/+12
| | | | | | | | This adds a macro `Py_CAN_START_THREADS` that corresponds to the Python function `test.support.threading_helper.can_start_thread()`. WASI and some Emscripten builds do not have a working pthread implementation. This macro is used to guard the critical sections C API tests that require a working threads implementation.
* gh-111881: Import _sha2 lazily in random (#111889)Victor Stinner2023-11-091-11/+15
| | | | | | | The random module now imports the _sha2 module lazily in the Random.seed() method for str, bytes and bytearray seeds. It also imports lazily the warnings module in the _randbelow() method for classes without getrandbits(). Lazy import makes Python startup faster and reduces the number of imported modules at startup.
* gh-81925: Implement native thread ids for kFreeBSD (#111761)Samuel Thibault2023-11-096-5/+18
| | | | | --------- Co-authored-by: Antoine Pitrou <antoine@python.org>
* Improve error message for "float modulo by zero" (#111685)Pavel Ovchinnikov2023-11-091-1/+1
|
* gh-110875: Handle '.' properties in logging formatter configuration c… ↵Vinay Sajip2023-11-092-5/+41
| | | | (GH-110943)