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

overlayfs requires python3.10+ #38

Closed
ap-- opened this issue Jul 7, 2024 · 0 comments · Fixed by #39
Closed

overlayfs requires python3.10+ #38

ap-- opened this issue Jul 7, 2024 · 0 comments · Fixed by #39

Comments

@ap--
Copy link
Contributor

ap-- commented Jul 7, 2024

Hello everyone,

I noticed that the morefs package requires python3.8+ but overlayfs isn't 3.8 and 3.9 compatible:

❯ python3.8 -m venv venv38
❯ source venv38/bin/activate
❯ pip install morefs
...
Successfully installed fsspec-2024.6.1 morefs-0.2.1

❯ python -c "import fsspec; fsspec.get_filesystem_class('overlayfs')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/poehlmann/morefs_err/venv38/lib/python3.8/site-packages/fsspec/registry.py", line 242, in get_filesystem_class
    register_implementation(protocol, _import_class(bit["class"]))
  File "/home/poehlmann/morefs_err/venv38/lib/python3.8/site-packages/fsspec/registry.py", line 277, in _import_class
    mod = importlib.import_module(mod)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/poehlmann/morefs_err/venv38/lib/python3.8/site-packages/morefs/overlay.py", line 9, in <module>
    class OverlayFileSystem(fsspec.AbstractFileSystem):  # pylint: disable=abstract-method
  File "/home/poehlmann/morefs_err/venv38/lib/python3.8/site-packages/morefs/overlay.py", line 81, in OverlayFileSystem
    info = _iterate_fs_with("info")  # pylint: disable=no-value-for-parameter
TypeError: 'staticmethod' object is not callable

It works for python3.10+

❯ python3.10 -m venv venv310
❯ source venv310/bin/activate
❯ pip install morefs
...
Successfully installed fsspec-2024.6.1 morefs-0.2.1

❯ python -c "import fsspec; fsspec.get_filesystem_class('overlayfs')"

The staticmethod behavior changed in Python3.10: python/cpython#87848

I'll prepare a PR right away.

-Andreas

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

Successfully merging a pull request may close this issue.

1 participant