diff --git a/.python-version b/.python-version index 92536a9e..171a6a93 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.0 +3.12.1 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 18d58e45..5b366087 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -19,7 +19,21 @@ See the fragment files in the `changelog.d directory`_. .. scriv-insert-here -.. _changelog-0.7.4: +.. _changelog-0.7.5: + +0.7.5 — 2023-12-13 +================== + +Changed +------- + +- Use Python 3.12.1. +- Update dependencies. + +Fixed +----- + +- Fake ``pkg_resources`` to enable the use of bagit-python in Python 3.12. 0.7.4 — 2023-12-12 ================== @@ -30,6 +44,10 @@ Changed - Use ``platformdirs`` instead of ``appdirs`` to determine the user data directory. - Update dependencies. + +Fixed +----- + - Update the Submit RPC handler to use the default processing configuration when the user-provided ``config`` field is unset. diff --git a/a3m/__init__.py b/a3m/__init__.py index da8cad69..8d75642a 100644 --- a/a3m/__init__.py +++ b/a3m/__init__.py @@ -1,3 +1,3 @@ -__version__ = "0.7.4" +__version__ = "0.7.5" __all__ = ["__version__"] diff --git a/a3m/cli/__init__.py b/a3m/cli/__init__.py index e69de29b..b567a454 100644 --- a/a3m/cli/__init__.py +++ b/a3m/cli/__init__.py @@ -0,0 +1,28 @@ +import sys +from importlib.metadata import version + + +def shim_pkg_resources(): + """Injects a pkg_resources fake needed by bagit-python in Python 3.12. + + The underlying error is only reproducible if setuptools is not installed. + """ + + class Distribution: + def __init__(self, name): + self.version = version(name) + + class FakeDistributionNotFound(Exception): + pass + + def fake_get_distribution(_, name): + return Distribution(name) + + class PkgResources: + DistributionNotFound = FakeDistributionNotFound + get_distribution = fake_get_distribution + + sys.modules["pkg_resources"] = PkgResources() # type: ignore + + +shim_pkg_resources() diff --git a/a3m/server/packages.py b/a3m/server/packages.py index 5f3bc597..0f1c708f 100644 --- a/a3m/server/packages.py +++ b/a3m/server/packages.py @@ -101,7 +101,6 @@ def _prepare_config(self, provided=None): if provided is not None: for config_field in config.DESCRIPTOR.fields: field_name = config_field.name - print("setattr", field_name, getattr(provided, field_name)) setattr(config, field_name, getattr(provided, field_name)) return config diff --git a/requirements-dev.txt b/requirements-dev.txt index a0f53197..5c7306da 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -15,15 +15,15 @@ attrs==23.1.0 # jsonschema # referencing # scriv -babel==2.13.1 +babel==2.14.0 # via sphinx bagit==1.8.1 # via a3m (pyproject.toml) -bandit==1.7.5 +bandit==1.7.6 # via a3m (pyproject.toml) -boto3==1.33.9 +boto3==1.33.13 # via a3m (pyproject.toml) -botocore==1.33.9 +botocore==1.33.13 # via # boto3 # s3transfer @@ -59,7 +59,7 @@ coverage[toml]==7.3.2 # pytest-cov cryptography==41.0.7 # via secretstorage -distlib==0.3.7 +distlib==0.3.8 # via virtualenv django==4.2.8 # via @@ -85,21 +85,21 @@ gitdb==4.0.11 # via gitpython gitpython==3.1.40 # via bandit -googleapis-common-protos==1.61.0 +googleapis-common-protos==1.62.0 # via # a3m (pyproject.toml) # grpcio-status -grpcio==1.59.3 +grpcio==1.60.0 # via # a3m (pyproject.toml) # grpcio-reflection # grpcio-status # grpcio-tools -grpcio-reflection==1.59.3 +grpcio-reflection==1.60.0 # via a3m (pyproject.toml) -grpcio-status==1.59.3 +grpcio-status==1.60.0 # via a3m (pyproject.toml) -grpcio-tools==1.59.3 +grpcio-tools==1.60.0 # via a3m (pyproject.toml) identify==2.5.33 # via pre-commit @@ -178,7 +178,7 @@ pluggy==1.3.0 # via # pytest # tox -pre-commit==3.5.0 +pre-commit==3.6.0 # via a3m (pyproject.toml) prometheus-client==0.19.0 # via a3m (pyproject.toml) @@ -313,7 +313,7 @@ types-psycopg2==2.9.21.20 # via django-types types-requests==2.31.0.10 # via a3m (pyproject.toml) -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via # django-stubs-ext # mypy diff --git a/requirements.txt b/requirements.txt index 22e76310..21507371 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,9 +14,9 @@ attrs==23.1.0 # referencing bagit==1.8.1 # via a3m (pyproject.toml) -boto3==1.33.9 +boto3==1.33.13 # via a3m (pyproject.toml) -botocore==1.33.9 +botocore==1.33.13 # via # boto3 # s3transfer @@ -32,18 +32,18 @@ django==4.2.8 # django-stubs-ext django-stubs-ext==4.2.7 # via a3m (pyproject.toml) -googleapis-common-protos==1.61.0 +googleapis-common-protos==1.62.0 # via # a3m (pyproject.toml) # grpcio-status -grpcio==1.59.3 +grpcio==1.60.0 # via # a3m (pyproject.toml) # grpcio-reflection # grpcio-status -grpcio-reflection==1.59.3 +grpcio-reflection==1.60.0 # via a3m (pyproject.toml) -grpcio-status==1.59.3 +grpcio-status==1.60.0 # via a3m (pyproject.toml) idna==3.6 # via requests @@ -101,7 +101,7 @@ sqlparse==0.4.4 # via django tenacity==8.2.3 # via a3m (pyproject.toml) -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via django-stubs-ext unidecode==1.3.7 # via a3m (pyproject.toml)