thisisparker / xword-dl

⬛⬜⬛ Command line tool to scrape crosswords from online solvers and save them as .puz files ⬛⬜⬛
MIT License
147 stars 32 forks source link

Usage warning: PytzUsageWarning: The localize method is no longer necessary #53

Closed WyrdByWord closed 2 years ago

WyrdByWord commented 2 years ago

Receiving this warning when I download. Not sure if this is a code thing or a configuration thing on my side? I

/usr/local/lib/python3.10/site-packages/dateparser-1.0.0-py3.10.egg/dateparser/date_parser.py:35: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  date_obj = stz.localize(date_obj)
edsantiago commented 2 years ago

I fixed all warnings via

diff --git a/requirements.txt b/requirements.txt
index bae181a..b0eb7f4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,9 @@                                                                
 beautifulsoup4==4.9.3
 bs4==0.0.1
-dateparser==1.0.0
+dateparser==1.1.1
 html2text==2020.1.16
 puzpy==0.2.5
 requests==2.26
 Unidecode==1.2.0
 pyyaml==5.4.1
+tzlocal==2.1
thisisparker commented 2 years ago

Nice catch. Probably time pretty soon to go through and bump dependency versions, which could also fix the regex issue some folks have encountered.

thisisparker commented 2 years ago

Fixed with the latest version!