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

Update pyparsing requires lock to be more strict #275

Merged
merged 1 commit into from Nov 28, 2021

Conversation

KevinMFong
Copy link
Contributor

Summary

Update pyparsing install_requires lock in setup.py to be more strict and prevent installing pyparsing>=3 when installing pyhocon.

The recent pyparsing v3 release dropped support for Python 3.5. Without this change, running pyhocon on Python 3.5 can result in SyntaxError errors.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.154% when pulling 39f79e2 on KevinMFong:requirements into 0918300 on chimpler:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.154% when pulling 39f79e2 on KevinMFong:requirements into 0918300 on chimpler:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.154% when pulling 39f79e2 on KevinMFong:requirements into 0918300 on chimpler:master.

@darthbear darthbear merged commit 2efdb40 into chimpler:master Nov 28, 2021
@darthbear
Copy link
Member

Thank you @KevinMFong for your PR!

@KevinMFong
Copy link
Contributor Author

No problem, thanks for maintaining this package!

@KevinMFong KevinMFong deleted the requirements branch November 28, 2021 04:13
@immortalyash
Copy link

immortalyash commented Nov 30, 2021

breaks compatibility while installing with Python2.7 and pip==20.1.1

Can you use pyparsing>=2.0.0,<3 instead?

Error:

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ZN7btg/pyhocon/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ZN7btg/pyhocon/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-iAh70E
         cwd: /tmp/pip-install-ZN7btg/pyhocon/
    Complete output (1 lines):
    error in pyhocon setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

@immortalyash
Copy link

@scottj97
Copy link
Contributor

As the failing CI in #276 shows, there is an additional problem with pyparsing 3.0 (in addition to the SyntaxError on 3.5).

@sbachstein
Copy link

sbachstein commented Jan 31, 2022

As another addition to this: Since the release of pyparsing==3.0.7 the following HOCON will not parse and exit with a pyparsing exception, using either pyhocon==0.3.58 (or pyhocon==0.3.59 with pyparsing replaced with the latest 3.0.7):

a = 1
w = 2

Exception

pyparsing.exceptions.ParseException: Expected end of text, found '='  (at char 8), (line:2, col:3)

It seems to be related to the time period keywords. So apparently the issue occurs because the line break between the assignments is interpreted as a white space, resulting in it being read as a = 1 w(eek) [...] where the following = obviously does not make sense anymore.

The issue seems to be known on pyparsing side: pyparsing/pyparsing#359

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.

None yet

6 participants