Skip to content
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

Deprecation warning due to invalid escape sequences in Python 3.7 #124

Open
tirkarthi opened this issue Apr 11, 2020 · 0 comments
Open

Deprecation warning due to invalid escape sequences in Python 3.7 #124

tirkarthi opened this issue Apr 11, 2020 · 0 comments

Comments

@tirkarthi
Copy link

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals.

find . -iname '*.py' | grep -v example | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} 
./teradata/util.py:311: DeprecationWarning: invalid escape sequence \*
  tokens = re.split("(--|'|\n|" + re.escape(delimiter) + "|\"|/\*|\*/)",
./teradata/util.py:356: DeprecationWarning: invalid escape sequence \*
  tokens = re.split("(--|'|" + re.escape(newline) + "|\"|/\*|\*/)",
./teradata/datatypes.py:38: DeprecationWarning: invalid escape sequence \d
  scalarIntervalRegEx = re.compile("^(-?)(\d+)$")
./teradata/datatypes.py:39: DeprecationWarning: invalid escape sequence \d
  yearToMonthIntervalRegEx = re.compile("^(-?)(\d+)-(\d+)$")
./teradata/datatypes.py:40: DeprecationWarning: invalid escape sequence \d
  dayToHourIntervalRegEx = re.compile("^(-?)(\d+) (\d+)$")
./teradata/datatypes.py:41: DeprecationWarning: invalid escape sequence \d
  dayToMinuteIntervalRegEx = re.compile("^(-?)(\d+) (\d+):(\d+)$")
./teradata/datatypes.py:42: DeprecationWarning: invalid escape sequence \d
  dayToSecondIntervalRegEx = re.compile("^(-?)(\d+) (\d+):(\d+):(\d+\.?\d*)$")
./teradata/datatypes.py:43: DeprecationWarning: invalid escape sequence \d
  hourToMinuteIntervalRegEx = re.compile("^(-?)(\d+):(\d+)$")
./teradata/datatypes.py:44: DeprecationWarning: invalid escape sequence \d
  hourToSecondIntervalRegEx = re.compile("^(-?)(\d+):(\d+):(\d+\.?\d*)$")
./teradata/datatypes.py:45: DeprecationWarning: invalid escape sequence \d
  minuteToSecondIntervalRegEx = re.compile("^(-?)(\d+):(\d+\.?\d*)$")
./teradata/datatypes.py:46: DeprecationWarning: invalid escape sequence \d
  secondIntervalRegEx = re.compile("^(-?)(\d+\.?\d*)$")
./teradata/datatypes.py:47: DeprecationWarning: invalid escape sequence \(
  periodRegEx1 = re.compile("\('(.*)',\s*'(.*)'\)")
./teradata/datatypes.py:48: DeprecationWarning: invalid escape sequence \(
  periodRegEx2 = re.compile("ResultStruct:PERIOD\(.*\)\[(.*),\s*(.*)\]")
./teradata/pulljson.py:76: DeprecationWarning: invalid escape sequence \[
  self.pattern = re.compile('([\[\]{}:\\\\",])')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant