Commit 7d40007
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 -> collections1 parent bbbd253 commit 7d40007
42 files changed
Lines changed: 115 additions & 639 deletions
File tree
- emails
- backend
- inmemory
- smtp
- compat
- django
- loader
- store
- template
- testsuite
- django_
- loader
- message
- smtp
- store
- transformer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments