-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Support Django 4.1 and remove compatibility code #183
Conversation
@@ -14,7 +13,7 @@ | |||
long_description=readme, | |||
long_description_content_type="text/x-rst", | |||
py_modules=["dj_database_url"], | |||
install_requires=["Django>3.2"], |
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.
looks like this was accidentally blocking install on still-supported Django 3.2 since #162
@@ -1,4 +1,3 @@ | |||
# -*- coding: utf-8 -*- |
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.
removing Python 2 compat comment
# https://docs.djangoproject.com/en/2.0/releases/2.0/#id1 | ||
if DJANGO_VERSION and DJANGO_VERSION < (2, 0): | ||
SCHEMES["postgres"] = "django.db.backends.postgresql_psycopg2" | ||
SCHEMES["postgresql"] = "django.db.backends.postgresql_psycopg2" | ||
SCHEMES["pgsql"] = "django.db.backends.postgresql_psycopg2" | ||
else: | ||
SCHEMES["postgres"] = "django.db.backends.postgresql" | ||
SCHEMES["postgresql"] = "django.db.backends.postgresql" | ||
SCHEMES["pgsql"] = "django.db.backends.postgresql" |
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 2.0 is long past supported so this compatibility branch can go
# Django deprecated the `django.db.backends.postgresql_psycopg2` in 2.0. | ||
# https://docs.djangoproject.com/en/2.0/releases/2.0/#id1 | ||
EXPECTED_POSTGRES_ENGINE = "django.db.backends.postgresql" | ||
if DJANGO_VERSION and DJANGO_VERSION < (2, 0): | ||
EXPECTED_POSTGRES_ENGINE = "django.db.backends.postgresql_psycopg2" |
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.
removing test variance from old compat code
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
+ Coverage 80.26% 86.15% +5.89%
==========================================
Files 1 1
Lines 76 65 -11
Branches 14 13 -1
==========================================
- Hits 61 56 -5
+ Misses 9 4 -5
+ Partials 6 5 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
For anyone else looking: by my interpretation this is changing the test matrix and removing compatibility code, so this package should still work in Django 4.1 before the PR is merged. |
No description provided.