For example:
class Book(StrEnum):
title = auto()
author = auto()
desc = auto()
Book.author.desc is Book.desc
but
Book.author.title() == 'Author'
is commonly expected. Using upper-case member names avoids this confusion and possible performance impacts.
Co-authored-by: samypr100 <3933065+samypr100@users.noreply.github.com>
Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv.
Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
We no longer add a root to device paths such as `//./PhysicalDrive0`,
`//?/BootPartition` and `//./c:` while normalizing. We also avoid adding a
root to incomplete UNC share paths, like `//`, `//a` and `//a/`.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Fixes unittest.mock.patch not enforcing function signatures for methods
decorated with @classmethod or @staticmethod when patch is called with
autospec=True.
* gh-95299: Rework test_cppext.py to not invoke setup.py directly
* Add tests/cppextdata data to `TESTSUBDIRS`
* Revert "Add tests/cppextdata data to `TESTSUBDIRS`"
This reverts commit 635492e539.
* Revert "gh-95299: Rework test_cppext.py to not invoke setup.py directly"
This reverts commit 41c5a667b5.
* Build and install the extension in a temporary directory instead
* Pull in wheels for setuptools and wheel for testing extension builds
* The majority of the monitoring code is in instrumentation.c
* The new instrumentation bytecodes are in bytecodes.c
* legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.
* Quote paths in os.spawn tests on Windows so they work with spaces
* Add NEWS entry for os spawn test fix
* Fix code style to avoid double negative in os.spawn tests
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
---------
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
The function is like Py_AtExit() but for a single interpreter. This is a companion to the atexit module's register() function, taking a C callback instead of a Python one.
We also update the _xxinterpchannels module to use _Py_AtExit(), which is the motivating case. (This is inspired by pain points felt while working on gh-101660.)