Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943177 - dev-python/pydantic-2.10.0_beta1: circular import error in pydantic.validate_call
Summary: dev-python/pydantic-2.10.0_beta1: circular import error in pydantic.validate_...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Python Gentoo Team
URL: https://github.com/pydantic/pydantic/...
Whiteboard:
Keywords:
Depends on:
Blocks: 943041
  Show dependency tree
 
Reported: 2024-11-10 12:41 UTC by Anna Vyalkova
Modified: 2024-11-11 20:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Vyalkova 2024-11-10 12:41:29 UTC
Revdeps that import the call validation decorator with "from pydantic import validate_call" seem to be broken.

Reproducible: Always

Steps to Reproduce:
1. python -c "from pydantic import validate_call"
Actual Results:  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.12/site-packages/pydantic/__init__.py", line 418, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pydantic/validate_call_decorator.py", line 9, in <module>
    from ._internal import _typing_extra, _validate_call
  File "/usr/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py", line 13, in <module>
    from . import _generate_schema
  File "/usr/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py", line 108, in <module>
    from ._validate_call import VALIDATE_CALL_SUPPORTED_TYPES, ValidateCallSupportedTypes
ImportError: cannot import name 'VALIDATE_CALL_SUPPORTED_TYPES' from partially initialized module 'pydantic._internal._validate_call' (most likely due to a circular import) (/usr/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py)

Expected Results:  
No error