summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* gh-100247: Fix py.exe launcher not using entire shebang command for finding ↵Steve Dower2023-01-131-0/+2
| | | | custom commands (GH-100944)
* gh-86682: Adds sys._getframemodulename as an alternative to using _getframe ↵Steve Dower2023-01-131-0/+2
| | | | | (GH-99520) Also updates calls in collections, doctest, enum, and typing modules to use _getframemodulename first when available.
* GH-100942: Fix incorrect cast in property_copy(). (#100965)Raymond Hettinger2023-01-121-0/+2
|
* gh-96290: Support partial/invalid UNC drives in ntpath.normpath() and ↵Barney Gale2023-01-121-0/+5
| | | | | | | splitdrive() (GH-100351) This brings the Python implementation of `ntpath.normpath()` in line with the C implementation added in 99fcf15 Co-authored-by: Eryk Sun <eryksun@gmail.com>
* gh-98636: Fix detecting gdbm_compat for _dbm module (#98643)Michał Górny2023-01-112-0/+3
| | | | | | Fix the gdbm_compat library detection logic to actually check for -lgdbm_compat independently of the ndbm detection. This fixes the build failure with `--with-dbmliborder=gdbm`, and implicit fallback to ndbm with the default value.
* GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924)Mark Shannon2023-01-111-0/+2
|
* GH-100892: Fix race in clearing `threading.local` (#100922)Kumar Aditya2023-01-111-0/+1
|
* Python 3.12.0a4v3.12.0a4Thomas Wouters2023-01-10111-222/+1132
|
* GH-100117: Make `co_lines` more efficient (GH-100447)Brandt Bucher2023-01-101-0/+2
|
* gh-100180: Update macOS installer to OpenSSL 1.1.1s (GH-100908)Ned Deily2023-01-101-0/+1
|
* gh-100180: Update Windows installer to OpenSSL 1.1.1s (GH-100901)Steve Dower2023-01-091-0/+1
|
* GH-100126: Skip incomplete frames in more places (GH-100613)Brandt Bucher2023-01-091-0/+3
|
* gh-99191: Use correct check for MSVC C++ version support in _wmimodule.cpp ↵C.A.M. Gerlach2023-01-091-0/+2
| | | | (GH-100381)
* GH-81061: Fix refcount issue when returning `None` from a `ctypes.py_object` ↵dgelessus2023-01-091-0/+2
| | | | callback (#13364)
* GH-100813: Add `socket.IP_PKTINFO` constant (#10294)dsentinel2023-01-091-0/+1
|
* gh-87447: Fix walrus comprehension rebind checking (#100581)Nikita Sobolev2023-01-081-0/+5
| | | | Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* GH-100805: Support numpy.array() in random.choice(). (GH-100830)Raymond Hettinger2023-01-081-0/+2
|
* gh-100833: Remove 'volatile' qualifiers in fsum algorithm (#100845)Mark Dickinson2023-01-081-0/+1
| | | | | | | This PR removes the `volatile` qualifier on various intermediate quantities in the `math.fsum` implementation, and updates the notes preceding the algorithm accordingly (as well as fixing some of the exsting notes). See the linked issue #100833 for discussion.
* gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap ↵Nikita Sobolev2023-01-081-0/+1
| | | | | | | memory (GH-24061)" (#100745) * gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)" This reverts commit 7c83eaa536d2f436ae46211ca48692f576c732f0.
* gh-91851: Micro optimizations for arithmetic between Fractions (#25518)Sergey B Kirpichev2023-01-081-0/+1
| | | | | | | | Adapted from https://github.com/python/cpython/pull/24779/commits/046c84e8f9 This makes arithmetic between Fractions with small components just as fast as before python/cpython#24779, at some expense of mixed arithmetic (e.g. Fraction + int).
* gh-100776: Fix misleading default value in help(input) (#100788)Shantanu2023-01-081-0/+1
|
* gh-100792: Make `email.message.Message.__contains__` twice as fast (#100793)Nikita Sobolev2023-01-071-0/+1
|
* GH-100485: Add math.sumprod() (GH-100677)Raymond Hettinger2023-01-071-0/+1
|
* gh-96127: Fix `inspect.signature` call on mocks (#96335)Nikita Sobolev2023-01-071-0/+2
|
* gh-100690: Raise an AttributeError when the assert_ prefix is forgotten when ↵Christian Klein2023-01-061-0/+7
| | | | | | | | using Mock (#100691) Mock objects which are not unsafe will now raise an AttributeError when accessing an attribute that matches the name of an assertion but without the prefix `assert_`, e.g. accessing `called_once` instead of `assert_called_once`. This is in addition to this already happening for accessing attributes with prefixes assert, assret, asert, aseert, and assrt.
* gh-91851: Trivial optimizations in Fraction (#100791)Sergey B Kirpichev2023-01-061-0/+3
| | | | | | | Make some trivial performance optimizations in Fraction Uses private class attributes `_numerator` and `_denominator` in place of the `numerator` and `denominator` property accesses. Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
* GH-99005: More intrinsics (GH-100774)Mark Shannon2023-01-061-0/+2
| | | * Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
* gh-90104: avoid RecursionError on recursive dataclass field repr (gh-100756)Carl Meyer2023-01-061-0/+1
| | | Avoid RecursionError on recursive dataclass field repr
* gh-86082: bpo-41916: allow cross-compiled python to have -pthread set for ↵Dustin Spicuzza2023-01-051-0/+2
| | | | | | | CXX (#22525) When cross-compiling, the compile/run test for -pthread always fails so -pthread will never be automatically set without an override from the cache. ac_cv_pthread can already be overridden, so do the same thing for ac_cv_cxx_thread.
* gh-100562: improve performance of `pathlib.Path.absolute()` (GH-100563)Barney Gale2023-01-051-0/+3
| | | | | | | | | | | | | | | | Increase performance of the `absolute()` method by calling `os.getcwd()` directly, rather than using the `Path.cwd()` class method. This avoids constructing an extra `Path` object (and the parsing/normalization that comes with it). Decrease performance of the `cwd()` class method by calling the `Path.absolute()` method, rather than using `os.getcwd()` directly. This involves constructing an extra `Path` object. We do this to maintain a longstanding pattern where `os` functions are called from only one place, which allows them to be more readily replaced by users. As `cwd()` is generally called at most once within user programs, it's a good bargain. ```shell # before $ ./python -m timeit -s 'from pathlib import Path; p = Path("foo", "bar")' 'p.absolute()' 50000 loops, best of 5: 9.04 usec per loop # after $ ./python -m timeit -s 'from pathlib import Path; p = Path("foo", "bar")' 'p.absolute()' 50000 loops, best of 5: 5.02 usec per loop ``` Automerge-Triggered-By: GH:AlexWaygood
* GH-99005: Add `CALL_INTRINSIC_1` instruction (GH-100771)Mark Shannon2023-01-051-0/+4
| | | | | | | | * Remove PRINT_EXPR instruction * Remove STOPITERATION_ERROR instruction * Remove IMPORT_STAR instruction
* GH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (GH-100753)Mark Shannon2023-01-051-0/+2
|
* gh-100739: Respect mock spec when checking for unsafe prefixes (#100740)Christian Klein2023-01-041-0/+1
| | | Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)Mark Shannon2023-01-041-0/+2
|
* gh-100720: refactor calculation of number of frame slots for a code object ↵Irit Katriel2023-01-041-0/+1
| | | | into the new function _PyFrame_NumSlotsForCodeObject (#100722)
* GH-86508: skip binding to local addresses of different family in ↵Kumar Aditya2023-01-041-0/+1
| | | | `asyncio.open_connection` (#100615)
* gh-91219: http - use subclassing to override index_pages attribute (GH-100731)Ethan Furman2023-01-031-0/+2
| | | Remove previously added parameter to `__init__`, and recommend subclassing to modify the `index_pages` attribute instead.
* gh-100146: Steal references from stack when building a list (#100147)L. A. F. Pereira2023-01-031-0/+4
| | | | | | | | | | When executing the BUILD_LIST opcode, steal the references from the stack, in a manner similar to the BUILD_TUPLE opcode. Implement this by offloading the logic to a new private API, _PyList_FromArraySteal(), that works similarly to _PyTuple_FromArraySteal(). This way, instead of performing multiple stack pointer adjustments while the list is being initialized, the stack is adjusted only once and a fast memory copy operation is performed in one fell swoop.
* gh-95882: fix regression in the traceback of exceptions propagated from ↵Thomas Grainger2023-01-032-0/+2
| | | | inside a contextlib context manager (#95883)
* gh-89419: gdb: fix bug causing `AttributeError` in py-locals when no frame ↵Eli Schwartz2023-01-031-0/+1
| | | | is available (#100611)
* gh-89727: Improve os.walk complexity (#100671)Stanislav Zmiev2023-01-021-0/+1
|
* gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ↵Ionite2023-01-021-0/+1
| | | | | | | | ob_digit array for 0 and False (#100663) Fixes behaviour where int (and subtypes like bool) __sizeof__ under-reports true size as it did not take into account the size 1 `ob_digit` array for the zero int. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-97930: Apply changes from importlib_resources 5.10. (GH-100598)Jason R. Coombs2023-01-011-0/+6
|
* gh-100649: Update native_thread_id after fork (gh-100650)Gabriele N. Tornetta2023-01-011-0/+1
| | | Update native_thread_id after fork
* gh-100488: Add is_integer method to fractions.Fraction (#100489)Shantanu2023-01-011-0/+1
|
* gh-95778: add doc missing in some places (GH-100627)Éric2022-12-301-0/+9
|
* gh-100616: Document 'attr' parameter for window.vline() in curses module ↵mathieui2022-12-301-0/+2
| | | | | (#24961) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* gh-99433: Fix `doctest` failure on `types.MethodWrapperType` (#99434)Nikita Sobolev2022-12-301-0/+1
|
* gh-100228: Warn from os.fork() if other threads exist. (#100229)Gregory P. Smith2022-12-291-0/+5
| | | | | Not comprehensive, best effort warning. There are cases when threads exist on some platforms that this code cannot detect. macOS when API permissions allow and Linux with a readable /proc procfs present are the currently supported cases where a warning should show up reliably. Starting with a DeprecationWarning for now, it is less disruptive than something like RuntimeWarning and most likely to only be seen in people's CI tests - a good place to start with this messaging.
* gh-100540: Remove obsolete Modules/_ctypes/darwin/ dlfcn shim (GH-100541)Zachary Ware2022-12-291-0/+2
| | | As far as I can tell, this hasn't been actually used since Mac OS X 10.2.