Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ThatIsAPseudo opened this issue Apr 27, 2025 · 4 comments
Labels
bug something broken P3 backlog

Comments

@ThatIsAPseudo
Copy link

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.

@T4rk1n
Copy link
Contributor

T4rk1n commented Apr 28, 2025

I don't think we actually use any date stuff directly beside our tests. Was there any more output below the import dash and what was the Python version ?

@ThatIsAPseudo
Copy link
Author

Here is the whole script :

Python 3.13.3 | packaged by conda-forge | (main, Apr 14 2025, 20:44:30) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dash
<python-input-0>:1: 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.
>>>

@T4rk1n
Copy link
Contributor

T4rk1n commented Apr 29, 2025

I cannot reproduce, maybe you have something else in your environment that is triggering the warning.

Do you have any dash_hooks plugin?
What is inside the dash module? (can run dir(dash) to find out)

@ThatIsAPseudo
Copy link
Author

Here is the output of dir(dash)
I have indeed _hooks and hooks

>>> dir(dash)
['ALL', 'ALLSMALLER', 'CeleryManager', 'ClientsideFunction', 'Dash', 'DiskcacheManager', 'Input', 'MATCH', 
'Output', 'Patch', 'State', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', 
'__package__', '__path__', '__plotly_dash', '__spec__', '__version__', '_callback', '_callback_context', '_configs', 
'_dash_renderer', '_get_app', '_get_paths', '_grouping', '_hooks', '_jupyter', '_jupyter_nbextension_paths', 
'_obsolete', '_pages', '_patch', '_utils', '_validate', '_watch', 'background_callback', 'callback', 'callback_context', 
'clientside_callback', 'ctx', 'dash', 'dash_table', 'dcc', 'dependencies', 'development', 'exceptions', 'fingerprint', 
'get_app', 'get_asset_url', 'get_relative_path', 'hooks', 'html', 'jupyter_dash', 'no_update', 'page_container', 
'page_registry', 'register_page', 'resources', 'set_props', 'strip_relative_path', 'types', 'version']

@gvwilson gvwilson added bug something broken P3 backlog labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

3 participants