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

Upgrade vendored PyParsing from 2.1.10 to 2.2.0 #1450

Merged
merged 2 commits into from Aug 17, 2018

Conversation

Projects
None yet
3 participants
@hugovk
Contributor

hugovk commented Aug 9, 2018

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.

  • 2.1.10 was released on Oct 7, 2016
  • 2.2.0 was released on Mar 6, 2017

https://pypi.org/project/pyparsing/#history

Upgrading means these deprecation warnings are fixed:

/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:147: DeprecationWarning: invalid escape sequence \d
  xmlcharref = Regex('&#\d+;')
/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:832: DeprecationWarning: invalid escape sequence \d
  """
/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:2736: DeprecationWarning: invalid escape sequence \d
  """
/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:2914: DeprecationWarning: invalid escape sequence \g
  ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)

Pull Request Checklist

  • Changes have tests: existing tests still pass
  • News fragment added in changelog.d. See documentation for details
@winash12

This comment has been minimized.

winash12 commented Aug 9, 2018

I upgraded PyParsing to 2.2.0 and these warnings still persist.

@hugovk

This comment has been minimized.

Contributor

hugovk commented Aug 9, 2018

@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
  """

@hugovk hugovk referenced this pull request Aug 9, 2018

Merged

Upgrade vendored appdirs from 1.4.0 to 1.4.3 #1451

2 of 2 tasks complete
@winash12

This comment has been minimized.

winash12 commented Aug 9, 2018

I downloaded PyParsing 2.2.0 and I installed it in the following way
python3.6 setup.py install as root.

Then I ran my script and I got those warnings.

@hugovk

This comment has been minimized.

Contributor

hugovk commented Aug 9, 2018

@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.

@winash12

This comment has been minimized.

winash12 commented Aug 9, 2018

/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
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/appdirs.py:235: DeprecationWarning: invalid escape sequence \P
/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
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/appdirs.py:235: DeprecationWarning: invalid escape sequence \P
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:147: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:832: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:2736: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:2914: DeprecationWarning: invalid escape sequence \g
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:147: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:832: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/python3.6/dist-packages/setuptools-40.0.0-py3.6.egg/pkg_resources/_vendor/pyparsing.py:2736: DeprecationWarning: invalid escape sequence \d
/usr/local/lib/p

@hugovk

This comment has been minimized.

Contributor

hugovk commented Aug 9, 2018

@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

@winash12

This comment has been minimized.

winash12 commented Aug 9, 2018

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 ?

@hugovk

This comment has been minimized.

Contributor

hugovk commented Aug 9, 2018

Let's wait for review from a project member :)

@pganssle

This comment has been minimized.

Member

pganssle commented Aug 17, 2018

Regardless of the warnings, the tests pass and I see no reason not to upgrade this. Merging.

@pganssle pganssle merged commit 336ff3a into pypa:master Aug 17, 2018

5 checks passed

codecov/patch Coverage not affected when comparing e0433cf...306d77a
Details
codecov/project 81.17% remains the same compared to e0433cf
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@hugovk hugovk deleted the hugovk:upgrade-pyparsing branch Aug 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment