From db24948713adb818fa178e9792638eb6bb01d94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Fri, 19 Apr 2024 05:56:45 +0000 Subject: [PATCH] Bump bagit-python from 1.8.1 to 5b772435 --- a3m/cli/__init__.py | 28 ---------------------------- pyproject.toml | 2 +- requirements-dev.txt | 2 +- requirements.txt | 2 +- 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/a3m/cli/__init__.py b/a3m/cli/__init__.py index b567a4548..e69de29bb 100644 --- a/a3m/cli/__init__.py +++ b/a3m/cli/__init__.py @@ -1,28 +0,0 @@ -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/pyproject.toml b/pyproject.toml index 5a1b5001f..edb4eb279 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ # Used by client modules "ammcpc~=0.1", "metsrw~=0.4", - "bagit~=1.8", + "bagit @ git+https://github.com/LibraryOfCongress/bagit-python", "lxml~=4.9", "unidecode~=1.3", "pygfried~=0.6", diff --git a/requirements-dev.txt b/requirements-dev.txt index c5c026f24..1f47218ad 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,7 +12,7 @@ attrs==23.2.0 # scriv babel==2.14.0 # via sphinx -bagit==1.8.1 +bagit @ git+https://github.com/LibraryOfCongress/bagit-python@5b7724356d8c5c3a3be9120814d4d996574485a9 boto3==1.34.84 botocore==1.34.84 # via diff --git a/requirements.txt b/requirements.txt index 1db56f330..aed69b753 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ attrs==23.2.0 # via # jsonschema # referencing -bagit==1.8.1 +bagit @ git+https://github.com/LibraryOfCongress/bagit-python@5b7724356d8c5c3a3be9120814d4d996574485a9 boto3==1.34.84 botocore==1.34.84 # via