8000 Fix collections ABCs deprecation warning by hugovk · Pull Request #16 · pyparsing/pyparsing · GitHub
[go: up one dir, main page]

Skip to content

Fix collections ABCs deprecation warning #16

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

Merged
merged 1 commit into from
Aug 21, 2018
Merged

Conversation

hugovk
Copy link
Contributor
@hugovk hugovk commented Aug 9, 2018

Fixes https://sourceforge.net/p/pyparsing/bugs/106/.

With Python 3.7, I'm getting:

/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:943: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  collections.MutableMapping.register(ParseResults)
/usr/local/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:3245: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  elif isinstance( exprs, collections.Iterable ):

This PR fixes it.

The tests pass for me on macOS High Sierra with Python 2.7 and 3.7:

⌂107% [hugo:/tmp/pyparsing] patch-2 ± python2 unitTests.py
Beginning test of pyparsing, version 2.2.0
Python version 2.7.15 (default, Jun 17 2018, 12:46:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
...............................................................................................................................................................
----------------------------------------------------------------------
Ran 159 tests in 3.310s

OK
⌂111% [hugo:/tmp/pyparsing] patch-2 4s ± python3 unitTests.py
Beginning test of pyparsing, version 2.2.0
Python version 3.7.0 (default, Jun 29 2018, 20:13:13)
[Clang 9.1.0 (clang-902.0.39.2)]
...............................................................................................................................................................
----------------------------------------------------------------------
Ran 159 tests in 3.685s

OK

@ptmcg
Copy link
Member
ptmcg commented Aug 21, 2018

Can this be submitted to TravisCI for verification? Looks like the PR predates my TravisCI integration.

@hugovk
Copy link
Contributor Author
hugovk commented Aug 21, 2018

Yes, will rebase the branch on master.

@hugovk
Copy link
Contributor Author
hugovk commented Aug 21, 2018

And the CI is green!

@ptmcg ptmcg merged commit 23e0fee into pyparsing:master Aug 21, 2018
@hugovk hugovk deleted the patch-2 branch August 21, 2018 13:55
@jleclanche
Copy link

Any chance for a release with this commit soon? The deprecation warning is very noisy in 3.7, and it doesn't sound like there's anything big blocking a release right now.

@llamicron
Copy link

Just came across this issue. I have a fresh virtualenv, packages below. Very annoying. I see this change has been merged but it's still popping up even though I have the latest version.

Package        Version
-------------- -------
atomicwrites   1.2.1
attrs          18.2.0
Click          7.0
Flask          1.0.2
itsdangerous   1.1.0
Jinja2         2.10
MarkupSafe     1.1.0
more-itertools 5.0.0
pip            19.0.1
pluggy         0.8.1
py             1.7.0
pyparsing      2.3.1
pytest         4.1.1
setuptools     40.7.1
six            1.12.0
Werkzeug       0.14.1
wheel          0.32.3

@ptmcg
Copy link
Member
ptmcg commented Jan 30, 2019

It looks like this is coming from the vendored copy of pyparsing in pkg-resources, which gets loaded with setuptools. I just looked at my environment, and I had the old pkg-resources until I pip updated setuptools, and now I have the necessary vendored version (pyparsing 2.2.1). Try reinstalling setuptools, and then check the vendored version of pyparsing in pkg-resources.

honzajavorek added a commit to honzajavorek/Frozen-Flask that referenced this pull request Mar 13, 2020
honzajavorek added a commit to honzajavorek/Frozen-Flask that referenced this pull request Nov 26, 2020
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 this pull request may close these issues.

5 participants
0