Skip to content
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

Merged
merged 2 commits into from
Sep 25, 2022

Conversation

adamchainz
Copy link
Contributor

No description provided.

@@ -14,7 +13,7 @@
long_description=readme,
long_description_content_type="text/x-rst",
py_modules=["dj_database_url"],
install_requires=["Django>3.2"],
Copy link
Contributor Author

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 -*-
Copy link
Contributor Author

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

Comment on lines -52 to -60
# 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"
Copy link
Contributor Author

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

.github/workflows/release.yml Show resolved Hide resolved
Comment on lines -13 to -17
# 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"
Copy link
Contributor Author

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

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #183 (8b1e1fc) into master (723788a) will increase coverage by 5.89%.
The diff coverage is n/a.

@@            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     
Impacted Files Coverage Δ
dj_database_url.py 86.15% <ø> (+5.89%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@KyeRussell
Copy link

KyeRussell commented Sep 22, 2022

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.

@mattseymour mattseymour merged commit 742d74d into jazzband:master Sep 25, 2022
@adamchainz adamchainz deleted the django_4.1 branch September 26, 2022 07:52
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants