| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
memory (GH-24061)" (#100745)
* gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)"
This reverts commit 7c83eaa536d2f436ae46211ca48692f576c732f0.
|
|
|
|
|
|
| |
- Use "drive", not "drive letter", because of UNC paths
- Previous components are not thrown away from relative drive letters
- Use "segment" instead of "component" for consistency with pathlib
- Other miscellaneous improvements
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
unittest.TestLoader.testNamePatterns (#100825)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Removed erroneous note in the get_type_hints docs
typing.get_type_hints still includes base class type hints.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- This doesn't cover everything (far from it) but it's a start.
- This uses pytest, which isn't ideal, but was quickest to get started.
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
(_PyFrame_Initialize) (GH-100759)
|
|
|
| |
* Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
|
|
|
| |
update dataclasses docs for when annotations are inspected
|
|
|
|
|
|
|
|
|
|
|
| |
This is feedback from https://github.com/python/cpython/pull/100737#discussion_r1062968696
This matches the wording from the `os.path.join` docs better:
https://docs.python.org/3/library/os.path.html#os.path.join
In particular, the previous use of "anchor" was incorrect given the
pathlib definition of "anchor".
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
|
|
| |
Avoid RecursionError on recursive dataclass field repr
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The behaviour is fully explained a couple paragraphs above, but it may be useful to have a brief example to cover the behaviour.
Automerge-Triggered-By: GH:hauntsaninja
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
(These aren't used yet, but may be coming soon,
and it's easier to keep this tool the same between branches.)
Added a sanity check for all this to compile.c.
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
|
|
|
|
|
|
|
|
| |
* Remove PRINT_EXPR instruction
* Remove STOPITERATION_ERROR instruction
* Remove IMPORT_STAR instruction
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
| |
(#100748)
|
| |
|
|
|
|
| |
into the new function _PyFrame_NumSlotsForCodeObject (#100722)
|
| |
|
|
|
|
| |
`asyncio.open_connection` (#100615)
|
|
|
| |
Remove previously added parameter to `__init__`, and recommend subclassing to modify the `index_pages` attribute instead.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
inside a contextlib context manager (#95883)
|
|
|
|
| |
is available (#100611)
|
|
|
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|