From 9f2a6933dfab4669dc09aefd91228aacd5cb41bf Mon Sep 17 00:00:00 2001 From: isabelizimm Date: Mon, 16 Dec 2024 17:25:03 -0500 Subject: [PATCH 1/2] drop python 3.8 support --- .github/workflows/ci.yml | 4 ++-- pyproject.toml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f1ded96..c1b4772f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" diff --git a/pyproject.toml b/pyproject.toml index 6d6f9475..d4f46689 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,6 @@ maintainers = [{ name = "Isabel Zimmerman", email = "isabel.zimmerman@posit.co" 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", @@ -18,7 +17,7 @@ classifiers = [ "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 From 7002e10e8c5e1e1b02e1511223b63caa771baf74 Mon Sep 17 00:00:00 2001 From: isabelizimm Date: Mon, 16 Dec 2024 17:37:17 -0500 Subject: [PATCH 2/2] update from precommit --- .github/workflows/code-checks.yml | 4 +- Makefile | 4 +- pins/boards.py | 3 +- pins/cache.py | 2 +- pins/drivers.py | 2 +- pins/meta.py | 3 +- pins/rsconnect/api.py | 4 +- pins/rsconnect/fs.py | 3 +- pins/tests/test_rsconnect_api.py | 5 +- pins/versions.py | 2 +- requirements/dev.txt | 253 ++++++++++++++++-------------- 11 files changed, 152 insertions(+), 133 deletions(-) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 59d01343..3774dd86 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -24,7 +24,7 @@ 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: | @@ -32,4 +32,4 @@ jobs: 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 diff --git a/Makefile b/Makefile index b46883fc..10fbf703 100644 --- a/Makefile +++ b/Makefile @@ -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 $< $@ diff --git a/pins/boards.py b/pins/boards.py index 10af5060..2e4f2f0e 100644 --- a/pins/boards.py +++ b/pins/boards.py @@ -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 diff --git a/pins/cache.py b/pins/cache.py index 7003f431..ebffb3b7 100644 --- a/pins/cache.py +++ b/pins/cache.py @@ -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 diff --git a/pins/drivers.py b/pins/drivers.py index b859e9b5..8ca6e3ab 100644 --- a/pins/drivers.py +++ b/pins/drivers.py @@ -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 diff --git a/pins/meta.py b/pins/meta.py index d950d456..3628b4bb 100644 --- a/pins/meta.py +++ b/pins/meta.py @@ -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 ClassVar, Mapping, Sequence +from typing import ClassVar import yaml diff --git a/pins/rsconnect/api.py b/pins/rsconnect/api.py index 0d1151d3..4f15d267 100644 --- a/pins/rsconnect/api.py +++ b/pins/rsconnect/api.py @@ -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, Sequence, TypeVar +from typing import Generic, TypeVar from urllib.parse import urlencode import requests diff --git a/pins/rsconnect/fs.py b/pins/rsconnect/fs.py index 5cac1df7..2bebf1c9 100644 --- a/pins/rsconnect/fs.py +++ b/pins/rsconnect/fs.py @@ -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 diff --git a/pins/tests/test_rsconnect_api.py b/pins/tests/test_rsconnect_api.py index 54296cc0..ce3e7c2c 100644 --- a/pins/tests/test_rsconnect_api.py +++ b/pins/tests/test_rsconnect_api.py @@ -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 ---- diff --git a/pins/versions.py b/pins/versions.py index 38360e0e..c05babcf 100644 --- a/pins/versions.py +++ b/pins/versions.py @@ -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 diff --git a/requirements/dev.txt b/requirements/dev.txt index 2b2a43a0..0b1c4974 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -2,92 +2,97 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --extra=doc --extra=test --extra=check --output-file=- --strip-extras setup.cfg +# pip-compile --extra=check --extra=doc --extra=test --output-file=- pyproject.toml # --index-url https://pypi.python.org/simple/ --trusted-host pypi.org -adlfs==2022.2.0 - # via pins (setup.cfg) -aiobotocore==2.13.1 +adlfs==2024.12.0 + # via pins (pyproject.toml) +aiobotocore==2.15.2 # via s3fs -aiohttp==3.9.5 +aiohappyeyeballs==2.4.4 + # via aiohttp +aiohttp==3.11.10 # via # adlfs # aiobotocore # gcsfs # s3fs -aioitertools==0.11.0 +aioitertools==0.12.0 # via aiobotocore -aiosignal==1.3.1 +aiosignal==1.3.2 # via aiohttp annotated-types==0.7.0 # via pydantic appdirs==1.4.4 - # via pins (setup.cfg) + # via pins (pyproject.toml) appnope==0.1.4 # via # ipykernel # ipython -asttokens==2.4.1 +asttokens==3.0.0 # via stack-data -attrs==23.2.0 +attrs==24.3.0 # via # aiohttp # jsonschema # pytest # referencing # sphobjinv -azure-core==1.30.2 +azure-core==1.32.0 # via # adlfs # azure-identity # azure-storage-blob azure-datalake-store==0.0.53 # via adlfs -azure-identity==1.17.1 +azure-identity==1.19.0 # via adlfs -azure-storage-blob==12.20.0 +azure-storage-blob==12.24.0 # via adlfs backcall==0.2.0 # via ipython -beartype==0.18.5 +beartype==0.19.0 # via plum-dispatch -botocore==1.34.131 +black==24.10.0 + # via quartodoc +botocore==1.35.36 # via aiobotocore -build==1.2.1 +build==1.2.2.post1 # via pip-tools -cachetools==5.4.0 +cachetools==5.5.0 # via google-auth -certifi==2024.7.4 +certifi==2024.12.14 # via # requests # sphobjinv -cffi==1.16.0 +cffi==1.17.1 # via # azure-datalake-store # cryptography cfgv==3.4.0 # via pre-commit -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests click==8.1.7 # via + # black # pip-tools # quartodoc colorama==0.4.6 # via griffe comm==0.2.2 # via ipykernel -cramjam==2.8.3 +cramjam==2.9.1 # via fastparquet -cryptography==42.0.8 +cryptography==44.0.0 # via # azure-identity # azure-storage-blob # msal # pyjwt -debugpy==1.8.2 +debugpy==1.8.11 # via ipykernel decopatch==1.4.10 # via pytest-cases @@ -95,34 +100,34 @@ decorator==5.1.1 # via # gcsfs # ipython -distlib==0.3.8 +distlib==0.3.9 # via virtualenv -executing==2.0.1 +executing==2.1.0 # via stack-data -fastjsonschema==2.20.0 +fastjsonschema==2.21.1 # via nbformat -fastparquet==2024.5.0 - # via pins (setup.cfg) -filelock==3.15.4 +fastparquet==2024.11.0 + # via pins (pyproject.toml) +filelock==3.16.1 # via virtualenv -frozenlist==1.4.1 +frozenlist==1.5.0 # via # aiohttp # aiosignal -fsspec==2024.6.1 +fsspec==2024.10.0 # via # adlfs # fastparquet # gcsfs - # pins (setup.cfg) + # pins (pyproject.toml) # s3fs -gcsfs==2024.6.1 - # via pins (setup.cfg) -google-api-core==2.19.1 +gcsfs==2024.10.0 + # via pins (pyproject.toml) +google-api-core==2.24.0 # via # google-cloud-core # google-cloud-storage -google-auth==2.32.0 +google-auth==2.37.0 # via # gcsfs # google-api-core @@ -133,59 +138,59 @@ google-auth-oauthlib==1.2.1 # via gcsfs google-cloud-core==2.4.1 # via google-cloud-storage -google-cloud-storage==2.17.0 +google-cloud-storage==2.19.0 # via gcsfs -google-crc32c==1.5.0 +google-crc32c==1.6.0 # via # google-cloud-storage # google-resumable-media -google-resumable-media==2.7.1 +google-resumable-media==2.7.2 # via google-cloud-storage -googleapis-common-protos==1.63.2 +googleapis-common-protos==1.66.0 # via google-api-core -griffe==0.48.0 +griffe==1.5.1 # via quartodoc -humanize==4.10.0 - # via pins (setup.cfg) -identify==2.6.0 +humanize==4.11.0 + # via pins (pyproject.toml) +identify==2.6.3 # via pre-commit -idna==3.7 +idna==3.10 # via # requests # yarl -importlib-metadata==8.0.0 +importlib-metadata==8.5.0 # via - # pins (setup.cfg) + # pins (pyproject.toml) # quartodoc -importlib-resources==6.4.0 +importlib-resources==6.4.5 # via - # pins (setup.cfg) + # pins (pyproject.toml) # quartodoc iniconfig==2.0.0 # via pytest ipykernel==6.29.5 - # via pins (setup.cfg) + # via pins (pyproject.toml) ipython==8.12.0 # via # ipykernel - # pins (setup.cfg) -isodate==0.6.1 + # pins (pyproject.toml) +isodate==0.7.2 # via azure-storage-blob -jedi==0.19.1 +jedi==0.19.2 # via ipython jinja2==3.1.4 - # via pins (setup.cfg) + # via pins (pyproject.toml) jmespath==1.0.1 # via botocore joblib==1.4.2 - # via pins (setup.cfg) + # via pins (pyproject.toml) jsonschema==4.23.0 # via # nbformat # sphobjinv -jsonschema-specifications==2023.12.1 +jsonschema-specifications==2024.10.1 # via jsonschema -jupyter-client==8.6.2 +jupyter-client==8.6.3 # via # ipykernel # nbclient @@ -195,13 +200,13 @@ jupyter-core==5.7.2 # jupyter-client # nbclient # nbformat -makefun==1.15.4 +makefun==1.15.6 # via # decopatch # pytest-cases markdown-it-py==3.0.0 # via rich -markupsafe==2.1.5 +markupsafe==3.0.2 # via jinja2 matplotlib-inline==0.1.7 # via @@ -209,123 +214,132 @@ matplotlib-inline==0.1.7 # ipython mdurl==0.1.2 # via markdown-it-py -msal==1.29.0 +msal==1.31.1 # via # azure-datalake-store # azure-identity # msal-extensions msal-extensions==1.2.0 # via azure-identity -multidict==6.0.5 +multidict==6.1.0 # via # aiohttp # yarl -nbclient==0.10.0 - # via pins (setup.cfg) +mypy-extensions==1.0.0 + # via black +nbclient==0.10.1 + # via pins (pyproject.toml) nbformat==5.10.4 # via # nbclient - # pins (setup.cfg) + # pins (pyproject.toml) nest-asyncio==1.6.0 # via ipykernel nodeenv==1.9.1 # via # pre-commit # pyright -numpy==2.0.0 +numpy==2.2.0 # via # fastparquet # pandas - # pyarrow oauthlib==3.2.2 # via requests-oauthlib -packaging==24.1 +packaging==24.2 # via + # black # build # fastparquet # ipykernel # pytest # pytest-cases -pandas==2.2.2 +pandas==2.2.3 # via # fastparquet - # pins (setup.cfg) + # pins (pyproject.toml) parso==0.8.4 # via jedi +pathspec==0.12.1 + # via black pexpect==4.9.0 # via ipython pickleshare==0.7.5 # via ipython pip-tools==7.4.1 - # via pins (setup.cfg) -platformdirs==4.2.2 + # via pins (pyproject.toml) +platformdirs==4.3.6 # via + # black # jupyter-core # virtualenv pluggy==1.5.0 # via pytest -plum-dispatch==2.5.1.post1 +plum-dispatch==2.5.4 # via quartodoc portalocker==2.10.1 # via msal-extensions -pre-commit==3.7.1 - # via pins (setup.cfg) -prompt-toolkit==3.0.47 +pre-commit==4.0.1 + # via pins (pyproject.toml) +prompt-toolkit==3.0.48 # via ipython -proto-plus==1.24.0 +propcache==0.2.1 + # via + # aiohttp + # yarl +proto-plus==1.25.0 # via google-api-core -protobuf==5.27.2 +protobuf==5.29.1 # via # google-api-core # googleapis-common-protos # proto-plus -psutil==6.0.0 +psutil==6.1.0 # via ipykernel ptyprocess==0.7.0 # via pexpect -pure-eval==0.2.2 +pure-eval==0.2.3 # via stack-data py==1.11.0 # via pytest -pyarrow==16.1.0 - # via pins (setup.cfg) -pyasn1==0.6.0 +pyarrow==18.1.0 + # via pins (pyproject.toml) +pyasn1==0.6.1 # via # pyasn1-modules # rsa -pyasn1-modules==0.4.0 +pyasn1-modules==0.4.1 # via google-auth pycparser==2.22 # via cffi -pydantic==2.8.2 +pydantic==2.10.3 # via quartodoc -pydantic-core==2.20.1 +pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via # ipython # rich -pyjwt==2.8.0 +pyjwt[crypto]==2.10.1 # via # msal # pyjwt -pyproject-hooks==1.1.0 +pyproject-hooks==1.2.0 # via # build # pip-tools pyright==1.1.372 - # via pins (setup.cfg) + # via pins (pyproject.toml) pytest==7.1.3 # via - # pins (setup.cfg) + # pins (pyproject.toml) # pytest-dotenv # pytest-parallel -pytest-cases==3.8.5 - # via pins (setup.cfg) +pytest-cases==3.8.6 + # via pins (pyproject.toml) pytest-dotenv==0.5.2 - # via pins (setup.cfg) + # via pins (pyproject.toml) pytest-parallel==0.1.1 - # via pins (setup.cfg) + # via pins (pyproject.toml) python-dateutil==2.9.0.post0 # via # botocore @@ -333,19 +347,19 @@ python-dateutil==2.9.0.post0 # pandas python-dotenv==1.0.1 # via pytest-dotenv -pytz==2024.1 +pytz==2024.2 # via pandas -pyyaml==6.0.1 +pyyaml==6.0.2 # via - # pins (setup.cfg) + # pins (pyproject.toml) # pre-commit # quartodoc -pyzmq==26.0.3 +pyzmq==26.2.0 # via # ipykernel # jupyter-client -quartodoc==0.7.5 - # via pins (setup.cfg) +quartodoc==0.9.1 + # via pins (pyproject.toml) referencing==0.35.1 # via # jsonschema @@ -358,26 +372,24 @@ requests==2.32.3 # google-api-core # google-cloud-storage # msal - # pins (setup.cfg) + # pins (pyproject.toml) # quartodoc # requests-oauthlib requests-oauthlib==2.0.0 # via google-auth-oauthlib -rich==13.7.1 +rich==13.9.4 # via plum-dispatch -rpds-py==0.19.0 +rpds-py==0.22.3 # via # jsonschema # referencing rsa==4.9 # via google-auth -s3fs==2024.6.1 - # via pins (setup.cfg) -six==1.16.0 +s3fs==2024.10.0 + # via pins (pyproject.toml) +six==1.17.0 # via - # asttokens # azure-core - # isodate # python-dateutil sphobjinv==2.3.1.1 # via quartodoc @@ -387,9 +399,9 @@ tabulate==0.9.0 # via quartodoc tblib==3.0.0 # via pytest-parallel -tomli==2.0.1 +tomli==2.2.1 # via pytest -tornado==6.4.1 +tornado==6.4.2 # via # ipykernel # jupyter-client @@ -404,36 +416,37 @@ traitlets==5.14.3 # nbclient # nbformat types-appdirs==1.4.3.5 - # via pins (setup.cfg) + # via pins (pyproject.toml) typing-extensions==4.12.2 # via # azure-core # azure-identity # azure-storage-blob + # plum-dispatch # pydantic # pydantic-core # quartodoc -tzdata==2024.1 +tzdata==2024.2 # via pandas -urllib3==2.2.2 +urllib3==2.2.3 # via # botocore # requests -virtualenv==20.26.3 +virtualenv==20.28.0 # via pre-commit -watchdog==4.0.1 +watchdog==6.0.0 # via quartodoc wcwidth==0.2.13 # via prompt-toolkit -wheel==0.43.0 +wheel==0.45.1 # via pip-tools -wrapt==1.16.0 +wrapt==1.17.0 # via aiobotocore -xxhash==3.4.1 - # via pins (setup.cfg) -yarl==1.9.4 +xxhash==3.5.0 + # via pins (pyproject.toml) +yarl==1.18.3 # via aiohttp -zipp==3.19.2 +zipp==3.21.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: