CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

Fix deprecated Python practices - part 1 for Python 311 #747

Closed jsjiang closed 1 month ago

jsjiang commented 1 month ago

A few Deprecation Warnings were reported while testing EZID on Python 311. Fix these warnings.

Note: Running pylint and flake8 against the EZID project reported over 5K items. Use ticket #734 to resolve linter reported items.

python -Wd manage.py runserver
Performing system checks...

/Users/jjiang/my_dev_space/ezid-dev/ezid/impl/api.py:86: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
  import cgi
/Users/jjiang/my_dev_space/ezid-dev/ezid/impl/form_objects.py:75: DeprecationWarning: invalid escape sequence '\d'
  REGEX_4DIGITYEAR = '^(\d{4}|\(:unac\)|\(:unal\)|\(:unap\)|\(:unas\)|\(:unav\)|\
/Users/jjiang/my_dev_space/ezid-dev/ezid/impl/form_objects.py:77: DeprecationWarning: invalid escape sequence '\d'
  REGEX_GEOPOINT = '-?(\d+(\.\d*)?|\.\d+)$'
/Users/jjiang/my_dev_space/ezid-dev/ezid/ui_tags/templatetags/manage_form_tags.py:45: DeprecationWarning: invalid escape sequence '\>'
  + " \> "
System check identified no issues (0 silenced).
September 12, 2024 - 10:36:10
Django version 4.2.16, using settings 'settings.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
jsjiang commented 1 month ago

Fixes are released in v3.2.26.