Skip to content

Drop Python 3.10 support#1444

Merged
dbanty merged 1 commit into
mainfrom
push-rswkxxymquto
May 30, 2026
Merged

Drop Python 3.10 support#1444
dbanty merged 1 commit into
mainfrom
push-rswkxxymquto

Conversation

@dbanty
Copy link
Copy Markdown
Collaborator

@dbanty dbanty commented May 30, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR drops Python 3.10 support across the generator, its templates, and test fixtures by raising the minimum supported Python version to 3.11 and removing 3.10 compatibility workarounds.

Changes:

  • Raise minimum supported Python version to 3.11 in project metadata, templates, CI, and test projects.
  • Simplify enums and datetime parsing now that Python 3.11 features/behavior are available (e.g., StrEnum, datetime.UTC, relaxed fromisoformat handling).
  • Refresh lockfiles and golden records/integration fixtures to align with the new minimum version.

Reviewed changes

Copilot reviewed 34 out of 38 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_templates/test_property_templates/test_datetime_property/required_not_null.py Updates the datetime template snapshot expectation to remove the Z normalization workaround.
pyproject.toml Bumps requires-python to >=3.11 and removes the Python 3.10 classifier.
pdm.minimal.lock Regenerates minimal lock targeting Python 3.11 (drops 3.10-only/backport deps).
pdm.lock Regenerates lock targeting Python 3.11 (also includes some dependency patch bumps).
openapi_python_client/templates/setup.py.jinja Updates generated python_requires to >=3.11.
openapi_python_client/templates/pyproject_uv.toml.jinja Updates generated requires-python to >=3.11.
openapi_python_client/templates/pyproject_poetry.toml.jinja Updates generated Poetry python constraint to ^3.11.
openapi_python_client/templates/pyproject_pdm.toml.jinja Updates generated requires-python to >=3.11.
openapi_python_client/templates/property_templates/datetime_property.py.jinja Removes Python 3.10-specific Z replacement before fromisoformat.
openapi_python_client/schema/parameter_location.py Switches to StrEnum and removes version-conditional enum implementation.
openapi_python_client/schema/data_type.py Switches DataType to StrEnum.
openapi_python_client/parser/properties/datetime.py Removes Z normalization and validates/constructs datetime directly via fromisoformat.
openapi_python_client/parser/bodies.py Switches BodyType to StrEnum and removes version-conditional enum implementation.
openapi_python_client/config.py Switches MetaType to StrEnum.
integration-tests/tests/test_api/test_body/test_post_body_multipart.py Uses datetime.UTC/UTC instead of timezone.utc for 3.11+.
integration-tests/pyproject.toml Bumps integration test project minimum Python to >=3.11.
integration-tests/pdm.minimal.lock Regenerates integration minimal lock targeting Python 3.11.
integration-tests/pdm.lock Regenerates integration lock targeting Python 3.11.
integration-tests/integration_tests/models/post_body_multipart_response_200.py Removes Z replacement before fromisoformat in generated integration fixture code.
integration-tests/integration_tests/models/post_body_multipart_body.py Removes Z replacement before fromisoformat in generated integration fixture code.
end_to_end_tests/test-3-1-golden-record/pyproject.toml Bumps golden-record Poetry python constraint to ^3.11.
end_to_end_tests/metadata_snapshots/uv.pyproject.toml Updates snapshot requires-python to >=3.11.
end_to_end_tests/metadata_snapshots/setup.py Updates snapshot python_requires to >=3.11.
end_to_end_tests/metadata_snapshots/poetry.pyproject.toml Updates snapshot Poetry python constraint to ^3.11.
end_to_end_tests/metadata_snapshots/pdm.pyproject.toml Updates snapshot requires-python to >=3.11.
end_to_end_tests/literal-enums-golden-record/pyproject.toml Bumps golden-record Poetry python constraint to ^3.11.
end_to_end_tests/golden-record/pyproject.toml Bumps golden-record Poetry python constraint to ^3.11.
end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py Removes Z replacement before fromisoformat in golden record.
end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py Removes Z replacement before fromisoformat in golden record.
end_to_end_tests/golden-record/my_test_api_client/models/extended.py Removes Z replacement before fromisoformat in golden record parsing helper.
end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py Removes Z replacement before fromisoformat in golden record parsing helper.
end_to_end_tests/golden-record/my_test_api_client/models/a_model.py Removes Z replacement before fromisoformat in golden record parsing helper.
end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py Removes Z replacement before fromisoformat in multiple golden record parsing sites.
end_to_end_tests/functional_tests/generated_code_execution/test_properties.py Uses datetime.UTC in functional test for 3.11+.
end_to_end_tests/functional_tests/generated_code_execution/test_defaults.py Uses datetime.UTC in functional test defaults for 3.11+.
.github/workflows/checks.yml Removes Python 3.10 from CI matrix and pins other jobs to 3.11+.
.changeset/drop_support_for_python_310.md Adds a changeset marking the breaking change (major bump).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dbanty dbanty merged commit 18281e9 into main May 30, 2026
20 checks passed
@dbanty dbanty deleted the push-rswkxxymquto branch May 30, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants