Skip to content

Commit

Permalink
Release 0.10.2 (#113)
Browse files Browse the repository at this point in the history
* Import `requests` only if it's really needed
  • Loading branch information
liminspace authored Aug 28, 2020
1 parent 9941937 commit 5f4e450
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.10.2 (2020-08-28)
===================
* Import `requests` only if it's really needed


0.10.1 (2020-08-16)
===================
* Added supporting Django v3.1
Expand Down
2 changes: 1 addition & 1 deletion mjml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.10.1'
__version__ = '0.10.2'

default_app_config = 'mjml.apps.MJMLConfig'
4 changes: 2 additions & 2 deletions mjml/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import random
import subprocess
import tempfile
import requests
import requests.auth
from django.utils.encoding import force_str, force_bytes
from mjml import settings as mjml_settings

Expand Down Expand Up @@ -103,6 +101,8 @@ def _mjml_render_by_tcpserver(mjml_code):


def _mjml_render_by_httpserver(mjml_code):
import requests.auth

if len(mjml_settings.MJML_HTTPSERVERS) > 1:
servers = list(mjml_settings.MJML_HTTPSERVERS)[:]
random.shuffle(servers)
Expand Down
1 change: 0 additions & 1 deletion testprj/tests_httpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from django.test import TestCase
from django.utils.encoding import force_bytes
from mjml import settings as mjml_settings
from mjml.tools import requests
from testprj.tools import safe_change_mjml_settings, MJMLServers, MJMLFixtures, render_tpl


Expand Down

0 comments on commit 5f4e450

Please sign in to comment.