Skip to content

Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater #501

@madsmh

Description

@madsmh

The version of Pydantic argos-translate uses does not support python >= 3.14:

$ argospm install translate
.venv/lib64/python3.14/site-packages/confection/__init__.py:38: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
  from pydantic.v1 import BaseModel, Extra, ValidationError, create_model
Traceback (most recent call last):
  File ".venv/bin/argospm", line 3, in <module>
    from argostranslate.argospm import main
  File ".venv/lib64/python3.14/site-packages/argostranslate/argospm.py", line 5, in <module>
    from argostranslate import package, settings
  File ".venv/lib64/python3.14/site-packages/argostranslate/package.py", line 13, in <module>
    from argostranslate import networking, settings
  File ".venv/lib64/python3.14/site-packages/argostranslate/networking.py", line 8, in <module>
    from spacy import load as spacy_load
  File ".venv/lib64/python3.14/site-packages/spacy/__init__.py", line 13, in <module>
    from . import pipeline  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib64/python3.14/site-packages/spacy/pipeline/__init__.py", line 1, in <module>
    from .attributeruler import AttributeRuler
  File ".venv/lib64/python3.14/site-packages/spacy/pipeline/attributeruler.py", line 10, in <module>
    from ..language import Language
  File ".venv/lib64/python3.14/site-packages/spacy/language.py", line 46, in <module>
    from .pipe_analysis import analyze_pipes, print_pipe_analysis, validate_attrs
  File ".venv/lib64/python3.14/site-packages/spacy/pipe_analysis.py", line 6, in <module>
    from .tokens import Doc, Span, Token
  File ".venv/lib64/python3.14/site-packages/spacy/tokens/__init__.py", line 1, in <module>
    from ._serialize import DocBin
  File ".venv/lib64/python3.14/site-packages/spacy/tokens/_serialize.py", line 14, in <module>
    from ..vocab import Vocab
  File "spacy/vocab.pyx", line 1, in init spacy.vocab
  File "spacy/tokens/doc.pyx", line 49, in init spacy.tokens.doc
  File ".venv/lib64/python3.14/site-packages/spacy/schemas.py", line 195, in <module>
    class TokenPatternString(BaseModel):
    ...<43 lines>...
            return v
  File ".venv/lib64/python3.14/site-packages/pydantic/v1/main.py", line 221, in __new__
    inferred = ModelField.infer(
        name=var_name,
    ...<3 lines>...
        config=config,
    )
  File ".venv/lib64/python3.14/site-packages/pydantic/v1/fields.py", line 504, in infer
    return cls(
        name=name,
    ...<7 lines>...
        field_info=field_info,
    )
  File ".venv/lib64/python3.14/site-packages/pydantic/v1/fields.py", line 434, in __init__
    self.prepare()
    ~~~~~~~~~~~~^^
  File ".venv/lib64/python3.14/site-packages/pydantic/v1/fields.py", line 544, in prepare
    self._set_default_and_type()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File ".venv/lib64/python3.14/site-packages/pydantic/v1/fields.py", line 576, in _set_default_and_type
    raise errors_.ConfigError(f'unable to infer type for attribute "{self.name}"')
pydantic.v1.errors.ConfigError: unable to infer type for attribute "REGEX"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions