Skip to content

Commit d181886

Browse files
zkleb-aaiAssemblyAI
andauthored
chore: sync sdk code with DeepLearning repo (#151)
Co-authored-by: AssemblyAI <engineering.sdk@assemblyai.com>
1 parent d7893e2 commit d181886

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

assemblyai/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.48.0"
1+
__version__ = "0.48.1"

assemblyai/types.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from datetime import datetime
23
from enum import Enum, EnumMeta
34
from typing import (
@@ -24,7 +25,14 @@
2425

2526
pydantic_v2 = True
2627
except ImportError:
27-
# pydantic v1 import
28+
# Python 3.14+ requires Pydantic V2
29+
if sys.version_info >= (3, 14):
30+
raise ImportError(
31+
"Python 3.14 or greater requires Pydantic V2 and pydantic-settings. "
32+
"Please install with: pip install 'pydantic>=2.0' 'pydantic-settings>=2.0'"
33+
) from None
34+
35+
# pydantic v1 import (fallback for Python < 3.14)
2836
from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field, validator
2937

3038
pydantic_v2 = False

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def get_version() -> str:
2121
packages=find_packages(exclude=["tests", "tests.*"]),
2222
install_requires=[
2323
"httpx>=0.19.0",
24-
"pydantic>=1.10.17",
24+
"pydantic>=2.0; python_version>='3.14'",
25+
"pydantic>=1.10.17; python_version<'3.14'",
26+
"pydantic-settings>=2.0; python_version>='3.14'",
2527
"typing-extensions>=3.7",
2628
"websockets>=11.0",
2729
],
@@ -42,6 +44,9 @@ def get_version() -> str:
4244
"Programming Language :: Python :: 3.9",
4345
"Programming Language :: Python :: 3.10",
4446
"Programming Language :: Python :: 3.11",
47+
"Programming Language :: Python :: 3.12",
48+
"Programming Language :: Python :: 3.13",
49+
"Programming Language :: Python :: 3.14",
4550
],
4651
long_description=long_description,
4752
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)