Skip to content

Commit

Permalink
maint: drop python 3.8 support (#321)
Browse files Browse the repository at this point in the history
* drop python 3.8 support

* update from precommit
  • Loading branch information
isabelizimm authored Dec 16, 2024
1 parent b36328e commit 59eb08c
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest"]
pytest_opts: ["--workers 4 --tests-per-worker 1"]
requirements: [""]
include:
- os: "ubuntu-latest"
python: "3.8"
python: "3.9"
requirements: "requirements/minimum.txt"
- os: "macos-latest"
python: "3.10"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.12 # Use the maximum version supported by python-pins
python-version: 3.13 # Use the maximum version supported by python-pins
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -e .[check]
- uses: jakebailey/pyright-action@v2
with:
version: 1.1.372 # Manually sync with setup.cfg
version: 1.1.372
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ docs-build:
docs-clean:
rm -rf docs/_build docs/api/api_card

requirements/dev.txt: setup.cfg
requirements/dev.txt: pyproject.toml
@# allows you to do this...
@# make requirements | tee > requirements/some_file.txt
@pip-compile setup.cfg --rebuild --extra doc --extra test --extra check --output-file=- > $@
@pip-compile pyproject.toml --rebuild --extra doc --extra test --extra check --output-file=- > $@

binder/requirements.txt: requirements/dev.txt
cp $< $@
Expand Down
3 changes: 2 additions & 1 deletion pins/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import re
import shutil
import tempfile
from collections.abc import Mapping, Sequence
from datetime import datetime, timedelta
from io import IOBase
from pathlib import Path
from typing import Mapping, Protocol, Sequence
from typing import Protocol

from importlib_resources import files
from importlib_resources.abc import Traversable
Expand Down
2 changes: 1 addition & 1 deletion pins/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import shutil
import time
import urllib.parse
from collections.abc import Iterator
from pathlib import Path
from typing import Iterator

import humanize
from fsspec import register_implementation
Expand Down
2 changes: 1 addition & 1 deletion pins/drivers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Sequence
from pathlib import Path
from typing import Sequence

from .config import PINS_ENV_INSECURE_READ, get_allow_pickle_read
from .errors import PinsInsecureReadError
Expand Down
3 changes: 2 additions & 1 deletion pins/meta.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

from collections.abc import Mapping, Sequence
from dataclasses import InitVar, asdict, dataclass, field, fields
from pathlib import Path
from typing import Any, ClassVar, Mapping, Sequence
from typing import Any, ClassVar

import yaml

Expand Down
4 changes: 2 additions & 2 deletions pins/rsconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import logging
import os
import tempfile
from collections.abc import Mapping
from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from functools import partial
from io import IOBase
from pathlib import Path
from typing import Generic, Literal, Sequence, TypeVar, overload
from typing import Generic, Literal, TypeVar, overload
from urllib.parse import urlencode

import requests
Expand Down
3 changes: 2 additions & 1 deletion pins/rsconnect/fs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

from collections.abc import Sequence
from dataclasses import asdict, dataclass, field, fields
from pathlib import Path
from typing import ClassVar, Sequence
from typing import ClassVar

from fsspec import AbstractFileSystem

Expand Down
5 changes: 4 additions & 1 deletion pins/tests/test_rsconnect_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ def test_rsconnect_api_get_content_bundle_archive(rsc_short):
bundle = create_content_bundle(rsc_short, content["guid"])

# create temporary directories for content source and dest to download to ----
with tempfile.TemporaryDirectory() as tmp_src, tempfile.TemporaryDirectory() as tmp_dst:
with (
tempfile.TemporaryDirectory() as tmp_src,
tempfile.TemporaryDirectory() as tmp_dst,
):
create_content_bundle(rsc_short, content["guid"], tmp_src)

# download .tar.gz archive to a temporary file and unzip ----
Expand Down
2 changes: 1 addition & 1 deletion pins/versions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

import logging
from collections.abc import Mapping, Sequence
from dataclasses import asdict, dataclass
from datetime import datetime
from pathlib import Path
from typing import Mapping, Sequence

from xxhash import xxh64

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ maintainers = [{ name = "Isabel Zimmerman", email = "[email protected]"
keywords = ["data", "tidyverse"]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"appdirs<2", # Using appdirs rather than platformdirs is deliberate, see https://github.com/rstudio/pins-python/pull/239
Expand Down
Loading

0 comments on commit 59eb08c

Please sign in to comment.