[BUG] DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious and fails to parse leap day.

未关闭
#3,293 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
backend

调研方向

首先,在所报告的 Dash 3.0.4 环境中使用 import dash 重现该警告,然后不要局限于所报告的 strptime 搜索,继续检查 repository,并查阅链接的 CPython issue。当导入 Dash 不再发出弃用警告时即表示完成,包括涉及闰日的日期。

由索引模型根据 Issue 内容生成。

描述

bug P3

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                           3.0.4

Describe the bug

When importing dash :

DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.
  import dash

Expected behavior

No deprecation warning should occur.
The surprising part is that when I search for "strptime" in the dash repository, Github doesn't return any result.

主要语言
Python
星标
24.5k
派生
2.3k
平均合并
3 天 7 小时
30 天内合并 PR
30

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

plotly/dash 的其他 Issue

查看 plotly/dash 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。