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

AttributeError with Python 3.8 #56

Closed
dagardner-nv opened this issue Dec 1, 2023 · 4 comments · Fixed by #60
Closed

AttributeError with Python 3.8 #56

dagardner-nv opened this issue Dec 1, 2023 · 4 comments · Fixed by #60
Labels

Comments

@dagardner-nv
Copy link

I get an AttributeError with Python 3.8, but not with 3.10.

Repro:

conda create -n rdfg_test python=3.8
conda activate rdfg_test
pip install rapids-dependency-file-generator
rapids-dependency-file-generator --help

Error:

Traceback (most recent call last):
  File "/home/dagardner/work/conda/envs/rdfg_test/bin/rapids-dependency-file-generator", line 5, in <module>
    from rapids_dependency_file_generator.cli import main
  File "/home/dagardner/work/conda/envs/rdfg_test/lib/python3.8/site-packages/rapids_dependency_file_generator/cli.py", line 12, in <module>
    from .rapids_dependency_file_validator import validate_dependencies
  File "/home/dagardner/work/conda/envs/rdfg_test/lib/python3.8/site-packages/rapids_dependency_file_generator/rapids_dependency_file_validator.py", line 12, in <module>
    importlib.resources.files(__package__).joinpath("schema.json").read_bytes()
AttributeError: module 'importlib.resources' has no attribute 'files'
@vyasr
Copy link
Contributor

vyasr commented Dec 12, 2023

Our pyproject.toml should probably be updated to specify that we require Python 3.9. The function in question was introduced in Python 3.9. Is Python 3.8 support important to you (i.e. is it particularly valuable for us to find a way to rewrite that code to support Python 3.8)? FWIW RAPIDS now requires 3.9 which is probably why none of the devs are seeing this issue.

@dagardner-nv
Copy link
Author

@vyasr Python 3.8 isn't important to me, I mostly ran into this issue by accident as 3.8 is the default Python version my OS uses.

Once I realized it was working in 3.10 but not 3.8 I went back to check the minimum version on pypi and noticed 3.8 was listed as the minimum.

@vyasr
Copy link
Contributor

vyasr commented Dec 13, 2023

Cool. I've opened a PR to update the minimum required version. Thanks for the ping!

@vyasr vyasr closed this as completed in #60 Dec 13, 2023
vyasr added a commit that referenced this issue Dec 13, 2023
ajschmidt8 pushed a commit that referenced this issue Dec 13, 2023
## [1.7.3](v1.7.2...v1.7.3) (2023-12-13)

### Bug Fixes

* Update required Python version ([#60](#60)) ([50ae49d](50ae49d)), closes [#56](#56)
@ajschmidt8
Copy link
Member

🎉 This issue has been resolved in version 1.7.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

difyrrwrzd added a commit to difyrrwrzd/dependency-file-generator that referenced this issue Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants