`_utcfromtimestamp` is undefined in `datetimetester`
Open
@sobolevn is already working on this.
Since Jun 8, 2024.
tests
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
This code cannot run correctly:
Because _utcfromtimestamp is not defined anywhere.
Introduced in https://github.com/python/cpython/commit/38dc3f28dde92b4fa6284a57f4e554991a3d9276 by @pganssle
I think that this is a typo, I will send a PR.
This was introduced when datetime.utcfromtimestamp was deprecated, I propose to use a direct alternative: datetime.fromtimestamp(t, datetime.UTC)
This problem is not detected by tests, because this looks like a in-test helper for module maintainers. It is not used as of right now.
Linked PRs
- gh-120267
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.