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.8 #815

Open
tirkarthi opened this issue Feb 10, 2020 · 0 comments · May be fixed by #820
Open

Deprecation warning due to invalid escape sequences in Python 3.8 #815

tirkarthi opened this issue Feb 10, 2020 · 0 comments · May be fixed by #820

Comments

@tirkarthi
Copy link

Deprecation warnings are raised due to invalid escape sequences in Python 3.8 . Below is a log of the warnings raised during compiling all the python files. Using raw strings or escaping them will fix this issue.

find . -iname '*.py'  | xargs -P 4 -I{} python -Walways -m py_compile {}

./jieba/__init__.py:44: DeprecationWarning: invalid escape sequence \.
  re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U)
./jieba/__init__.py:46: DeprecationWarning: invalid escape sequence \s
  re_skip_default = re.compile("(\r\n|\s)", re.U)
./jieba/posseg/__init__.py:16: DeprecationWarning: invalid escape sequence \.
  re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)")
./jieba/posseg/__init__.py:17: DeprecationWarning: invalid escape sequence \.
  re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)")
./jieba/posseg/__init__.py:18: DeprecationWarning: invalid escape sequence \s
  re_skip_internal = re.compile("(\r\n|\s)")
./jieba/posseg/__init__.py:21: DeprecationWarning: invalid escape sequence \.
  re_num = re.compile("[\.0-9]+")
./jieba/finalseg/__init__.py:78: DeprecationWarning: invalid escape sequence \.
  re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)")
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

Successfully merging a pull request may close this issue.

1 participant