Skip to content

Commit

Permalink
Drop py37, add py310 and py311, drop flaky macos tests and fix broken…
Browse files Browse the repository at this point in the history
… docs (#345)

* drop py37, add py310-312 and drop flaky macos tests

* drop py37, add py310-312 and drop flaky macos tests
  • Loading branch information
northernSage authored Feb 10, 2024
1 parent a729926 commit 8764fbe
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 36 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/lock.yaml

This file was deleted.

15 changes: 4 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,17 @@ jobs:
fail-fast: false
matrix:
include:
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39}
- {name: Mac, python: '3.9', os: macos-latest, tox: py39}
- {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
- {name: Typing, python: '3.9', os: ubuntu-latest, tox: typing}
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
- {name: Typing, python: '3.12', os: ubuntu-latest, tox: typing}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: install external dependencies Mac
if: matrix.os == 'macos-latest'
run: brew install libmemcached memcached redis
- name: Setup Docker on macOS
if: matrix.os == 'macos-latest'
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- name: install external dependencies Linux
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ htmlcov/
.xprocess
.vscode
.python-version
/.idea/.gitignore
/.idea/cachelib.iml
/.idea/misc.xml
/.idea/modules.xml
/.idea/inspectionProfiles/profiles_settings.xml
/.idea/vcs.xml
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python:
install:
- requirements: requirements/docs.txt
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers =
packages = find:
package_dir = = src
include_package_data = true
python_requires = >= 3.7
python_requires = >= 3.8

[options.packages.find]
where = src
Expand Down
5 changes: 1 addition & 4 deletions src/cachelib/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,7 @@ def _remove_older(self) -> bool:
exc_info=True,
)
fname_sorted = (
fname
for _, fname in sorted(
exp_fname_tuples, key=lambda item: item[0] # type: ignore
)
fname for _, fname in sorted(exp_fname_tuples, key=lambda item: item[0])
)
for fname in fname_sorted:
try:
Expand Down
5 changes: 1 addition & 4 deletions src/cachelib/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ def _remove_expired(self, now: float) -> None:

def _remove_older(self) -> None:
k_ordered = (
k
for k, v in sorted(
self._cache.items(), key=lambda item: item[1][0] # type: ignore
)
k for k, v in sorted(self._cache.items(), key=lambda item: item[1][0])
)
for k in k_ordered:
self._cache.pop(k, None)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{39,38,37,310}
py{38,39,310,311}
style
typing
docs
Expand Down

0 comments on commit 8764fbe

Please sign in to comment.