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

PyDantic update causes pip dependency's imcompatibility. #122

Open
LicoriceLin opened this issue Nov 24, 2023 · 1 comment
Open

PyDantic update causes pip dependency's imcompatibility. #122

LicoriceLin opened this issue Nov 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@LicoriceLin
Copy link

Describe the bug
PyDantic update causes pip dependency's imcompatibility.
with pydantic=2.5 (default pip behavior) raise error like:
... ... File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/bioregistry/schema/__init__.py", line 5, in <module> from .struct import ( # noqa:F401 File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/bioregistry/schema/struct.py", line 35, in <module> from bioregistry.utils import curie_to_str, deduplicate, removeprefix, removesuffix File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/bioregistry/utils.py", line 25, in <module> from pydantic.json import ENCODERS_BY_TYPE ImportError: cannot import name 'ENCODERS_BY_TYPE' from 'pydantic.json' (/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.

downgrade to pydantic 1.1 causes oaklib import error like:

... ... File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/schema_automator/annotators/schema_annotator.py", line 10, in <module> from oaklib import BasicOntologyInterface File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/oaklib/__init__.py", line 9, in <module> from oaklib.selector import get_implementation_from_shorthand # noqa:F401 File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/site-packages/oaklib/selector.py", line 8, in <module> ... ... File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis File "/home/rnalab/zfdeng/miniconda3/envs/tmp_schema/lib/python3.9/typing.py", line 852, in __subclasscheck__ return issubclass(cls, self.__origin__) TypeError: issubclass() arg 1 must be a class

To Reproduce
begin with a new conda env with only python3.9
pip install schema-automator
run any cli commands.

@LicoriceLin LicoriceLin added the bug Something isn't working label Nov 24, 2023
@dosumis
Copy link

dosumis commented Dec 4, 2023

This is a blocker for me too.

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

No branches or pull requests

2 participants