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

tox version consistency check fails #3

Closed
fruzsinaagocs opened this issue Feb 14, 2023 · 3 comments
Closed

tox version consistency check fails #3

fruzsinaagocs opened this issue Feb 14, 2023 · 3 comments

Comments

@fruzsinaagocs
Copy link

Thanks for developing this package!

I'm experiencing an issue when I do

git clone github.com/karlotness/adrt
cd adrt
pip install .
tox

I get the following error:

checkver: commands[1]> .tox/checkver/bin/python tools/version_consistency.py
Traceback (most recent call last):
  File "/mnt/home/fagocs/adrt/tools/version_consistency.py", line 230, in <module>
    var_version = find_package_version("src/adrt/__init__.py")
  File "/mnt/home/fagocs/adrt/tools/version_consistency.py", line 116, in find_package_version
    ver_str = ast.literal_eval(match.group("ver"))
  File "/mnt/sw/nix/store/yqdbin1s849dd3n2p1hppkiqn6b64c34-python-3.9.12-view/lib/python3.9/ast.py", line 62, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/mnt/sw/nix/store/yqdbin1s849dd3n2p1hppkiqn6b64c34-python-3.9.12-view/lib/python3.9/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    "1.0.1.dev"
IndentationError: unexpected indent
checkver: exit 1 (0.41 seconds) /mnt/home/fagocs/adrt> .tox/checkver/bin/python tools/version_consistency.py pid=3443432
checkver: FAIL ✖ in 1.91 seconds

I'm using

  • Python 3.9.12 (and whatever ast version this comes with)
  • tox 4.4.5
  • adrt 1.0.1dev
  • (numpy 1.24.2)
karlotness added a commit that referenced this issue Feb 14, 2023
This should fix issues with Python 3.9's ast parsing which interpreted
leading spaces as invalid indentation. See issue #3 for more details.
@karlotness
Copy link
Owner

Thanks for the report, I did manage to reproduce the same issue with Python 3.9.16. I guess I had mostly been running that script on 3.10 and hadn't seen that issue.

I think it should be fixed now on the joss branch, if you're able to give that a try. If the issue is still there, please let me know and I'll dig into it some more.

@fruzsinaagocs
Copy link
Author

Thanks, it works now on the joss branch!

@karlotness
Copy link
Owner

Great, glad to hear it. Thanks again for the report!

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