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

Issues with nearley on Python-3-only systems #501

Closed
wiene opened this issue Dec 23, 2019 · 2 comments
Closed

Issues with nearley on Python-3-only systems #501

wiene opened this issue Dec 23, 2019 · 2 comments

Comments

@wiene
Copy link
Contributor

wiene commented Dec 23, 2019

I am trying to use lark on a Python-3-only system. During these tests I stumbled across the following issue: lark/tools/nearley.py depends on js2py and I am not able to make js2py work with Python 3 (I get a unit test failure, see PiotrDabkowski/Js2Py#185). The js2py author announced Python 3 support some time ago but the issue seems to persist.

Given the imminent end-of-life of Python 2 and the ongoing removal of Python 2 from Linux distributions (see e. g. the Debian plans and the Fedora schedule) what are your plans for dealing with the mentioned js2py dependence?

@erezsh
Copy link
Member

erezsh commented Dec 23, 2019

From the js2py page:

Supports Python 2 & 3.

So you should hold them to their claim.

Given the imminent end-of-life of Python 2

Python2 will not stop being usable in the foreseeable future. It may not arrive on linux by default, but I'm guessing you can still apt install or yum install it for the next decade.

However, if you have a suggestion for a better replacement to js2py, I'm willing to consider it.

Either way, it won't affect Lark, as js2py is only an optional dependency and isn't required for anything but Nearley conversions, which honestly aren't too difficult to do by hand.

@wiene
Copy link
Contributor Author

wiene commented Dec 23, 2019

Python2 will not stop being usable in the foreseeable future. It may not arrive on linux by default, but I'm guessing you can still apt install or yum install it for the next decade.

Reading https://lists.debian.org/debian-python/2019/11/msg00038.html I am not so sure whether this will be the case but we will see.

However, if you have a suggestion for a better replacement to js2py, I'm willing to consider it.

Unfortunately I do not have a good suggestion. That is why I was asking.

Either way, it won't affect Lark, as js2py is only an optional dependency and isn't required for anything but Nearley conversions, which honestly aren't too difficult to do by hand.

Only now I realise that since the last release (0.7.8) the fact that this dependency is optional is also reflected in the test suite.

@wiene wiene closed this as completed Dec 23, 2019
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

No branches or pull requests

2 participants