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

importerror since 1.0.0 #24

Closed
veenstrajelmer opened this issue Nov 16, 2023 · 4 comments
Closed

importerror since 1.0.0 #24

veenstrajelmer opened this issue Nov 16, 2023 · 4 comments

Comments

@veenstrajelmer
Copy link

veenstrajelmer commented Nov 16, 2023

We recently introduced type_enforced in one of our packages where many others depend on. In the testbanks get importerrors since the release of type_enforced 1.0.0.

C:\Miniconda3\envs\hydromt-delft3dfm\lib\site-packages\meshkernel\meshkernel.py:18: in <module>
    import type_enforced
C:\Miniconda3\envs\hydromt-delft3dfm\lib\site-packages\type_enforced\__init__.py:3: in <module>
    from .enforcer import Enforcer, FunctionMethodEnforcer
C:\Miniconda3\envs\hydromt-delft3dfm\lib\site-packages\type_enforced\enforcer.py:1: in <module>
    from types import FunctionType, MethodType, GenericAlias, UnionType
E   ImportError: cannot import name 'UnionType' from 'types' (C:\Miniconda3\envs\hydromt-delft3dfm\lib\types.py)

This happens in several python versions, but at least py 3.9

Would it be possible to fix this, and include online testing on github?

@connor-makowski
Copy link
Owner

connor-makowski commented Nov 16, 2023 via email

@connor-makowski
Copy link
Owner

Thanks for reporting this. This should be fixed in 1.1.1, however I realized that 1.0+ will need to require python>=3.9. This will require yanking 1.0.0 and 1.1.0 from pypi.

See: b58d79f

@connor-makowski
Copy link
Owner

Can you confirm that this is resolved for you? Feel free to close the issue if it is.

@veenstrajelmer
Copy link
Author

It seems to be resolved indeed, the imports work again. Thanks for the quick action.

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