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

len8 doesn't run on Python 3.8 #13

Closed
Jonxslays opened this issue Nov 8, 2021 · 0 comments
Closed

len8 doesn't run on Python 3.8 #13

Jonxslays opened this issue Nov 8, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Jonxslays
Copy link
Collaborator

Describe the bug

len8 does not appear to run properly on python 3.8, I have not tested on versions lower than that. I'm not 100% sure if this is a usage issue on our end, or something else.

The error is as follows:

nox > len8 -l yami tests
Traceback (most recent call last):
  File "/home/runner/work/Yami/Yami/.nox/formatting/bin/len8", line 8, in <module>
    sys.exit(main())
  File "/home/runner/work/Yami/Yami/.nox/formatting/lib/python3.8/site-packages/len8/__main__.py", line 44, in main
    checker.check(*parser.paths)
  File "/home/runner/work/Yami/Yami/.nox/formatting/lib/python3.8/site-packages/len8/models/checker.py", line 210, in check
    self._check_dir(p)
  File "/home/runner/work/Yami/Yami/.nox/formatting/lib/python3.8/site-packages/len8/models/checker.py", line 145, in _check_dir
    self._check_file(p)
  File "/home/runner/work/Yami/Yami/.nox/formatting/lib/python3.8/site-packages/len8/models/checker.py", line 140, in _check_file
    if self._is_valid(path):
  File "/home/runner/work/Yami/Yami/.nox/formatting/lib/python3.8/site-packages/len8/models/checker.py", line 134, in _is_valid
    if path.is_relative_to(e):
AttributeError: 'PosixPath' object has no attribute 'is_relative_to'
nox > Command len8 -l yami tests failed with exit code 1

To Reproduce

Using python 3.8:

pip install len8
len8 .

Expected behavior

len8 will run successfully, but it does not.

System Information:

  • OS:
    • Ubuntu 20.04.3 LTS
    • Mac OS X 10.15.7
    • Windows server 2019 10.0.17763
  • Python Version: 3.8.12
  • len8 Version: 0.4.0

Additional context
It appears this is specifically related to the changes we made to the filter to use Path.is_relative_to.
A link to my failed CI run can be found here.

@Jonxslays Jonxslays added the pending investigation Still needs looking into label Nov 8, 2021
@Jonxslays Jonxslays added bug Something isn't working and removed pending investigation Still needs looking into labels Nov 8, 2021
@Jonxslays Jonxslays changed the title Bug Report len8 doesn't run on Python 3.8 Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants