From 64573064e35b34d3f74e76e7e889190026f5d70f Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Sat, 25 Feb 2023 12:50:01 +0700 Subject: [PATCH] Drop Python 3.5, 3.6 and Django 2.1, 2.2, 3.0 and 3.1 support --- .github/workflows/ci.yml | 2 +- README.rst | 4 +++- setup.py | 8 +------- tox.ini | 16 ++++------------ 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 737fb093..7c28d37e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"] experimental: [false] include: - python-version: "3.10" diff --git a/README.rst b/README.rst index ea983554..a1a2b627 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ And there is more to it: Requirements ++++++++++++ -Python 3.5+, Django 2.1+ and Redis 4.0+. +Python 3.7+, Django 3.2+ and Redis 4.0+. Installation @@ -807,6 +807,8 @@ Here come some performance tips to make cacheops and Django ORM faster. Caching querysets with large amount of filters also slows down all subsequent invalidation on that model. You can disable caching if more than some amount of fields is used in filter simultaneously. +6. Split database queries into smaller ones when you cache them. This goes against usual approach, but this allows invalidation to be more granular: smaller parts will be invalidated independently and each part will invalidate more precisely. E.g. `Post.objects.filter(category__slug="foo")` and `Post.objects.filter(category=Category.objects.get(slug="foo"))` + Writing a test -------------- diff --git a/setup.py b/setup.py index 7e3b0cc6..5e46b675 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ ], python_requires='>=3.5', install_requires=[ - 'django>=2.1', + 'django>=3.2', 'redis>=3.0.0', 'funcy>=1.8,<2.0', ], @@ -33,18 +33,12 @@ 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Framework :: Django', - 'Framework :: Django :: 2.1', - 'Framework :: Django :: 2.2', - 'Framework :: Django :: 3.0', - 'Framework :: Django :: 3.1', 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.1', diff --git a/tox.ini b/tox.ini index 0ce71d73..9429b557 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,14 @@ [tox] envlist = lint, - py35-dj{21,22} - py36-dj{30,31}, - py37-dj{30,31,32}, - py{38,39}-dj{30,31,32,40}, + py37-dj32, + py{38,39}-dj{32,40}, py310-dj{32,40,41}, py311-dj41, - pypy3-dj{30,31,32} + pypy3-dj{40,41} [gh-actions] python = - 3.5: py35 - 3.6: py36 3.7: py37 3.8: py38 3.9: py39 @@ -29,16 +25,12 @@ setenv = CPLUS_INCLUDE_PATH=/usr/include/gdal C_INCLUDE_PATH=/usr/include/gdal deps = - dj21: Django>=2.1,<2.2 - dj22: Django>=2.2,<2.3 - dj30: Django>=3.0,<3.1 - dj31: Django>=3.1,<3.2 dj32: Django>=3.2,<3.3 dj40: Django>=4.0,<4.1 dj41: Django>=4.1,<4.2 djmaster: git+https://github.com/django/django mysqlclient - py{35,36,37,38,39,310,311}: psycopg2-binary + py{37,38,39,310,311}: psycopg2-binary ; gdal=={env:GDAL_VERSION:2.4} pypy3: psycopg2cffi>=2.7.6 before_after==1.0.0