snok / django-auth-adfs

A Django authentication backend for Microsoft ADFS and AzureAD
http://django-auth-adfs.readthedocs.io/
BSD 2-Clause "Simplified" License
270 stars 100 forks source link

Import changes for Django 4.0 compatibility #210

Closed mcrowepfx closed 2 years ago

mcrowepfx commented 2 years ago

Hello! I'm a grateful user of this package, and it's currently blocking me from updating several projects to Django 4.0. The only incompatibilities I see are in certain imports, and this PR should resolve them.

codecov[bot] commented 2 years ago

Codecov Report

Merging #210 (7570d1e) into master (5db3ff0) will decrease coverage by 0.3%. The diff coverage is 75.0%.

@@           Coverage Diff            @@
##           master    #210     +/-   ##
========================================
- Coverage    85.9%   85.6%   -0.4%     
========================================
  Files          11      11             
  Lines         497     500      +3     
========================================
+ Hits          427     428      +1     
- Misses         70      72      +2     
Impacted Files Coverage Δ
django_auth_adfs/views.py 85.1% <60.0%> (-3.6%) :arrow_down:
django_auth_adfs/__init__.py 100.0% <100.0%> (ø)
django_auth_adfs/drf_urls.py 100.0% <100.0%> (ø)
django_auth_adfs/urls.py 100.0% <100.0%> (ø)
sondrelg commented 2 years ago

Thanks for this @mcrowepfx! Would you mind rebasing on master to pull in the Django 4.0 test matrix?

mcrowepfx commented 2 years ago

Sure, done.

sondrelg commented 2 years ago

I pushed 1ac87ce37ef0af83f9bf7e1e278adde38d5373d5 to the PR to see if that would resolve the remaining failing test - I think this is the way we should specify Django as a dependency. However, it looks like there are failing v3.8 and v4.0 test among other things. The v3.8 tests I suspect need to be fixed, while the v4 I'm not sure about yet - it could be that we need to fix the pyproject.toml somehow. Can look at it more tomorrow. Feel free to take a look meanwhile @JonasKs

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication