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

Python 3.10 drops parser module #437

Open
sanjayankur31 opened this issue Dec 8, 2020 · 3 comments
Open

Python 3.10 drops parser module #437

sanjayankur31 opened this issue Dec 8, 2020 · 3 comments

Comments

@sanjayankur31
Copy link

Just a note: Python 3.10 no longer includes the parser module:
https://bugs.python.org/issue40939

It's used in python/moose/utils.py.

I'm not yet sure what is to be done here, what replaces it, so I'm only filing this as an FYI. I'll try to open a PR when I learn what needs to be done.

Here's the downstream NeuroFedora bug for reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1899115

@dilawar
Copy link
Contributor

dilawar commented Dec 8, 2020

I think the parser module was replaced by ast. It should be a quick fix. I'll wait till my other pending PRs get merged. Total blackout on those PRs. 👎🏽.

dilawar added a commit to dilawar/pymoose-community that referenced this issue Feb 7, 2021
- Fixes to issue BhallaLab#437
- Fixes to issues reported by mypy
@dilawar
Copy link
Contributor

dilawar commented Feb 9, 2021

You can safely detect the function which uses parser module. It is not used anywhere. The new release will get rid of this function and import.

@opoplawski
Copy link

Just removing tweak_field (and thus the parser import) is not sufficient:

 5/13 Test  #5: test_neuroml .....................***Failed    0.61 sec
/home/orion/fedora/moose/moose-core-3.1.5/redhat-linux-build/python/moose/utils.py:99: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(token) is 0:
Traceback (most recent call last):
  File "/home/orion/fedora/moose/moose-core-3.1.5/tests/python/test_neuroml.py", line 21, in <module>
    from neuroml.FvsI_CA1 import ca1_main, loadModel
  File "/home/orion/fedora/moose/moose-core-3.1.5/tests/python/neuroml/FvsI_CA1.py", line 22, in <module>
    from moose.neuroml.NeuroML import NeuroML
  File "/home/orion/fedora/moose/moose-core-3.1.5/redhat-linux-build/python/moose/neuroml/__init__.py", line 1, in <module>
    from .NeuroML import NeuroML, loadNeuroML_L123
  File "/home/orion/fedora/moose/moose-core-3.1.5/redhat-linux-build/python/moose/neuroml/NeuroML.py", line 48, in <module>
    from moose.utils import *
  File "/home/orion/fedora/moose/moose-core-3.1.5/redhat-linux-build/python/moose/utils.py", line 18, in <module>
    import symbol
ModuleNotFoundError: No module named 'symbol'

However, just removing the symbol import seems to work for that.

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

3 participants