Commit graph

642 commits

Author SHA1 Message Date
Benedikt Willi
6ec032e211 Merge branch 'andrew-wang/dj4.2' 2023-06-06 12:07:08 +02:00
Benedikt Willi
2db38ec463 Added more filtered tests 2023-06-06 12:06:53 +02:00
Benedikt Willi
fb5f28aaf0 Merge branch 'andrew-wang/dj4.2' 2023-06-06 11:43:00 +02:00
Benedikt Willi
fa1fbc1a5d Added a FilteredTransactionTestCase, updated tests. 2023-06-06 10:05:44 +02:00
Jack Linke
beff1e4050 Fix simple error 2023-05-25 10:16:10 +02:00
Jack Linke
27eaaa57cc
Correct problems with tests (#234) 2023-05-24 21:35:03 -04:00
Conrad
de63580ae6
Update limits.rst (#230) 2023-04-28 17:31:15 -04:00
Andrew-Chen-Wang
b2d9de2997 Fix CI supported versions 2023-04-04 15:30:23 -04:00
Andrew-Chen-Wang
1d0a06a9ab Remove Python 2 and Django 2.2 code 2023-04-04 15:28:15 -04:00
Andrew Chen Wang
0bda00bd2c
Merge branch 'master' into andrew-wang/dj4.2 2023-04-04 15:18:08 -04:00
Andrew-Chen-Wang
d192bae22c Add Django 4.1-4.2 and Python 3.11 support (Fixes #228)
* Increment version to 4.5.0
2023-04-04 15:14:29 -04:00
Andrew Chen Wang
c955d1bbee
Update CHANGELOG.rst 2023-03-13 05:01:47 -04:00
Andrew Chen Wang
d60834910c
Update version 2023-03-13 05:00:39 -04:00
Petr Dlouhý
03f675c96f
add test that will cause error #226 (#227)
* Update utils.py

verify get_meta isn't none before requesting db_table

* Add passenv to tox.ini

* Fix test_explain in sqlite

* add test that will cause error #226

* try to get around problem with PASSWORD in GitHub actions testing

* fix tests broken not counting with other applications permissions

---------

Co-authored-by: hho6643 <63743025+hho6643@users.noreply.github.com>
Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
2023-03-12 16:39:50 -04:00
David Haas
866b662273
Update utils.py (#225)
* Update utils.py

verify get_meta isn't none before requesting db_table

* Add passenv to tox.ini

* Fix test_explain in sqlite

---------

Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
2023-03-12 16:39:04 -04:00
Dan Koch
52406ec111
Add Django 4.1 support (#219) 2022-08-26 22:06:52 -04:00
Andrew-Chen-Wang
8ab33ad40d Bump version to 2.5.1 2022-02-24 18:41:59 -05:00
Tom Teichler
8f35039d2b
Add test settings to sdist (#203)
* Add test settings to sdist. Closes #200.

* Add remaining necessary test files

Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
2022-02-24 18:38:31 -05:00
Tom Teichler
74cc241891
Include docs in sdist (#202) 2022-02-24 18:34:09 -05:00
Jano Valaska
c8791fec4b
table invalidation condition enhanced (#213) 2022-02-24 18:31:04 -05:00
Andrew Chen Wang
9ba75c2eec
Change CHANGELOG latest version to 2.5.0 from 2.5.6 2022-01-14 18:32:10 -05:00
Andrew Chen Wang
ab2306b4eb
Bump version to 2.5.0 2022-01-14 18:31:46 -05:00
Dominik Bartenstein
434a5759de
Add final SQL check when looking up involved tables (#199) 2021-12-27 12:30:44 -05:00
Andrew Chen Wang
f1087da6f9
Add Django 4.0 support, drop Python 3.6 and Django 3.1 (#208)
* Fix tox.ini and use exclude for ci.yml
* runtests_urls.py had an issue from using pre-Django 2.2 import of urls
* tox.ini forgot to remove 3.7 from Django 4.0 env
* Use re_path
* Avoid system error in Django test
* Fix read/test_union.py
* Test assertion error for read/test_union
* Fix remaining read/test_intersection test
* Bump version
2021-12-07 18:44:25 -05:00
Andrew Chen Wang
a9c5d4d01c
Add Python 3.10 Support (fixes #205) (#206) 2021-11-03 15:05:44 -04:00
Andrew-Chen-Wang
8ef611a1cb Bump vesrion to 2.4.4 2021-11-03 13:04:38 -04:00
Lars Kruse
42af2e0126
Handle queryset implementations without lhs/rhs attribute (#204)
The `ExtraJoinRestriction` class used by django-taggit lacks the
attributes "rhs" and "lhs".
Thus projects cannot use django-taggit together with cachalot.

Closes: #121
2021-10-26 16:34:45 -04:00
Andrew Chen Wang
c8d6af575a
Bump cachalot version [ci skip] 2021-08-23 10:55:34 -04:00
Andrew Chen Wang
f7753ae104
Update CHANGELOG [ci skip] 2021-08-23 10:54:26 -04:00
Andrew Chen Wang
53c99af2c4
Fix Django 3.2 default_app_config deprecation (#198)
* Fix ImportError from setup.py
2021-08-21 20:55:33 -04:00
Dominik Bartenstein
76d4ab4c8d
Simplify annotation handling by using the flatten method: (#197)
* Simplify annotation handling by using the flatten method:
f42ccdd835/django/db/models/expressions.py (L370)

Handle annotated cases when Subquery is part of the When.

* Before Django 3.2 flatten did not check for existence of flatten in the processed nodes.

* Add type BaseExpression to function "flatten".

* Add test case with annotated Coalesce.

* Add support for annotated raw SQL.

* Remove unnecessary code.

* Use as_sql instead of repr.

* Reorganize code

* Fix var name

* Improve naming: element -> expression

Co-authored-by: Dominik Bartenstein <db@zemtu.com>
Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
2021-08-21 20:55:01 -04:00
Andrew Chen Wang
b15027a627
Check for annotated case (#196) 2021-08-19 15:01:56 -04:00
Andrew Chen Wang
4fb23ab029
Check for Uncachables (i.e. Now) in annotations (#195)
* Check for Uncachables for annotations

* Add test case

* Update CHANGELOG.rst
2021-08-19 15:00:47 -04:00
Andrew Chen Wang
5814968b7a
Fix PostgreSQL test cases 2021-08-19 14:14:49 -04:00
Andrew Chen Wang
9d528656d5
Remove duplicate code _find_rhs_lhs_subquery (#190) 2021-06-06 14:17:49 -04:00
Andrew-Chen-Wang
c2696398a8 Bump version [ci skip] 2021-05-26 22:58:44 -04:00
Andrew-Chen-Wang
2c318e0855 Fix proper Python versions for Django main test 2021-05-26 22:58:23 -04:00
Andrew-Chen-Wang
18dd8a7ad9 Updated CHANGELOG 2021-05-26 22:31:05 -04:00
Andrew-Chen-Wang
e88bd18901 Added Django main-branch CI on cron job 2021-05-26 22:30:54 -04:00
Andrew Chen Wang
fe08ef3d28
Drop Django 3.0 support (#189)
* Drop Django 3.0 support
* Extended support for Django 3.0 was ended on April 6, 2021
* Update docs to reflect dropped Django 3.0 version
* Updated links in docs to reflect updated Django docs anchor tag implementation
2021-05-24 22:46:24 -04:00
Andrew Chen Wang
0937680be0
Add CACHALOT_ONLY_CACHABLE_APPS & CACHALOT_UNCACHABLE_APPS (Fixes #186) (#187) 2021-05-24 22:46:00 -04:00
Andrew-Chen-Wang
1569ff75f0 Update setup.py meta and README with constraint [ci skip] 2021-05-13 12:56:49 -04:00
Andrew-Chen-Wang
986431143e Bump correct requirements (Fixes #185) 2021-05-13 12:53:50 -04:00
Andrew Chen Wang
70e970e46f
Update README with compatibility needs [ci skip] 2021-05-13 01:31:07 -04:00
Andrew Chen Wang
5eaffb4958
Add CACHALOT_ADDITIONAL_TABLES for unmanaged models (#183)
* Add CACHALOT_ADDITIONAL_TABLES for unmanaged models
- Fixes #182
- For doc purposes, we do not want to use table_names and want to continue using django_table_names from connection.introspection to avoid a query to the db every request.
2021-05-13 00:44:41 -04:00
Andrew Chen Wang
165cdb6a00
Add Django 3.2 Support and drop error dependency check (#181)
* Remove system check for Django version
* Closes #175
* Bump version and amend CHANGELOG
* Update with GitHub action CI
* Update README with Python and Django versions
* Limit Django version to 3.2, inclusively.
* Add note on Django constraints to README
* Bump minor version
* Justified by dropping support for dependency versions
* Drop support for Django 2.0-2.1, Python 3.5
* Change CI badge in README to GitHub actions
* Add support for Pymemcache for Django 3.2+
* Add Django 3.2 to test matrix
* Fix MySQL test_explain
* Allow filebased delta leniency in tests
* Allow Subquery in finding more Subqueries (Fixes #156)
* Reverts #157 with proper fix. The initial problem was due to `django.db.models.expressions.Subquery` allowing both QuerySet and sql.Query to be used.
* Fixes Django 3.2 test_subquery and test_invalidate_subquery testing by also checking the lhs
* Fix Django 2.2 Subquery having no query attr
* Fix filebased test time delta
* Fix test_invalidate_having due to new inner_query
* The new inner_query replaces subquery for Django 3.2 where subquery is now a boolean. That's why I initially used that TypeError in _get_tables_from_sql. inner_query looks to be a sql.Query
* Add PyMemcacheCache to supported cache backends

Co-authored-by: Dominik George <nik@naturalnet.de>
2021-05-13 00:27:14 -04:00
Andrew Chen Wang
6108d8e5b6
Use GitHub actions & remove Travis (#173) 2021-04-30 14:26:28 -04:00
Andrew-Chen-Wang
76cb929cf5 v2.3.5 2021-04-01 13:52:44 -04:00
Stepan Henek
6826ec6e4d
Fix cachalot_disabled (#174)
unused varialbe LOCAL_STORAGE.enabled was configured
instead of LOCAL_STORAGE.cachalot_enabled which is later used
to turn of the caching
2021-03-30 18:44:47 -04:00
Andrew-Chen-Wang
f02b7f57a2 v2.3.4 2021-03-22 23:12:35 -04:00