mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 07:17:52 +10:00
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:
6
archivebox/crawls/migrations/0002_drop_seed_model.py
Normal file → Executable file
6
archivebox/crawls/migrations/0002_drop_seed_model.py
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
import archivebox.base_models.models
|
||||
import django.db.models.deletion
|
||||
import pathlib
|
||||
import uuid
|
||||
from archivebox import uuid_compat
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='crawl',
|
||||
name='id',
|
||||
field=models.UUIDField(default=uuid.uuid7, editable=False, primary_key=True, serialize=False, unique=True),
|
||||
field=models.UUIDField(default=uuid_compat.uuid7, editable=False, primary_key=True, serialize=False, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='crawl',
|
||||
@@ -53,7 +53,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='crawlschedule',
|
||||
name='id',
|
||||
field=models.UUIDField(default=uuid.uuid7, editable=False, primary_key=True, serialize=False, unique=True),
|
||||
field=models.UUIDField(default=uuid_compat.uuid7, editable=False, primary_key=True, serialize=False, unique=True),
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Seed',
|
||||
|
||||
2
archivebox/crawls/models.py
Normal file → Executable file
2
archivebox/crawls/models.py
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
__package__ = 'archivebox.crawls'
|
||||
|
||||
from typing import TYPE_CHECKING, Iterable
|
||||
from uuid import uuid7
|
||||
from archivebox.uuid_compat import uuid7
|
||||
from pathlib import Path
|
||||
|
||||
from django.db import models
|
||||
|
||||
Reference in New Issue
Block a user