| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My criterion for delayed imports is that they're only worth it if the
majority of users of the module would benefit from it, otherwise you're
just moving latency around unpredictably.
mktime_tz is not used anywhere in the standard library and grep.app
indicates it's not got much use in the ecosystem either.
Distribution.files is not nearly as widely used as other
importlib.metadata APIs, so we defer the csv import.
Before:
```
λ hyperfine -w 8 './python -c "import importlib.metadata"'
Benchmark 1: ./python -c "import importlib.metadata"
Time (mean ± σ): 65.1 ms ± 0.5 ms [User: 55.3 ms, System: 9.8 ms]
Range (min … max): 64.4 ms … 66.4 ms 44 runs
```
After:
```
λ hyperfine -w 8 './python -c "import importlib.metadata"'
Benchmark 1: ./python -c "import importlib.metadata"
Time (mean ± σ): 62.0 ms ± 0.3 ms [User: 52.5 ms, System: 9.6 ms]
Range (min … max): 61.3 ms … 62.8 ms 46 runs
```
for about a 3ms saving with warm disk cache, maybe 7-11ms with cold disk
cache.
|
|
|
|
| |
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch
(https://fredrikbk.com/publications/copy-and-patch.pdf).
See Tools/jit/README.md for more information, including how to install the required build-time tooling. Merry JIT-mas! ;)
|
|
|
|
|
|
|
| |
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).
See Tools/jit/README.md for more information on how to install the required build-time tooling.
|
|
|
|
|
| |
non-string keys. (GH-105338)
Co-authored-by: Daniel Urban <durban@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
| |
|
|
|
|
|
| |
(GH-111998)
The `.rst` docs, most tests, and typeshed already use bool for it.
|
|
|
|
|
| |
Remove `self.joinpath('')` call that should have been removed in 6313cdde.
This makes `PathBase.glob('')` yield itself *without* adding a trailing slash. It's hard to say whether this is more or less correct, but at least everything else is faster, and there's no behaviour change in the public classes where empty glob patterns are disallowed.
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-113562)
|
| |
|
| |
|
|
|
|
| |
(GH-114221)
|
| |
|
|
|
|
|
|
|
|
|
| |
For interpreters that share state with the main interpreter, this points
to the same static memory structure. For interpreters with their own
obmalloc state, it is heap allocated. Add free_obmalloc_arenas() which
will free the obmalloc arenas and radix tree structures for interpreters
with their own obmalloc state.
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
| |
Wherever possible, move tests for OS-specific behaviour from `PurePathTest`
and `PathTest` to `DummyPurePathTest` and `DummyPathTest`.
|
|
|
| |
Test Posix- and Windows-specific behaviour from `PurePathTest` and `PathTest`.
|
|
|
|
|
|
|
|
| |
Add `@needs_symlinks` decorator for tests that require symlink support in
the path class.
Also add `@needs_windows` and `@needs_posix` decorators for tests that
require a specific a specific path flavour. These aren't much used yet, but
will be later.
|
|
|
|
|
| |
``platform.architecture()`` now returns the format of binaries (e.g. Mach-O) instead of the default empty string.
Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add `ntpath.isreserved()`, which identifies reserved pathnames such as "NUL", "AUX" and "CON".
Deprecate `pathlib.PurePath.is_reserved()`.
---------
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
|
|
|
|
|
|
| |
- consistently use correct parameter markup
- consistently use submodule name as database name
- improve accuracy of the dbm.dumb.open() spec
- remove dumbdbm class refs and replace them with generic "database object"
- use parameter list for dbm.dumb.open()
|
| |
|
|
|
|
|
| |
(GH-114571)
This may occur if Windows allows reading stat information from a file even if the current user does not have access.
|
|
|
| |
Currently it switches based on build settings, but argument clinic does not handle it correctly.
|
| |
|
| |
|
|
|
|
|
|
|
| |
EmailPolicy.fold() (GH-6986)
It now always encodes non-ASCII characters in headers if utf8 is false.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Also consolidate following paragraphs regarding database objects.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- add abbreviation directives for NDBM and GDBM
- consistently spell NDBM as NDBM
- silence broken ndbm class refs
- improve accuracy of dbm.ndbm.open() spec
- use replacement text for NDBM/GDBM file format incompatibility note
|
|
|
|
|
| |
- add refs to other parts of the docs (dict, bytes, etc.)
- clarify whichdb() return value by using list markup
- silence refs to example or generic submodule methods (keys, get, etc.)
|
|
|
| |
Fix usage in Modules, Objects, and Parser subdirectories.
|
| |
|
|
|
|
|
|
| |
Also...
- consistently spell GDBM as GDBM
- silence gdbm class refs
- improve accuracy of dbm.gdbm.open() spec
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
| |
(#114450)
|
|
|
| |
This is consistent with C-extension datetime.timezone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 49f90ba we added support for the recursive wildcard `**` in
`pathlib.PurePath.match()`. This should allow arbitrary prefix and suffix
matching, like `p.match('foo/**')` or `p.match('**/foo')`, but there's a
problem: for relative patterns only, `match()` implicitly inserts a `**`
token on the left hand side, causing all patterns to match from the right.
As a result, it's impossible to match relative patterns from the left:
`PurePath('foo/bar').match('bar/**')` is true!
This commit reverts the changes to `match()`, and instead adds a new
`full_match()` method that:
- Allows empty patterns
- Supports the recursive wildcard `**`
- Matches the *entire* path when given a relative pattern
|
| |
|
|
|
|
| |
optimisations (#114530)
|
|
|
|
| |
`requires_resource('console')` decorator (GH-114565)
|