carltongibson / django-filter

A generic system for filtering Django QuerySets based on user selections
https://django-filter.readthedocs.io/en/main/
Other
4.44k stars 767 forks source link

Fix DeprecationWarning for pkgutil.find_loader #1623

Closed wmorrell closed 10 months ago

wmorrell commented 10 months ago

The find_loader function is deprecated in Python 3.12 and slated for removal in Python 3.14. The function is a wrapper around importlib.util.find_spec, and returning the loader attribute from that call. The code isn't using the loader, and only checking that the import path exists, so we may use the wrapped function directly, instead.

fixes: #1616

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4a618e0) 98.59% compared to head (40b0bf3) 98.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1623 +/- ## ======================================= Coverage 98.59% 98.59% ======================================= Files 15 15 Lines 1281 1281 ======================================= Hits 1263 1263 Misses 18 18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.