-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django 4.x #126
Django 4.x #126
Conversation
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
==========================================
- Coverage 75.24% 75.04% -0.20%
==========================================
Files 13 13
Lines 513 521 +8
Branches 79 78 -1
==========================================
+ Hits 386 391 +5
- Misses 95 99 +4
+ Partials 32 31 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
docs/changelog.txt
Outdated
@@ -1,6 +1,13 @@ | |||
Changelog | |||
========= | |||
|
|||
v4.1 (2022-06-15, iplweb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's iplweb?
v4.1 (2022-06-15, iplweb) | |
v4.1 (2022-06-15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's iplweb ! Changelog updated. I'll be happy to remove my fork as soon as we'll be able to develop dbtemplates via Jazzband.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you got added to the project in #121 (comment) 👍
Are there any remaining blockers to develop via Jazzband? (Other than this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a few forked projects because they were not maintained and instead of renaming them I decided to keep the "-iplweb" suffix. In some cases, like in https://pypi.org/project/django-password-policies-iplweb/ they became pretty popular.
As I had no contact with Jazzband team for some time and I really needed dbtemplates functionality for my app, I did the same thing with it. You can see the remnants of my changes, probably I should have cleaned that up before committing.
If you will find me a worthy partner, I suppose I'll bring some more projects to Jazzband with me in the future.
Co-authored-by: Hugo van Kemenade <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update tox.ini
to something like this to make sure we're testing all the versions:
diff --git a/tox.ini b/tox.ini
index 16d6e9c..6d8861c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,8 +4,8 @@ usedevelop = True
minversion = 1.8
envlist =
flake8
- py3{7,8,9}-dj22
py3{7,8,9,10,11}-dj32
+ py3{8,9,10,11}-dj{40,41,main}
[gh-actions]
python =
Co-authored-by: Hugo van Kemenade <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, almost there!
dbtemplates/utils/cache.py
Outdated
if (django.VERSION[0] >= 3 and django.VERSION[1] >= 2) or django.VERSION[ | ||
0 | ||
] >= 4: # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(django.VERSION[0] >= 3 and django.VERSION[1] >= 2)
is true for 3.2+ and also 4.2+ and 5.2+ etc.
Not a problem in this case, but it's good practice to compare to tuples instead (and we can skip the second part of the OR):
if (django.VERSION[0] >= 3 and django.VERSION[1] >= 2) or django.VERSION[ | |
0 | |
] >= 4: # noqa | |
if (django.VERSION >= (3, 2): |
But we only support Django 3.2+ so we can remove this whole check and simplify the function.
It's a compatibility wrapper, so we can probably remove the whole function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Django 3.2 is the lowest supported version I decided I'll remove it.
|
||
* Moved test runner to GitHub Actions: | ||
|
||
http://github.com/jazzband/django-dbtemplates/actions | ||
|
||
* Django 4.x support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also mention dropping Django < 3.2.
I love it! Having a supportive reviewer who takes care of the details is great, I hope I can learn from you in the future too! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #122.