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

importlib.metadata not available in python 3.6 #20

Closed
beckern-ibm opened this issue Apr 29, 2022 · 4 comments
Closed

importlib.metadata not available in python 3.6 #20

beckern-ibm opened this issue Apr 29, 2022 · 4 comments

Comments

@beckern-ibm
Copy link

Running into this issue on python 3.6. Apparently importlib.metadata was added in python 3.8.

  ...
  File "/home/nick/.local/lib/python3.6/site-packages/tnz/ati.py", line 3657, in set
    return ati.set(name, value, xtern=xtern, trace=trace)
  File "/home/nick/.local/lib/python3.6/site-packages/tnz/ati.py", line 1663, in set
    self.display = value
  File "/home/nick/.local/lib/python3.6/site-packages/tnz/ati.py", line 2979, in display
    from . import zti
  File "/home/nick/.local/lib/python3.6/site-packages/tnz/zti.py", line 51, in <module>
    from importlib.metadata import entry_points
ModuleNotFoundError: No module named 'importlib.metadata'
@najohnsn
Copy link
Member

Thank you!

Not sure if it's what you expect... but my first reaction is to bump up the requirement to Python 3.8.

@beckern-ibm
Copy link
Author

Given that the tnz documentation says that python 3.6 is the minimum required version to use the package, it's not quite what I expected.

Requiring python 3.8 would be one option, but I did some digging and it looks like they created a compatibility module called importlib_metadata for python releases where importlib.metadata isn't available. I created a pull request (#21) for a possible workaround that would fallback to the compatibility module if importlib.metadata fails to import. I tested it using python 3.6 and it seems to resolve the issue. Let me know what you think.

@najohnsn
Copy link
Member

Side note: importlib is very annoying - see #17

@najohnsn
Copy link
Member

najohnsn commented May 6, 2022

Fixed by #23

@najohnsn najohnsn closed this as completed May 6, 2022
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