Skip to content

Commit 7d40007

Browse files
authored
Remove Python 2 compatibility code (#188)
* Remove Python 2 compatibility code - Remove from __future__ imports from all files - Simplify emails/compat: remove Python 2 branch, keep only Python 3 code - Delete unused ordereddict.py and orderedset.py - Remove is_py2/is_py3/is_py26/is_py34_plus version checks - Remove Travis CI pypy workaround from test_loaders - All 74 tests pass on Python 3.14 * Remove emails.compat module entirely Move to_unicode, to_native, to_bytes, formataddr to emails.utils. Replace all compat aliases with direct stdlib imports: - string_types -> str - text_type -> str - is_callable -> callable() - urlparse -> urllib.parse - NativeStringIO/StringIO/BytesIO -> io - OrderedDict -> collections
1 parent bbbd253 commit 7d40007

42 files changed

Lines changed: 115 additions & 639 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

emails/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
3636
"""
3737

38-
from __future__ import unicode_literals
3938

4039
__title__ = 'emails'
4140
__version__ = '0.6'

emails/backend/inmemory/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# encoding: utf-8
2-
from __future__ import unicode_literals
32

43
__all__ = ['InMemoryBackend', ]
54

emails/backend/smtp/backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# encoding: utf-8
2-
from __future__ import unicode_literals
32
import smtplib
43
import logging
54
from functools import wraps

emails/backend/smtp/exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# encoding: utf-8
2-
from __future__ import unicode_literals
32
import socket
43

54

emails/compat/__init__.py

Lines changed: 0 additions & 185 deletions
This file was deleted.

emails/compat/_urlparse.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)