Skip to content

Commit

Permalink
feat: remove python 3.8 support (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: Clint Valentine <[email protected]>
  • Loading branch information
nh13 and clintval authored Dec 5, 2024
1 parent 4feb697 commit 017dbc2
Show file tree
Hide file tree
Showing 7 changed files with 705 additions and 659 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ permissions:

jobs:
testing:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11", "3.12"]
PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
documentation-links:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: readthedocs/actions/preview@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

`pip install fgpyo`

**Requires python 3.8+**
**Requires python 3.9+**

See documentation on [fgpyo.readthedocs.org][rtd-link].

Expand All @@ -48,7 +48,7 @@ See documentation on [fgpyo.readthedocs.org][rtd-link].
A simple way to create an environment with the desired version of python and poetry is to use [conda][conda-link]. E.g.:

```bash
conda create -n fgpyo -c conda-forge "python>=3.8" poetry
conda create -n fgpyo -c conda-forge "python>=3.9" poetry
conda activate fgpyo

# --all-extras is required to install `mkdocs` and associated dependencies,
Expand Down
7 changes: 3 additions & 4 deletions fgpyo/util/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ def get_attr_fields_dict(cls: type) -> Dict[str, dataclasses.Field]: # type: ig
if TYPE_CHECKING: # pragma: no cover
from _typeshed import DataclassInstance
else:
# https://github.com/python/typeshed/blob/727f3c4320d2af3af2f16695e24dd78e79b7c070/stdlib/_typeshed/__init__.pyi#L348
# TODO: update the hint to `Field[Any]` when we drop support for 3.8

class DataclassInstance(Protocol):
__dataclasses_fields__: ClassVar[Dict[str, dataclasses.Field]]
__dataclasses_fields__: ClassVar[Dict[str, dataclasses.Field[Any]]]


if TYPE_CHECKING and _use_attr: # pragma: no cover
Expand Down Expand Up @@ -458,7 +457,7 @@ def attr_from(
# True, because python, so we need to check for that explicitly
if not set_value and attribute.type is not None and not attribute.type == bool:
try:
return_value = attribute.type(str_value)
return_value = attribute.type(str_value) # type: ignore[operator]
set_value = True
except (ValueError, TypeError):
pass
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ theme:
collapse_navigation: false
repo_url: https://github.com/fulcrumgenomics/fgpyo
plugins:
- autorefs
- autorefs:
resolve_closest: true
- include-markdown
- search
- gen-files:
Expand Down
1,341 changes: 694 additions & 647 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
include = ["LICENSE"]

[tool.poetry.dependencies]
python = ">=3.8.0,<4.0"
python = ">=3.9.0,<4.0"
attrs = ">=19.3.0"
pysam = ">=0.22.1"
typing_extensions = { version = ">=3.7.4", python = "<3.12" }
Expand Down Expand Up @@ -73,7 +73,6 @@ unfixable = ["B"]
force-single-line = true

[tool.mypy]
python_version = 3.8
strict_optional = false
check_untyped_defs = true
disallow_incomplete_defs = true
Expand Down

0 comments on commit 017dbc2

Please sign in to comment.