klahnakoski / mo-parsing

fork of pyparsing
MIT License
3 stars 2 forks source link

Likely broken on python 3.9, due to s/collections/collections.abc change #21

Closed mafrosis closed 3 years ago

mafrosis commented 3 years ago
/usr/local/lib/python3.8/site-packages/mo_parsing/infix.py:4: DeprecationWarning: Using or importing 
the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in
3.9 it will stop working
klahnakoski commented 3 years ago

Thank you for this report. I was unable to to get the depreciation warning, but I am familiar with it, and I expect it should show. I believe my development environment may be suppressing it. I fixed the import for now, and will look into why I did not see it.

klahnakoski commented 3 years ago

https://docs.python.org/3/using/cmdline.html#cmdoption-w

klahnakoski commented 3 years ago

The -wdefault argument shows the problem on master

C:\Users\kyle\code\mo-parsing>c:\Python39\python.exe -Wdefault
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mo_parsing
C:\Users\kyle\code\mo-parsing\mo_parsing\core.py:408: DeprecationWarning: invalid escape sequence \g
  """
C:\Users\kyle\code\mo-parsing\mo_parsing\infix.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Iterable
>>> exit()

C:\Users\kyle\code\mo-parsing>c:\Python39\python.exe
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mo_parsing
>>> exit()
klahnakoski commented 3 years ago

The -Werror to the smoke test run before deployment so this does not happen again.