cpython
cpython copied to clipboard
The Python programming language
For the argument name, I used *pathsegments* to match [pathlib docs](https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.joinpath), rather than *descendants* used in [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/api.html#importlib_resources.abc.Traversable.joinpath) and the source. ---- 📚 Documentation preview 📚: https://cpython-previews--117113.org.readthedocs.build/
[`importlib.resources.abc.Traversable.joinpath`](https://docs.python.org/3.13/library/importlib.resources.abc.html#importlib.resources.abc.Traversable.joinpath) should mention that it can take multiple descendants. The versionchanged note should mention that some providers might still not support this. @jaraco, this was officially added in 3.11, right?...
# Bug report ### Bug description: Popped up in https://github.com/python/cpython/pull/117028/files and https://github.com/python/cpython/pull/117093/files ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ ### Linked PRs...
BPO | [37527](https://bugs.python.org/issue37527) --- | :--- Nosy | @pfmoore, @abalkin, @tjguk, @jleclanche, @zware, @zooba, @animalize, @ammaraskar, @pganssle, @Dschoni PRs | python/cpython#15498 *Note: these values reflect the state of the issue...
Python 3.8.10 datetime 4.4 Windows 10 datetime(1970,1,1,0,0,0).timestamp() # OSError: [Errno 22] Invalid argument datetime(1970,1,1,23,59,59,999999).timestamp() # OSError: [Errno 22] Invalid argument datetime(1970,1,2,0,59,59,999999).timestamp() # OSError: [Errno 22] Invalid argument Minimal datetime where...
# Bug report ### Bug description: ```python from typing import Any class C(Any): def __init__(self, v): ... C(0) # TypeError: object.__new__() takes exactly one argument (the type to instantiate) ```...
**Bug report** This is a continuation for the possible bug mentioned in issue https://github.com/python/cpython/issues/82236 which was closed because DonnyBrown, the submitter, didn't provide enough information. DonnyBrown was getting a FileNotFoundError...
BPO | [33408](https://bugs.python.org/issue33408) --- | :--- Nosy | @pfmoore, @ericvsmith, @giampaolo, @tjguk, @zware, @zooba, @graingert, @animalize, @filips123, @paulmon, @websurfer5 PRs | python/cpython#14823 *Note: these values reflect the state of the...
FWIW, I noticed that I had two torch directories under `/usr/local/lib/python3.10/dist-packages`: ``` torch-1.13.1+cu116.dist-info (the installed version) torch-1.12.1+cu116.dist-info (containing only an empty file REQUESTED) ``` `importlib_metadata.version("torch")` was retuning `None` in this...
Using `zipfile.Path` with a ZIP-file "in memory" as `io.BytesIO` instance. In that case attributes like `.filename()` or `.__str__()` do not work because they try to instanciate a `pathlib.Path()` with a...