Upgrade vendored PyParsing from 2.1.10 to 2.2.0#1450
Conversation
|
I upgraded PyParsing to 2.2.0 and these warnings still persist. |
|
@winash12 How did you upgrade PyParsing? What did you run to check the warnings? Here's one way: master$ python3 --version
Python 3.7.0
$ find . -name \*.py | xargs python3 -Wall -m py_compile
./setuptools/_vendor/pyparsing.py:147: DeprecationWarning: invalid escape sequence \d
xmlcharref = Regex('&#\d+;')
./setuptools/_vendor/pyparsing.py:832: DeprecationWarning: invalid escape sequence \d
"""
./setuptools/_vendor/pyparsing.py:2736: DeprecationWarning: invalid escape sequence \d
"""
./setuptools/_vendor/pyparsing.py:2914: DeprecationWarning: invalid escape sequence \g
ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
./pkg_resources/_vendor/appdirs.py:130: DeprecationWarning: invalid escape sequence \D
"""
./pkg_resources/_vendor/appdirs.py:235: DeprecationWarning: invalid escape sequence \P
"""
./pkg_resources/_vendor/pyparsing.py:147: DeprecationWarning: invalid escape sequence \d
xmlcharref = Regex('&#\d+;')
./pkg_resources/_vendor/pyparsing.py:832: DeprecationWarning: invalid escape sequence \d
"""
./pkg_resources/_vendor/pyparsing.py:2736: DeprecationWarning: invalid escape sequence \d
"""
./pkg_resources/_vendor/pyparsing.py:2914: DeprecationWarning: invalid escape sequence \g
ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)This PR$ python3 --version
Python 3.7.0
find . -name \*.py | xargs python3 -Wall -m py_compile
./pkg_resources/_vendor/appdirs.py:130: DeprecationWarning: invalid escape sequence \D
"""
./pkg_resources/_vendor/appdirs.py:235: DeprecationWarning: invalid escape sequence \P
""" |
|
I downloaded PyParsing 2.2.0 and I installed it in the following way Then I ran my script and I got those warnings. |
|
@winash12 Please paste your output. Setuptools doesn't use PyParsing from the usual install location, but packages its own. You can replace your file at something like /usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py with the one in this PR. |
|
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/appdirs.py:130: DeprecationWarning: invalid escape sequence \D |
|
@winash12 Please replace your file at /usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/appdirs.py with the one from this PR: https://raw.githubusercontent.com/pypa/setuptools/306d77a044a20e58f2a786da31b6061fabd1f44a/pkg_resources/_vendor/pyparsing.py |
|
Yes I got that but I do not have that directory under /usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg The file etuptools-40.0.0-py3.6.egg is not a directory. Should I download setuptools and reinstall on my own ? |
|
Let's wait for review from a project member :) |
|
Regardless of the warnings, the tests pass and I see no reason not to upgrade this. Merging. |
Summary of changes
Fixes the first part of #1095 and #1450 (see #1451 for the second part).
Upgrade vendored PyParsing from 2.1.10 to 2.2.0.
https://pypi.org/project/pyparsing/#history
Upgrading means these deprecation warnings are fixed:
Pull Request Checklist