pusher / pusher-http-python

Pusher Channels HTTP API library for Python
https://pusher.com/docs/server_api_guide
MIT License
375 stars 112 forks source link

Deprecation warning due to invalid escape sequences #163

Closed tirkarthi closed 3 years ago

tirkarthi commented 4 years ago

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -Ev 'vendor|example|doc|tools|sphinx' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./pusher/util.py:15: DeprecationWarning: invalid escape sequence \A
  channel_name_re = re.compile('\A[-a-zA-Z0-9_=@,.;]+\Z')
./pusher/util.py:16: DeprecationWarning: invalid escape sequence \A
  app_id_re = re.compile('\A[0-9]+\Z')
./pusher/util.py:17: DeprecationWarning: invalid escape sequence \A
  pusher_url_re = re.compile('\A(http|https)://(.*):(.*)@(.*)/apps/([0-9]+)\Z')
./pusher/util.py:18: DeprecationWarning: invalid escape sequence \A
  socket_id_re = re.compile('\A\d+\.\d+\Z')