purcell / airspeed

A lightweight Python template engine compatible with Velocity, used in OpenStack
Other
91 stars 37 forks source link

Deprecation warning due to invalid escape sequences. #44

Closed tirkarthi closed 4 years ago

tirkarthi commented 4 years ago

Deprecation warning due to invalid escape sequences. Using raw strings or escaping them again helps in resolving this. Check https://github.com/asottile/pyupgrade/ for automatic fix of this.

find . -iname '*.py' | grep -Ev 'rdf4|doc|benchmark|tool' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./airspeed/__init__.py:628: DeprecationWarning: invalid escape sequence \.
  DOT = re.compile('\.(.*)', re.S)
./airspeed/__init__.py:753: DeprecationWarning: invalid escape sequence \*
  '#(?:#.*?(?:\n|$)|\*.*?\*#(?:[ \t]*\n)?)(.*)$',
purcell commented 4 years ago

Thanks for the heads-up. Want to submit a fix?

purcell commented 4 years ago

(Or is it only those 2 occurrences?)

tirkarthi commented 4 years ago

Sure, yes only 2 occurrences. I have created #46 .