Avoid a Python deprecation warning with the collections patch.

Review Request #12312 — Created May 31, 2022 and submitted

chipx86
Django Evolution
release-2.x
django-evolution

Django Evolution provides a compatibility patch to enable
collections.Callable on Python 3.10 with Django <= 2.0. To check
whether to apply the patch, we were checking for the existence of
collections.Callable and the Django version.

The first check led to a deprecation warning on modern versions of
Python, which is annoying when running on a version of Django not
susceptible to the old imports. Instead, we now check the Django version
first, avoiding the warning.

Started up a dev server and saw that the warning no longer appeared.

Summary
Avoid a Python deprecation warning with the collections patch.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (dd98bf5)
Loading...