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

Import failing in 1.6.0 due to missing module #28

Closed
Artalus opened this issue Aug 24, 2022 · 2 comments · Fixed by #29
Closed

Import failing in 1.6.0 due to missing module #28

Artalus opened this issue Aug 24, 2022 · 2 comments · Fixed by #29
Assignees
Labels
bug Something isn't working

Comments

@Artalus
Copy link

Artalus commented Aug 24, 2022

❯ python3 -m venv venv
❯ . venv/bin/activate
❯ pip install meiga
Collecting meiga
  Downloading meiga-1.6.0-py3-none-any.whl (13 kB)
Installing collected packages: meiga
Successfully installed meiga-1.6.0
❯ python3
Python 3.10.5 (main, Aug  1 2022, 07:53:20) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from meiga import Error, Success, Failure, Result
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/mmm/venv/lib/python3.10/site-packages/meiga/__init__.py", line 3, in <module>
    from meiga import public_api
  File "/tmp/mmm/venv/lib/python3.10/site-packages/meiga/public_api.py", line 6, in <module>
    from . import decorators
  File "/tmp/mmm/venv/lib/python3.10/site-packages/meiga/decorators/__init__.py", line 1, in <module>
    from .meiga_decorator import meiga
  File "/tmp/mmm/venv/lib/python3.10/site-packages/meiga/decorators/meiga_decorator.py", line 4, in <module>
    from typing_extensions import ParamSpec
ModuleNotFoundError: No module named 'typing_extensions'

1.5.1 works fine:

❯ pip install meiga==1.5.1
Collecting meiga==1.5.1
  Downloading meiga-1.5.1-py3-none-any.whl (12 kB)
Installing collected packages: meiga
  Attempting uninstall: meiga
    Found existing installation: meiga 1.6.0
    Uninstalling meiga-1.6.0:
      Successfully uninstalled meiga-1.6.0
Successfully installed meiga-1.5.1
❯ python3
Python 3.10.5 (main, Aug  1 2022, 07:53:20) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from meiga import Error, Success, Failure, Result
>>> 

Broken on both python 3.10 and 3.9 (caught that one in CI), seemingly by #27 .

I presume like there should be an optional dependency typing-extensions for py < 3.10, and for 3.10 and above ParamSpec should be imported from typing instead - from my understanding, said typehint got merged from extensions into stdlib in 3.10 release.


FYI: if you look at the GHA run corresponding to #27 https://github.com/alice-biometrics/meiga/runs/7740328032?check_suite_focus=true , typing-extensions is actually installed there as a dependency of lume:

Run pip install lume
Collecting lume
  Using cached lume-0.9.2-py3-none-any.whl (33 kB)
...
Collecting typing-extensions>=3.7.4.3

This is how it leaked to production.

@acostapazo acostapazo self-assigned this Aug 24, 2022
@acostapazo acostapazo added the bug Something isn't working label Aug 24, 2022
@acostapazo
Copy link
Contributor

You are absolutely right, the lume dev dependency was masking this incorrect behaivor.

In the linked PR I've been able to reproduce your reported error:

https://github.com/alice-biometrics/meiga/actions/runs/2921291258

Then I solved the problem based in what you proposed.

In addition, I have also added to the test array the python 3.11-dev version: 😄

https://github.com/alice-biometrics/meiga/actions/runs/2921441564

Thanks again for this bug report! 🥇

@acostapazo
Copy link
Contributor

New version available https://github.com/alice-biometrics/meiga/releases/tag/v1.6.1

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

Successfully merging a pull request may close this issue.

2 participants