Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/drop_support_for_python_310.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: major
---

# Drop support for Python 3.10
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test:
strategy:
matrix:
python: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
python: [ "3.11", "3.12", "3.13", "3.14" ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: "3.10"
python-version: "3.11"

- name: Get Python Version
id: get_python_version
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Get Python Version
id: get_python_version
run: echo "python_version=$(python --version)" >> $GITHUB_OUTPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
include = ["my_test_api_client/py.typed"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
httpx = ">=0.23.1,<0.29.0"
attrs = ">=22.2.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_defaults_in_initializer(self, MyModel):
number_prop=1.5,
int_prop=2,
date_prop=datetime.date(2024, 1, 2),
date_time_prop=datetime.datetime(2024, 1, 2, 3, 4, 5, tzinfo=datetime.timezone.utc),
date_time_prop=datetime.datetime(2024, 1, 2, 3, 4, 5, tzinfo=datetime.UTC),
uuid_prop=uuid.UUID("07EF8B4D-AA09-4FFA-898D-C710796AFF41"),
any_prop_with_string="b",
any_prop_with_int=3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_date(self, MyModel):
assert_model_decode_encode(MyModel, json_data, MyModel(date_prop=date_value))

def test_date_time(self, MyModel):
date_time_value = datetime.datetime.now(datetime.timezone.utc)
date_time_value = datetime.datetime.now(datetime.UTC)
json_data = {"dateTimeProp": date_time_value.isoformat()}
assert_model_decode_encode(MyModel, json_data, MyModel(date_time_prop=date_time_value))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _parse_a_camel_date_time(data: object) -> datetime.date | datetime.datetime:
try:
if not isinstance(data, str):
raise TypeError()
a_camel_date_time_type_0 = datetime.datetime.fromisoformat(data.replace("Z", "+00:00"))
a_camel_date_time_type_0 = datetime.datetime.fromisoformat(data)

return a_camel_date_time_type_0
except (TypeError, ValueError, AttributeError, KeyError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
_datetime_properties_ref = d.pop("datetime_properties_ref")
for componentsschemas_an_other_array_of_date_time_item_data in _datetime_properties_ref:
componentsschemas_an_other_array_of_date_time_item = datetime.datetime.fromisoformat(
componentsschemas_an_other_array_of_date_time_item_data.replace("Z", "+00:00")
componentsschemas_an_other_array_of_date_time_item_data
)

datetime_properties_ref.append(componentsschemas_an_other_array_of_date_time_item)
Expand Down Expand Up @@ -285,7 +285,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
_datetime_properties = d.pop("datetime_properties")
for componentsschemas_an_array_of_date_time_item_data in _datetime_properties:
componentsschemas_an_array_of_date_time_item = datetime.datetime.fromisoformat(
componentsschemas_an_array_of_date_time_item_data.replace("Z", "+00:00")
componentsschemas_an_array_of_date_time_item_data
)

datetime_properties.append(componentsschemas_an_array_of_date_time_item)
Expand Down Expand Up @@ -315,7 +315,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

date_property_ref = datetime.date.fromisoformat(d.pop("date_property_ref"))

datetime_property_ref = datetime.datetime.fromisoformat(d.pop("datetime_property_ref").replace("Z", "+00:00"))
datetime_property_ref = datetime.datetime.fromisoformat(d.pop("datetime_property_ref"))

int32_property_ref = d.pop("int32_property_ref")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _parse_some_nullable_object(data: object) -> BodyUploadFileTestsUploadPostSo
if isinstance(_a_datetime, Unset):
a_datetime = UNSET
else:
a_datetime = datetime.datetime.fromisoformat(_a_datetime.replace("Z", "+00:00"))
a_datetime = datetime.datetime.fromisoformat(_a_datetime)

_a_date = d.pop("a_date", UNSET)
a_date: datetime.date | Unset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _parse_a_camel_date_time(data: object) -> datetime.date | datetime.datetime:
try:
if not isinstance(data, str):
raise TypeError()
a_camel_date_time_type_0 = datetime.datetime.fromisoformat(data.replace("Z", "+00:00"))
a_camel_date_time_type_0 = datetime.datetime.fromisoformat(data)

return a_camel_date_time_type_0
except (TypeError, ValueError, AttributeError, KeyError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
if isinstance(_datetime_, Unset):
datetime_ = UNSET
else:
datetime_ = datetime.datetime.fromisoformat(_datetime_.replace("Z", "+00:00"))
datetime_ = datetime.datetime.fromisoformat(_datetime_)

model_with_date_time_property = cls(
datetime_=datetime_,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

additional_properties = {}
for prop_name, prop_dict in d.items():
additional_property = datetime.datetime.fromisoformat(prop_dict.replace("Z", "+00:00"))
additional_property = datetime.datetime.fromisoformat(prop_dict)

additional_properties[prop_name] = additional_property

Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/golden-record/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
include = ["my_test_api_client/py.typed"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
httpx = ">=0.23.1,<0.29.0"
attrs = ">=22.2.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
include = ["my_enum_api_client/py.typed"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
httpx = ">=0.23.1,<0.29.0"
attrs = ">=22.2.0"

Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/metadata_snapshots/pdm.pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
description = "A client library for accessing Test 3.1 Features"
authors = []
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"httpx>=0.23.1,<0.29.0",
"attrs>=22.2.0",
Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/metadata_snapshots/poetry.pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
include = ["test_3_1_features_client/py.typed"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
httpx = ">=0.23.1,<0.29.0"
attrs = ">=22.2.0"

Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/metadata_snapshots/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
python_requires=">=3.10, <4",
python_requires=">=3.11, <4",
install_requires=["httpx >= 0.23.1, < 0.29.0", "attrs >= 22.2.0"],
package_data={"test_3_1_features_client": ["py.typed"]},
)
2 changes: 1 addition & 1 deletion end_to_end_tests/metadata_snapshots/uv.pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "test-3-1-features-client"
version = "0.1.0"
description = "A client library for accessing Test 3.1 Features"
authors = []
requires-python = ">=3.10"
requires-python = ">=3.11"
readme = "README.md"
dependencies = [
"httpx>=0.23.1,<0.29.0",
Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/test-3-1-golden-record/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
include = ["test_3_1_features_client/py.typed"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
httpx = ">=0.23.1,<0.29.0"
attrs = ">=22.2.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
times = []
_times = d.pop("times")
for times_item_data in _times:
times_item = datetime.datetime.fromisoformat(times_item_data.replace("Z", "+00:00"))
times_item = datetime.datetime.fromisoformat(times_item_data)

times.append(times_item)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
times = []
_times = d.pop("times")
for times_item_data in _times:
times_item = datetime.datetime.fromisoformat(times_item_data.replace("Z", "+00:00"))
times_item = datetime.datetime.fromisoformat(times_item_data)

times.append(times_item)

Expand Down
Loading
Loading