Skip to content

Commit

Permalink
reverts commit 90da370
Browse files Browse the repository at this point in the history
issue "cannot import name '_basic_auth_str' from partially initialized
module 'requests.auth'" was coming from project djaopsp defining a `Signal`
with `providing_args` parameter while booting with Django4.2.
  • Loading branch information
smirolo committed Oct 1, 2024
1 parent 90da370 commit f344c01
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions extended_templates/backends/eml.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import codecs, logging, os, warnings

from bs4 import BeautifulSoup
from django import VERSION as DJANGO_VERSION
from django.core.mail import EmailMultiAlternatives
from django.template import engines
from django.utils.html import strip_tags
Expand Down Expand Up @@ -139,11 +140,6 @@ def get_template(self, template_name, dirs=_dirs_undefined):
if dirs is _dirs_undefined:
return Template(self.engine.get_template(
template_name), engine=self)
# We cannot `import django` at toplevel with Django4.2,
# as it will create an import loop in the `requests` module
# through `premailer`. Don't ask.
#pylint:disable=import-outside-toplevel
from django import VERSION as DJANGO_VERSION
if DJANGO_VERSION[0] >= 1 and DJANGO_VERSION[1] >= 8:
warnings.warn(
"The dirs argument of get_template is deprecated.",
Expand Down

0 comments on commit f344c01

Please sign in to comment.