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
Python 3.9 PytzUsageWarning #1013
Comments
is there a way to silence these warnings temporarily? |
Hi @viseshrp, I was able to temporarily silence these warnings with: import warnings
import dateparser
# Ignore dateparser warnings regarding pytz
warnings.filterwarnings(
"ignore",
message="The localize method is no longer necessary, as this time zone supports the fold attribute",
)
# Your code ... SO thread on filtering Python warnings: https://stackoverflow.com/a/56142903/6451879 For
|
Thanks! |
For some reason the # pyproject.toml
[tool.pytest.ini_options]
filterwarnings = ["ignore::pytz_deprecation_shim.PytzUsageWarning"] |
The asShape function is being deprecated in favor of shape. Please note that still warnings remain with respect to the dateparser package. For this we'll have to wait for an update of that package. (scrapinghub/dateparser#1013)
This occurs in 3.10 as well. |
Why we can't replace this dateparser/dateparser/date_parser.py Lines 33 to 37 in 4490ca6
with this
??? Definition of |
Hi, I suspect the cause of the issue is a change in
A second problem could be that Since even Python 3.6 has reached EOL in the meantime, I suggest dropping at least Python 3.5 support and implementing @bsekiewicz's suggestion. |
I realized |
I faced the same issue with dateparser. passing a timezone to the parse method solved that error for me. you can read all about the by this documentation https://pypi.org/project/dateparser/ |
You can also add a timezone in the string you're parsing as well. E.g. instead of |
Fixed by #1062 |
When upgrading to Python 3.9, getting the following warning:
Is there an anticipated fix for this or a way to suppress this?
Thanks!
The text was updated successfully, but these errors were encountered: