Skip to content

Importing models from foundry_sdk.v2.core.models fails with Python 3.14 #303

@LukasPatzke

Description

@LukasPatzke

Importing models from fails when using Python 3.14. The same code runs without and error with Python 3.13.

Minimal demonstration:

uv init foundry-test --python 3.14
cd .\foundry-test\
uv add foundry-platform-sdk
uv run python
Python 3.14.0rc2 (main, Sep  2 2025, 14:18:18) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from foundry_sdk.v2.core.models import DatasetSchema
Traceback (most recent call last):
  File "<python-input-3>", line 1, in <module>
    from foundry_sdk.v2.core.models import DatasetSchema
  File "C:\Users\lupat1q.EU\Documents\dev\foundry-test\.venv\Lib\site-packages\foundry_sdk\v2\core\models.py", line 883, in <module>
    core.resolve_forward_references(EmbeddingModel, globalns=globals(), localns=locals())
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lupat1q.EU\Documents\dev\foundry-test\.venv\Lib\site-packages\foundry_sdk\_core\utils.py", line 105, in resolve_forward_references
    args = tuple(
           ^^^^^
  File "C:\Users\lupat1q.EU\Documents\dev\foundry-test\.venv\Lib\site-packages\foundry_sdk\_core\utils.py", line 109, in <genexpr>
    else resolve_forward_references(arg, globalns, localns)
         ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lupat1q.EU\Documents\dev\foundry-test\.venv\Lib\site-packages\foundry_sdk\_core\utils.py", line 114, in resolve_forward_references
    setattr(type_obj, "__args__", args)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: readonly attribute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions