From 301a9595c2a517467643bfbea2322587cb9765a0 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 13 Dec 2024 11:18:36 -0700 Subject: [PATCH 1/4] Replace pip with uv and give Python 3.13 a try --- .github/workflows/ci.yaml | 7 +++--- Makefile | 4 ++-- requirements/dev.in | 4 ++++ requirements/dev.txt | 43 ++++++++++++++++++++++-------------- requirements/main.in | 5 ++++- requirements/main.txt | 46 +++++++++++++++++++-------------------- 6 files changed, 63 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db65d18..d504eb1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.13" - name: Run pre-commit uses: pre-commit/action@v3.0.1 @@ -41,6 +41,7 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" steps: - uses: actions/checkout@v4 @@ -89,7 +90,7 @@ jobs: - name: Build and publish uses: lsst-sqre/build-and-publish-to-pypi@v2 with: - python-version: "3.12" + python-version: "3.13" upload: false pypi: @@ -116,4 +117,4 @@ jobs: - name: Build and publish uses: lsst-sqre/build-and-publish-to-pypi@v2 with: - python-version: "3.12" + python-version: "3.13" diff --git a/Makefile b/Makefile index 86574e2..7326e68 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ TESTS_DIR := tests SHELL := bash PYTHON := python -PIP := pip -PIP_COMPILE := pip-compile +PIP := uv pip +PIP_COMPILE := uv pip compile PYTEST := pytest DOCKER := docker GIT := git diff --git a/requirements/dev.in b/requirements/dev.in index 99cea93..f8f9315 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,5 +1,7 @@ -c main.txt +uv + pip-tools tox flake8 @@ -28,4 +30,6 @@ furo sphinx sphinx-autodoc-typehints +# Internal tooling +scriv diff --git a/requirements/dev.txt b/requirements/dev.txt index 2dd422f..76454ae 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,13 +1,11 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-emit-index-url --output-file=requirements/dev.txt requirements/dev.in -# +# This file was autogenerated by uv via the following command: +# uv pip compile --no-emit-index-url -o requirements/dev.txt requirements/dev.in alabaster==0.7.16 # via sphinx attrs==23.2.0 - # via pytest-mypy + # via + # pytest-mypy + # scriv babel==2.14.0 # via sphinx beautifulsoup4==4.12.3 @@ -38,15 +36,17 @@ charset-normalizer==3.3.2 click==8.1.7 # via # -c requirements/main.txt + # click-log # pip-tools + # scriv +click-log==0.4.0 + # via scriv colorama==0.4.6 # via tox commonmark==0.9.1 # via recommonmark -coverage[toml]==7.4.3 - # via - # coverage - # pytest-cov +coverage==7.4.3 + # via pytest-cov distlib==0.3.8 # via virtualenv docutils==0.20.1 @@ -86,13 +86,18 @@ isort==5.13.2 jinja2==3.1.3 # via # -c requirements/main.txt + # scriv # sphinx +markdown-it-py==3.0.0 + # via scriv markupsafe==2.1.5 # via # -c requirements/main.txt # jinja2 mccabe==0.7.0 # via flake8 +mdurl==0.1.2 + # via markdown-it-py multidict==6.0.5 # via yarl mypy==1.9.0 @@ -107,6 +112,8 @@ packaging==24.0 # pytest # sphinx # tox +pip==24.3.1 + # via pip-tools pip-tools==7.4.1 # via -r requirements/dev.in platformdirs==4.2.0 @@ -171,6 +178,7 @@ requests==2.31.0 # via # -c requirements/main.txt # responses + # scriv # sphinx responses==0.25.0 # via -r requirements/dev.in @@ -178,6 +186,10 @@ rsa==4.9 # via # -c requirements/main.txt # google-auth +scriv==1.5.1 + # via -r requirements/dev.in +setuptools==75.6.0 + # via pip-tools snowballstemmer==2.2.0 # via sphinx soupsieve==2.5 @@ -228,7 +240,6 @@ types-s3transfer==0.10.0 typing-extensions==4.10.0 # via # -c requirements/main.txt - # boto3-stubs # mypy urllib3==2.0.7 # via @@ -236,6 +247,10 @@ urllib3==2.0.7 # requests # responses # types-requests +uv==0.5.8 + # via + # -c requirements/main.txt + # -r requirements/dev.in vcrpy==6.0.1 # via pytest-vcr virtualenv==20.25.1 @@ -246,7 +261,3 @@ wrapt==1.16.0 # via vcrpy yarl==1.9.4 # via vcrpy - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/requirements/main.in b/requirements/main.in index 20dbb4e..0ecac6f 100644 --- a/requirements/main.in +++ b/requirements/main.in @@ -22,4 +22,7 @@ boto3~=1.34 # GitHub AA Provider cachetools~=5.3 -importlib-metadata; python_version < '3.13' +# uv: fast pip replacement +uv + +importlib-metadata; python_version < '3.14' diff --git a/requirements/main.txt b/requirements/main.txt index 9afde47..7b5fdec 100644 --- a/requirements/main.txt +++ b/requirements/main.txt @@ -1,24 +1,20 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-emit-index-url --output-file=requirements/main.txt requirements/main.in -# +# This file was autogenerated by uv via the following command: +# uv pip compile --no-emit-index-url -o requirements/main.txt requirements/main.in azure-core==1.30.1 # via azure-storage-blob azure-storage-blob==12.19.1 - # via -r main.in + # via -r requirements/main.in blinker==1.7.0 # via flask boto3==1.34.59 - # via -r main.in + # via -r requirements/main.in botocore==1.34.59 # via # boto3 # s3transfer cachetools==5.3.3 # via - # -r main.in + # -r requirements/main.in # google-auth certifi==2024.2.2 # via requests @@ -30,19 +26,19 @@ click==8.1.7 # via flask cryptography==42.0.5 # via - # -r main.in + # -r requirements/main.in # azure-storage-blob figcan==0.0.4 - # via -r main.in + # via -r requirements/main.in flask==2.3.3 # via - # -r main.in + # -r requirements/main.in # flask-classful # flask-marshmallow flask-classful==0.16.0 - # via -r main.in + # via -r requirements/main.in flask-marshmallow==0.15.0 - # via -r main.in + # via -r requirements/main.in google-api-core==2.17.1 # via # google-cloud-core @@ -55,7 +51,7 @@ google-auth==2.28.2 google-cloud-core==2.4.1 # via google-cloud-storage google-cloud-storage==2.15.0 - # via -r main.in + # via -r requirements/main.in google-crc32c==1.5.0 # via # google-cloud-storage @@ -66,8 +62,8 @@ googleapis-common-protos==1.63.0 # via google-api-core idna==3.6 # via requests -importlib-metadata==7.0.2 ; python_version < "3.13" - # via -r main.in +importlib-metadata==7.0.2 + # via -r requirements/main.in isodate==0.6.1 # via azure-storage-blob itsdangerous==2.1.2 @@ -104,15 +100,15 @@ pyasn1-modules==0.3.0 pycparser==2.21 # via cffi pyjwt==2.8.0 - # via -r main.in + # via -r requirements/main.in python-dateutil==2.9.0.post0 # via - # -r main.in + # -r requirements/main.in # botocore python-dotenv==1.0.1 - # via -r main.in + # via -r requirements/main.in pyyaml==6.0.1 - # via -r main.in + # via -r requirements/main.in requests==2.31.0 # via # azure-core @@ -129,18 +125,20 @@ six==1.16.0 # python-dateutil typing-extensions==4.10.0 # via - # -r main.in + # -r requirements/main.in # azure-core # azure-storage-blob urllib3==2.0.7 # via # botocore # requests +uv==0.5.8 + # via -r requirements/main.in webargs==8.4.0 - # via -r main.in + # via -r requirements/main.in werkzeug==3.0.3 # via - # -r main.in + # -r requirements/main.in # flask zipp==3.17.0 # via importlib-metadata From 1a7ab22937807e8caa1c0d23665a7e62bb538a85 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 13 Dec 2024 11:21:40 -0700 Subject: [PATCH 2/4] Add changelog fragment --- changelog.d/20241213_112045_athornton_DM_42598.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog.d/20241213_112045_athornton_DM_42598.md diff --git a/changelog.d/20241213_112045_athornton_DM_42598.md b/changelog.d/20241213_112045_athornton_DM_42598.md new file mode 100644 index 0000000..146d8c4 --- /dev/null +++ b/changelog.d/20241213_112045_athornton_DM_42598.md @@ -0,0 +1,8 @@ + + +### New features + +- Support Python 3.13 + +- Work through PyPi publication + From e0c437a1c94d348186048e90dfa2857ddb4e4c88 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 13 Dec 2024 11:29:05 -0700 Subject: [PATCH 3/4] Slightly fix README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a12bd63..42242cb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Giftless - a Pluggable Git LFS Server [![Maintainability](https://api.codeclimate.com/v1/badges/58f05c5b5842c8bbbdbb/maintainability)](https://codeclimate.com/github/datopian/giftless/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/58f05c5b5842c8bbbdbb/test_coverage)](https://codeclimate.com/github/datopian/giftless/test_coverage) -Giftless a Python implementation of a [Git LFS][1] Server. It is designed +Giftless is a Python implementation of a [Git LFS][1] Server. It is designed with flexibility in mind, to allow pluggable storage backends, transfer methods and authentication methods. @@ -40,7 +40,7 @@ Documentation License ------- -Copyright (C) 2020, Datopian / Viderum, Inc. +Copyright (C) 2020-2024, Datopian / Viderum, Inc. Giftless is free / open source software and is distributed under the terms of the MIT license. See [LICENSE](LICENSE) for details. From 31c21abd313b4abd62e25c7a1f9e215a1b96efcd Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 13 Dec 2024 11:38:35 -0700 Subject: [PATCH 4/4] Drop 3.13 suport for now; grpcio rebuild gets ugly --- .github/workflows/ci.yaml | 7 +++---- pyproject.toml | 3 +++ requirements/main.in | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d504eb1..8b3f2f9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: Run pre-commit uses: pre-commit/action@v3.0.1 @@ -41,7 +41,6 @@ jobs: - "3.10" - "3.11" - "3.12" - - "3.13" steps: - uses: actions/checkout@v4 @@ -90,7 +89,7 @@ jobs: - name: Build and publish uses: lsst-sqre/build-and-publish-to-pypi@v2 with: - python-version: "3.13" + python-version: "3.12" upload: false pypi: @@ -117,4 +116,4 @@ jobs: - name: Build and publish uses: lsst-sqre/build-and-publish-to-pypi@v2 with: - python-version: "3.13" + python-version: "3.12" diff --git a/pyproject.toml b/pyproject.toml index 6532e7b..39b1b21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,9 @@ email="hello@rufuspollock.com" name="Adam Thornton" email="athornton@lsst.org" +[[project.authors]] +name="Vit Zikmund" + [project.urls] Homepage = "https://giftless.datopian.com" Source = "https://github.com/datopian/giftless" diff --git a/requirements/main.in b/requirements/main.in index 0ecac6f..611cda2 100644 --- a/requirements/main.in +++ b/requirements/main.in @@ -25,4 +25,4 @@ cachetools~=5.3 # uv: fast pip replacement uv -importlib-metadata; python_version < '3.14' +importlib-metadata; python_version < '3.13'