diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dfe1cdc..3350ba8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,11 @@ jobs: test: name: unittests - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 # Ubuntu LTS 22.04 is the latest image that includes Python3.7 strategy: matrix: toxenv: + - py37-scrapy29 - py312-scrapy29 - py38-scrapy210 - py312-scrapy210 @@ -38,6 +39,8 @@ jobs: - py312-scrapy211 - py312-scrapymaster include: + - toxenv: py37-scrapy29 + python-version: 3.7 - toxenv: py312-scrapy29 python-version: '3.12' diff --git a/README.md b/README.md index 7c35a08..94e2e2b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Scrapy Webarchive is a plugin for Scrapy that allows users to capture and export ## Compatibility -* Python 3.8, 3.9, 3.10, 3.11 and 3.12 +* Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 ## Documentation diff --git a/pyproject.toml b/pyproject.toml index ad82579..e9af0de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ dependencies = [ "wacz==0.5.0", "cdxj-indexer==1.4.5", ] -requires-python = ">=3.8,<3.13" +requires-python = ">=3.7,<3.13" authors = [] maintainers = [] description = "A webarchive extension for Scrapy" diff --git a/scrapy_webarchive/wacz/storages.py b/scrapy_webarchive/wacz/storages.py index 313bce2..57732c6 100644 --- a/scrapy_webarchive/wacz/storages.py +++ b/scrapy_webarchive/wacz/storages.py @@ -3,7 +3,6 @@ import struct import zipfile from abc import ABC, abstractmethod -from functools import cached_property from io import BytesIO from urllib.parse import unquote, urlparse @@ -207,7 +206,7 @@ def _calculate_range(self, metadata: dict, offset: int, size: int) -> str: end = start + size - 1 return f"bytes={start}-{end}" - @cached_property + @property def zip_exists(self) -> bool: return bool(self.get_file_info()) diff --git a/tox.ini b/tox.ini index ee49c82..e778c69 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,8 @@ skipsdist = True usedevelop = True envlist = - py{38,39,310,311,312}-scrapy{29,210,211}, + py{37,38,39,310,311,312}-scrapy29, + py{38,39,310,311,312}-scrapy{210,211}, py{39,310,311,312}-scrapymaster, [testenv] @@ -12,6 +13,7 @@ allowlist_externals = py.test commands = py.test tests/ basepython = + py37: python3.7 py38: python3.8 py39: python3.9 py310: python3.10