diff --git a/Dockerfile b/Dockerfile index 9cb40f5..06423ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8 +FROM python:3.11-slim-buster RUN apt update && apt install poppler-utils -y COPY setup.py setup.cfg README.rst ./ COPY refextract refextract/ diff --git a/refextract/references/api.py b/refextract/references/api.py index 6fba533..bc28056 100644 --- a/refextract/references/api.py +++ b/refextract/references/api.py @@ -152,7 +152,8 @@ def extract_references_from_file(path, extracted_texkeys_urls = extract_texkeys_and_urls_from_pdf(path) if len(extracted_texkeys_urls) == len(parsed_refs): parsed_refs_updated = [] - for ref, ref_texkey_urls in zip(parsed_refs, extracted_texkeys_urls): + for ref, ref_texkey_urls in zip(parsed_refs, extracted_texkeys_urls, + strict=False): update_reference_with_urls(ref, ref_texkey_urls.get('urls', [])) if ref.get('url'): ref['url'] = dedupe_list(ref['url']) diff --git a/ruff.toml b/ruff.toml index 8e81eb6..41c11f7 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,4 @@ -target-version = "py38" +target-version = "py311" [lint.flake8-tidy-imports] ban-relative-imports = "all" diff --git a/tests/test_kbs.py b/tests/test_kbs.py index 509ad22..c3968a5 100644 --- a/tests/test_kbs.py +++ b/tests/test_kbs.py @@ -42,7 +42,7 @@ def test_get_kbs_caches_journal_dict(): # the cache is reused, so identity of the cache elements doesn't change assert all( cached_first is cached_second for (cached_first, cached_second) - in zip(first_cache["journals"], second_cache["journals"]) + in zip(first_cache["journals"], second_cache["journals"], strict=False) ) @@ -55,7 +55,7 @@ def test_get_kbs_invalidates_cache_if_input_changes(): # the cache is invalidated, so identity of the cache elements changes assert all( cached_first is not cached_second for (cached_first, cached_second) - in zip(first_cache["journals"], second_cache["journals"]) + in zip(first_cache["journals"], second_cache["journals"], strict=False) ) assert len(second_cache["journals"]) == 3 assert second_cache["journals"][-1] == ["JOURNAL OF TESTING", "J TEST"]