Skip to content

Commit 29b16f0

Browse files
committed
Remove support for py3.7
Solution: Remove py3.7 from pipelines. Upgrade dependencies. Additionally fixed misnamed notebook and zipnotebooks script. Fixed type hints for backoff confirmer. Functional tests use app registration when possible. Signed-off-by: Paul Hewlett <[email protected]>
1 parent 6e0a605 commit 29b16f0

23 files changed

+173
-197
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
1010
// Append -bullseye or -buster to pin to an OS version.
1111
// Use -bullseye variants on local on arm64/Apple Silicon.
12-
"VARIANT": "3.7",
12+
"VARIANT": "3.8",
1313
// Options
1414
"NODE_VERSION": "lts/*"
1515
}

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11" ]
15+
python-version: ["3.8", "3.9", "3.10", "3.11" ]
1616

1717
steps:
1818
- uses: actions/checkout@v2

DEVELOPMENT.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ RKVST_REFRESH_TOKEN=anything
183183

184184
#### Testing Other Python Versions
185185

186-
##### Python 3.7 (default)
186+
##### Python 3.8 (default)
187187

188-
To build the docker builder image with default Python 3.7:
188+
To build the docker builder image with default Python 3.8:
189189
```bash
190190
task builder
191191
```
@@ -200,23 +200,6 @@ To run the unittests:
200200
task unittests
201201
```
202202

203-
##### Python 3.8
204-
205-
To build the docker builder image with Python 3.8:
206-
```bash
207-
task builder-3.8
208-
```
209-
210-
To check the style
211-
```bash
212-
task check
213-
```
214-
215-
To run the unittests:
216-
```bash
217-
task unittests
218-
```
219-
220203
##### Python 3.9
221204

222205
To build the docker builder image with Python 3.9:

Dockerfile-builder

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG VERSION=3.7
2-
FROM python:${VERSION}-bullseye
1+
ARG VERSION=3.8
2+
FROM python:${VERSION}-bookworm
33

44
# Note that any deps installed here must also be installed in the
55
# github actions workflows:

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ documented at https://docs.rkvst.com
1212
Support
1313
=======
1414

15-
This package currently is tested against Python versions 3.7,3.8,3.9,3.10 and 3.11.
15+
This package currently is tested against Python versions 3.8,3.9,3.10 and 3.11.
1616

17-
The current default version is 3.7 - this means that this package will not
18-
use any features specific to versions 3.8 and later.
17+
The current default version is 3.8 - this means that this package will not
18+
use any features specific to versions 3.9 and later.
1919

2020
After End of Life of a particular Python version, support is offered on a best effort
2121
basis. We may ask you to update your Python version to help solve the problem,

Taskfile.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ tasks:
1515
- ./scripts/builder.sh pip-audit -r requirements.txt
1616

1717
builder:
18-
desc: Build a docker environment with the right dependencies and utilities
19-
cmds:
20-
- ./scripts/build.sh "3.7"
21-
22-
builder-3.8:
2318
desc: Build a docker environment with the right dependencies and utilities
2419
cmds:
2520
- ./scripts/build.sh "3.8"

archivist/confirmer.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111

1212
if TYPE_CHECKING:
1313
# pylint:disable=cyclic-import # but pylint doesn't understand this feature
14+
from backoff._typing import Details
15+
1416
from . import assets, events
1517

18+
1619
from .constants import (
1720
CONFIRMATION_CONFIRMED,
1821
CONFIRMATION_FAILED,
@@ -38,9 +41,9 @@ def __lookup_max_time():
3841
return MAX_TIME
3942

4043

41-
def __on_giveup_confirmation(details: dict[str, Any]):
44+
def __on_giveup_confirmation(details: "Details"):
4245
identity: str = details["args"][1]
43-
elapsed: str = details["elapsed"]
46+
elapsed: float = details["elapsed"]
4447
raise ArchivistUnconfirmedError(
4548
f"confirmation for {identity} timed out after {elapsed} seconds"
4649
)
@@ -105,10 +108,10 @@ def _wait_for_confirmation(self: Managers, identity: str) -> ReturnTypes:
105108
return None # pyright: ignore
106109

107110

108-
def __on_giveup_confirmed(details: dict[str, Any]):
111+
def __on_giveup_confirmed(details: "Details"):
109112
self: PrivateManagers = details["args"][0]
110113
count = self.pending_count
111-
elapsed: int = details["elapsed"]
114+
elapsed: float = details["elapsed"]
112115
raise ArchivistUnconfirmedError(
113116
f"{count} pending assets still present after {elapsed} seconds"
114117
)

docs/features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The definitive guide to the REST API is defined here: https://docs.rkvst.com
1010
This python SDK offers a number of advantages over a simple
1111
REST api (in any language):
1212

13-
* versioned package for the python 3.7,3.8,3.9,3.10,3.11 ecosystem.
13+
* versioned package for the python 3.8,3.9,3.10,3.11 ecosystem.
1414
* automatic confirmation of assets and events: just set **confirm=True** when
1515
creating the asset or event and a sophisticated retry and exponential backoff
1616
algorithm will take care of everything.

docs/notebooks/requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#
22
# jupyter notebooks
3-
ipython~=7.34
3+
ipython~=8.12
44
jupyter~=1.0
5-
jupyterlab~=3.5
6-
jupyter-console~=6.4
5+
jupyterlab~=4.0
6+
jupyter-console~=6.6
77
jupyter-contrib-nbextensions~=0.7
8-
python-dotenv[cli]~=0.21.0
9-
wheel
8+
python-dotenv[cli]~=1.0
9+

docs/readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
formats:
44
- htmlzip
55
python:
6-
version: 3.7
6+
version: 3.8
77
install:
88
- requirements: requirements.txt
99
- method: pip

0 commit comments

Comments
 (0)