Skip to content

bug: pydantic is not listed as a run requirement #39

@stanmart

Description

@stanmart

Description of the bug

pydantic is not listed as a run dependency, even though it is because of this import.

To Reproduce

uvx --with griffe-pydantic python -c "import griffe_pydantic"

Full traceback

Full traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/stanmart/.cache/uv/archive-v0/w0GqW3DOwYSdGntL1NtTt/lib/python3.12/site-packages/griffe_pydantic/__init__.py", line 10, in <module>
    from griffe_pydantic._internal.extension import PydanticExtension
  File "/Users/stanmart/.cache/uv/archive-v0/w0GqW3DOwYSdGntL1NtTt/lib/python3.12/site-packages/griffe_pydantic/_internal/extension.py", line 13, in <module>
    from griffe_pydantic._internal import dynamic, static
  File "/Users/stanmart/.cache/uv/archive-v0/w0GqW3DOwYSdGntL1NtTt/lib/python3.12/site-packages/griffe_pydantic/_internal/dynamic.py", line 13, in <module>
    from pydantic.fields import FieldInfo
ModuleNotFoundError: No module named 'pydantic'

Expected behavior

Either pydantic should be pulled in as a dependency or the import should be lazy.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions