diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba3267e..3a5f250 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] fail-fast: false steps: - uses: actions/checkout@v2 diff --git a/httpx_cache/cache/file.py b/httpx_cache/cache/file.py index 765170a..24a7d52 100644 --- a/httpx_cache/cache/file.py +++ b/httpx_cache/cache/file.py @@ -1,6 +1,5 @@ import typing as tp from pathlib import Path -from functools import partial from anyio import to_thread from fasteners import ReaderWriterLock as RWLock @@ -120,5 +119,4 @@ def delete(self, request: httpx.Request) -> None: async def adelete(self, request: httpx.Request) -> None: filepath = get_cache_filepath(self.cache_dir, request, extra=self._extra) async with self.async_lock.writer: - _func = partial(filepath.unlink, missing_ok=True) - await to_thread.run_sync(_func, cancellable=True) + await to_thread.run_sync(filepath.unlink, True, cancellable=True) diff --git a/pyproject.toml b/pyproject.toml index 4d9a627..f9ea700 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,14 +4,12 @@ build-backend = "hatchling.build" [project] name = "httpx-cache" -version = "0.12.0" +version = "0.13.0" description = "Simple caching transport for httpx." readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8" license-files = { paths = ["LICENSE"] } -authors = [ - { name = "Ouail Bendidi", email = "ouail.bendidi@gmail.com" }, -] +authors = [{ name = "Ouail Bendidi", email = "ouail.bendidi@gmail.com" }] repository = "https://github.com/obendidi/httpx-cache" homepage = "https://github.com/obendidi/httpx-cache" keywords = ["httpx", "cache", "cache-control"] @@ -38,7 +36,7 @@ dependencies = [ "msgpack~=1.0", "fasteners>=0.16.3,<0.18.0", "attrs>=21.4,<24.0", - "aiorwlock~=1.2" + "aiorwlock~=1.2", ] [project.optional-dependencies] @@ -50,26 +48,26 @@ Documentation = "https://obendidi.github.io/httpx-cache/" [tool.hatch.envs.dev] extra-dependencies = [ - "httpx-cache[redis]", - # Test dependencies - "pytest~=7.2", - "coverage[toml]~=6.5", - "pytest-cov~=3.0", - "chardet~=5.0", - "types-chardet~=5.0", - "pytest-cases~=3.6.8", - "respx~=0.19", - "mock~=4.0", - "types-mock~=4.0", - # Linting - "ruff~=0.0.260", - "black~=23.3.0", - "mypy~=1.1.1", - "pre-commit", - # Doc dependencies - "mkdocs~=1.4", - "mkautodoc~=0.1", - "mkdocs-material~=8.1" + "httpx-cache[redis]", + # Test dependencies + "pytest~=7.2", + "coverage[toml]~=6.5", + "pytest-cov~=3.0", + "chardet~=5.0", + "types-chardet~=5.0", + "pytest-cases~=3.6.8", + "respx~=0.19", + "mock~=4.0", + "types-mock~=4.0", + # Linting + "ruff~=0.0.260", + "black~=23.3.0", + "mypy~=1.1.1", + "pre-commit", + # Doc dependencies + "mkdocs~=1.4", + "mkautodoc~=0.1", + "mkdocs-material~=8.1", ]