`_utcfromtimestamp` is undefined in `datetimetester`
Aberta
@sobolevn já está trabalhando nisso.
Desde 8/6/2024.
tests
type-bug
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Avaliação
Esta issue ainda não foi avaliada.