Skip to content

Bug: Project does not work in Python 3.14 #8578

@maxrabin

Description

@maxrabin

Description:

This project relies on Pydantic v1 which is no longer supported in Python 3.14.

Steps to reproduce:

uv init --python 3.14
uv add --dev aws-sam-cli
uv run sam build

Observed result:

/homes/myuser/project_directory/.venv/lib/python3.14/site-packages/samtranslator/compat.py:2: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
  from pydantic import v1 as pydantic
.... stack trace .... ends with: .....
  File "```
/homes/myuser/project_directory/.venv/lib/python3.14/site-packages/pydantic/v1/validators.py", line 768, in find_validators
    raise RuntimeError(f'no validator found for {type_}, see `arbitrary_types_allowed` in Config')
RuntimeError: no validator found for <class 'pydantic.v1.fields.UndefinedType'>, see `arbitrary_types_allowed` in Config


### Expected result:
I expected it to not crash.


### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

<!-- Either provide the following info (for AWS SAM CLI v1.68.0 or before) or paste the output of `sam --info` (AWS SAM CLI v1.69.0 or after). -->

1. OS: Ubuntu
2. `sam --version`: 1.151.0
3. AWS region: n/a

Paste the output of sam --info here


`Add --debug flag to command you are running`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions