Skip to content

Commit

Permalink
Merge pull request #565 from laughingman7743/#561
Browse files Browse the repository at this point in the history
Drop support for Python 3.8 (fix #561)
  • Loading branch information
laughingman7743 authored Dec 7, 2024
2 parents d2b8ecb + abaf048 commit abda868
Show file tree
Hide file tree
Showing 13 changed files with 4,850 additions and 5,234 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Requirements

* Python

- CPython 3.8 3.9 3.10, 3.11 3.12
- CPython 3.9 3.10, 3.11 3.12

.. _installation:

Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Requirements

* Python

- CPython 3.8 3.9 3.10, 3.11 3.12
- CPython 3.9 3.10, 3.11 3.12

.. _installation:

Expand Down
7 changes: 6 additions & 1 deletion pyathena/filesystem/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ def touch(self, path: str, truncate: bool = True, **kwargs) -> Dict[str, Any]:
self.invalidate_cache(path)
return object_.to_dict()

def cp_file(self, path1: str, path2: str, **kwargs):
def cp_file(self, path1: str, path2: str, recursive=False, maxdepth=None, on_error=None, **kwargs):
# TODO: Delete the value that seems to be a typo, onerror=false.
# https://github.com/fsspec/filesystem_spec/commit/346a589fef9308550ffa3d0d510f2db67281bb05
# https://github.com/fsspec/filesystem_spec/blob/2024.10.0/fsspec/spec.py#L1185
# https://github.com/fsspec/filesystem_spec/blob/2024.10.0/fsspec/spec.py#L1077
kwargs.pop("onerror", None)
bucket1, key1, version_id1 = self.parse_path(path1)
bucket2, key2, version_id2 = self.parse_path(path2)
if version_id2:
Expand Down
3 changes: 3 additions & 0 deletions pyathena/sqlalchemy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ def visit_null(self, type_, **kw): # noqa: N802
def visit_tinyint(self, type_, **kw): # noqa: N802
return self.visit_TINYINT(type_, **kw)

def visit_enum(self, type_, **kw):
return self.visit_string(type_, **kw)


class AthenaDDLCompiler(DDLCompiler):
@property
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
"fsspec",
"python-dateutil",
]
requires-python = ">=3.8.1" # https://bugs.python.org/issue38342
requires-python = ">=3.9"
readme = "README.rst"
license = {file = "LICENSE"}
classifiers = [
Expand All @@ -21,7 +21,6 @@ classifiers = [
"Operating System :: OS Independent",
"Topic :: Database :: Front-Ends",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -125,7 +124,7 @@ pip-compile-install-args = [
]

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
python = ["3.9", "3.10", "3.11", "3.12"]

[tool.pytest.ini_options]
norecursedirs = ["benchmarks", ".venv"]
Expand Down Expand Up @@ -156,7 +155,7 @@ select = [
]

[tool.mypy]
python_version = 3.8
python_version = 3.9
follow_imports = "silent"
disallow_any_generics = true
strict_optional = true
Expand Down
1,828 changes: 994 additions & 834 deletions requirements/requirements-test.py3.10.txt

Large diffs are not rendered by default.

1,784 changes: 957 additions & 827 deletions requirements/requirements-test.py3.11.txt

Large diffs are not rendered by default.

1,772 changes: 946 additions & 826 deletions requirements/requirements-test.py3.12.txt

Large diffs are not rendered by default.

1,083 changes: 0 additions & 1,083 deletions requirements/requirements-test.py3.8.txt

This file was deleted.

1,808 changes: 980 additions & 828 deletions requirements/requirements-test.py3.9.txt

Large diffs are not rendered by default.

1,784 changes: 957 additions & 827 deletions requirements/requirements.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/pyathena/pandas/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def test_generate_ddl():
)

# complex
df = pd.DataFrame({"col_complex": np.complex_([1.0, 2.0, 3.0, 4.0, 5.0])})
df = pd.DataFrame({"col_complex": np.complex128([1.0, 2.0, 3.0, 4.0, 5.0])})
with pytest.raises(ValueError):
generate_ddl(df, "test_table", "s3://bucket/path/to/")

Expand Down

0 comments on commit abda868

Please sign in to comment.