Add Python 3.13 support with uuid7 backport compatibility

- Create uuid_compat.py module that provides uuid7 for Python <3.14
  using uuid_extensions package, and native uuid.uuid7 for Python 3.14+
- Update all model files and migrations to use archivebox.uuid_compat
- Add uuid7 conditional dependency in pyproject.toml for Python <3.14
- Update requires-python to >=3.13 (from >=3.14)
- Update GitHub workflows, lock_pkgs.sh to use Python 3.13
- Update tool configs (ruff, pyright, uv) for Python 3.13

This enables running ArchiveBox on Python 3.13 while maintaining
forward compatibility with Python 3.14's native uuid7 support.
This commit is contained in:
Claude
2025-12-27 01:07:30 +00:00
parent cff4077c23
commit ae2ab5b273
15 changed files with 51 additions and 27 deletions

2
.github/workflows/pip.yml vendored Normal file → Executable file
View File

@@ -9,7 +9,7 @@ on:
- 'v*'
env:
PYTHON_VERSION: 3.14
PYTHON_VERSION: "3.13"
jobs:
build:

4
.github/workflows/test.yml vendored Normal file → Executable file
View File

@@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
# os: [ubuntu-22.04, macos-latest, windows-latest]
python: [3.14]
python: ["3.13"]
steps:
- uses: actions/checkout@v4
@@ -38,7 +38,7 @@ jobs:
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.14'
python-version: '3.13'
cache: true
### Install Python & JS Dependencies