-
Notifications
You must be signed in to change notification settings - Fork 114
Drop Python 3.10 support #884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,6 @@ | |
| from sqlalchemy.sql.type_api import TypeEngine | ||
| from sqlalchemy.sql.visitors import InternalTraversal | ||
|
|
||
| from pyathena.converter import _parse_datetime | ||
| from pyathena.formatter import _ComplexParameter | ||
| from pyathena.sqlalchemy.map import AthenaMap | ||
| from pyathena.sqlalchemy.struct import AthenaStruct | ||
|
|
@@ -167,23 +166,6 @@ def __init__(self, element, type_): | |
| self.array_type = type_ | ||
|
|
||
|
|
||
| def _decode_datetime(value: str) -> datetime: | ||
| """Decode an ARRAY element as a datetime. | ||
|
|
||
| Args: | ||
| value: The element as ISO 8601 text, or as Athena TIMESTAMP text of any | ||
| precision. | ||
|
|
||
| Returns: | ||
| The datetime. Fractional digits beyond microseconds are truncated. | ||
| """ | ||
| try: | ||
| return datetime.fromisoformat(value) | ||
| except ValueError: | ||
| # Python 3.10 accepts only 3 or 6 fractional digits. | ||
| return _parse_datetime(value) | ||
|
|
||
|
|
||
| class _ArrayTypeInspector: | ||
| """Interpret nested ARRAY element types for SQL compilation and value conversion. | ||
|
|
||
|
|
@@ -414,7 +396,7 @@ def _decode(self, value: Any, type_: TypeEngine[Any], as_tuple: bool = False) -> | |
| if isinstance(type_, types.Numeric): | ||
| return Decimal(value) if type_.asdecimal else float(value) | ||
| if isinstance(type_, (types.DateTime, AthenaTimestamp)): | ||
| return value if isinstance(value, datetime) else _decode_datetime(value) | ||
| return value if isinstance(value, datetime) else datetime.fromisoformat(value) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Self-review round one (implementation behavior): CLEAN Scope: base Covered:
Tests: the existing Limitation: the AWS suites have not been run for this head. |
||
| if isinstance(type_, (types.Date, AthenaDate)): | ||
| return value if isinstance(value, date) else date.fromisoformat(value) | ||
| if isinstance(type_, (types.LargeBinary, types.BINARY, types.VARBINARY)): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ dependencies = [ | |
| "fsspec", | ||
| "python-dateutil", | ||
| ] | ||
| requires-python = ">=3.10" | ||
| requires-python = ">=3.11" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Self-review round two (claims, callers, operations): FINDINGS (PR description only, corrected) Scope: base Claims checked:
Existing callers: Python 3.10 installers resolve to an earlier release through Operations: Evidence limits: all validation so far is local and offline. AWS behavior on 3.11 will come from a Test workflow dispatch with |
||
| readme = "README.md" | ||
| license = "MIT" | ||
| license-files = ["LICENSE", "NOTICE"] | ||
|
|
@@ -24,7 +24,6 @@ classifiers = [ | |
| "Operating System :: OS Independent", | ||
| "Topic :: Database :: Front-Ends", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
|
|
@@ -94,7 +93,6 @@ dev = [ | |
| "sphinx-design", | ||
| "types-python-dateutil", | ||
| "cfn-lint>=1", | ||
| "tomli>=2.0.0; python_version<'3.11'", | ||
| ] | ||
|
|
||
| [build-system] | ||
|
|
@@ -142,7 +140,7 @@ exclude = [ | |
| ".tox", | ||
| "benchmarks", | ||
| ] | ||
| target-version = "py310" | ||
| target-version = "py311" | ||
|
|
||
| [tool.ruff.lint] | ||
| # https://docs.astral.sh/ruff/rules/ | ||
|
|
@@ -208,11 +206,10 @@ exclude = [ | |
| legacy_tox_ini = """ | ||
| [tox] | ||
| isolated_build = true | ||
| envlist = py{310,311,312,313,314}-{pyathena,sqla,sqla_async} | ||
| envlist = py{311,312,313,314}-{pyathena,sqla,sqla_async} | ||
|
|
||
| [gh-actions] | ||
| python = | ||
| 3.10: py310 | ||
| 3.11: py311 | ||
| 3.12: py312 | ||
| 3.13: py313 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Independent review (relayed): CLEAN (static)
Reviewer: OpenAI Codex CLI 0.157.1 (
codex exec, modelgpt-6-sol, sandboxread-only, ephemeral session01a0e8db-e3d6-70d1-8e69-5b348cd195a7), which did not author the change.Scope: base
a86a180ebbe5e18920cd75802ea5350ce8d33f10.. head6aeb2ae9967f378478737cf6bcd7113c3f4342b6, in a clean detached snapshot without.env. The prompt omitted the PR number, description, commit message, and self-review findings. The reviewer was not allowed to edit, build, test, use the network, or write to GitHub.Reviewer's result:
After the review, the snapshot and PR worktree were unchanged (HEAD
6aeb2ae, clean status).