eml-parser 3.0.6__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eml_parser-3.0.6 → eml_parser-4.0.0}/PKG-INFO +3 -5
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/decode.py +2 -2
- {eml_parser-3.0.6 → eml_parser-4.0.0}/pyproject.toml +10 -12
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_mimebomb.py +1 -1
- {eml_parser-3.0.6 → eml_parser-4.0.0}/.gitignore +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/LICENSE +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/README.md +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/__init__.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/parser.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/py.typed +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/regexes.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/eml_parser/routing.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/examples/recursively_extract_attachments.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/examples/simple_test.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/__init__.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_decode.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_emlparser.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_pathological_headers.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_regexes.py +0 -0
- {eml_parser-3.0.6 → eml_parser-4.0.0}/tests/test_routing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: eml_parser
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Python EML parser library
|
|
5
5
|
Project-URL: Homepage, https://github.com/GOVCERT-LU/eml_parser
|
|
6
6
|
Project-URL: Documentation, https://eml-parser.readthedocs.io/
|
|
@@ -16,21 +16,19 @@ Classifier: Intended Audience :: Developers
|
|
|
16
16
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
17
17
|
Classifier: Operating System :: OS Independent
|
|
18
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.14
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.15
|
|
25
24
|
Classifier: Topic :: Communications :: Email
|
|
26
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.11
|
|
27
26
|
Requires-Dist: charset-normalizer
|
|
28
27
|
Requires-Dist: publicsuffixlist
|
|
29
28
|
Requires-Dist: python-dateutil
|
|
29
|
+
Requires-Dist: regex>=2026
|
|
30
30
|
Provides-Extra: filemagic
|
|
31
31
|
Requires-Dist: file-magic>=0.4.0; extra == 'filemagic'
|
|
32
|
-
Provides-Extra: regex
|
|
33
|
-
Requires-Dist: regex; extra == 'regex'
|
|
34
32
|
Description-Content-Type: text/markdown
|
|
35
33
|
|
|
36
34
|
[](http://eml-parser.readthedocs.io)
|
|
@@ -209,7 +209,7 @@ def robust_string2date(line: str) -> datetime.datetime:
|
|
|
209
209
|
return datetime.datetime.fromisoformat(default_date)
|
|
210
210
|
|
|
211
211
|
if date_.tzname() is None:
|
|
212
|
-
return date_.replace(tzinfo=datetime.
|
|
212
|
+
return date_.replace(tzinfo=datetime.UTC)
|
|
213
213
|
|
|
214
214
|
return date_
|
|
215
215
|
|
|
@@ -218,7 +218,7 @@ def json_serial(obj: typing.Any) -> str | None:
|
|
|
218
218
|
"""JSON serializer for objects not serializable by default json code."""
|
|
219
219
|
if isinstance(obj, datetime.datetime):
|
|
220
220
|
if obj.tzinfo is not None:
|
|
221
|
-
serial = obj.astimezone(datetime.
|
|
221
|
+
serial = obj.astimezone(datetime.UTC).isoformat()
|
|
222
222
|
else:
|
|
223
223
|
serial = obj.isoformat()
|
|
224
224
|
|
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
|
15
15
|
"Intended Audience :: Developers",
|
|
16
16
|
"Operating System :: OS Independent",
|
|
17
17
|
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
-
"Programming Language :: Python :: 3.10",
|
|
19
18
|
"Programming Language :: Python :: 3.11",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
21
20
|
"Programming Language :: Python :: 3.13",
|
|
@@ -23,11 +22,12 @@ classifiers = [
|
|
|
23
22
|
"Programming Language :: Python :: 3.15",
|
|
24
23
|
"Topic :: Communications :: Email",
|
|
25
24
|
]
|
|
26
|
-
requires-python = ">= 3.
|
|
25
|
+
requires-python = ">= 3.11"
|
|
27
26
|
dependencies = [
|
|
28
27
|
"python-dateutil",
|
|
29
28
|
"charset-normalizer",
|
|
30
29
|
"publicsuffixlist",
|
|
30
|
+
"regex>=2026",
|
|
31
31
|
]
|
|
32
32
|
dynamic = ["version"]
|
|
33
33
|
|
|
@@ -49,22 +49,20 @@ docs = [
|
|
|
49
49
|
"mkdocstrings[crystal,python]",
|
|
50
50
|
]
|
|
51
51
|
dev = [
|
|
52
|
-
"
|
|
53
|
-
"mypy",
|
|
52
|
+
"mypy>=2.3",
|
|
54
53
|
"types-python-dateutil",
|
|
55
54
|
"types-chardet",
|
|
56
|
-
"ruff",
|
|
57
|
-
"prek>=0.
|
|
55
|
+
"ruff>=0.16",
|
|
56
|
+
"prek>=0.5.4",
|
|
58
57
|
]
|
|
59
58
|
test = [
|
|
60
|
-
"pytest>=
|
|
61
|
-
"pytest-sugar",
|
|
62
|
-
"coverage",
|
|
59
|
+
"pytest>=9.1",
|
|
60
|
+
"pytest-sugar>=1.1",
|
|
61
|
+
"coverage>=7.16",
|
|
63
62
|
]
|
|
64
63
|
|
|
65
64
|
[project.optional-dependencies]
|
|
66
65
|
filemagic = ["file-magic >= 0.4.0"]
|
|
67
|
-
regex = ["regex"]
|
|
68
66
|
|
|
69
67
|
[tool.hatch.envs.default]
|
|
70
68
|
installer = "uv"
|
|
@@ -103,7 +101,7 @@ files = [
|
|
|
103
101
|
]
|
|
104
102
|
|
|
105
103
|
[tool.pytest.ini_options]
|
|
106
|
-
minversion = "
|
|
104
|
+
minversion = "9.0"
|
|
107
105
|
testpaths = [
|
|
108
106
|
"tests"
|
|
109
107
|
]
|
|
@@ -111,7 +109,7 @@ testpaths = [
|
|
|
111
109
|
[tool.ruff]
|
|
112
110
|
line-length = 160
|
|
113
111
|
indent-width = 4
|
|
114
|
-
target-version = "
|
|
112
|
+
target-version = "py311"
|
|
115
113
|
include = [
|
|
116
114
|
"pyproject.toml",
|
|
117
115
|
"eml_parser/**/*.py",
|
|
@@ -48,7 +48,7 @@ def mime_bomb_c(depth: int = 124):
|
|
|
48
48
|
b'From: level' + str(i).encode() + b'@test.com\r\n'
|
|
49
49
|
b'To: recipient@test.com\r\n'
|
|
50
50
|
b'Subject: Nesting Level ' + str(depth - i).encode() + b'\r\n'
|
|
51
|
-
b'Date: ' + datetime.datetime.now(tz=getattr(datetime, 'UTC', datetime.
|
|
51
|
+
b'Date: ' + datetime.datetime.now(tz=getattr(datetime, 'UTC', datetime.UTC)).strftime('%a, %d %b %Y %H:%M:%S +0000').encode() + b'\r\n'
|
|
52
52
|
b'MIME-Version: 1.0\r\n'
|
|
53
53
|
b'Content-Type: multipart/mixed; boundary="' + boundary + b'"\r\n\r\n'
|
|
54
54
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|