Skip to content

Commit 0b22c13

Browse files
committed
Merge point release branch for version 2.1.2
2 parents 5cf49cf + 077f568 commit 0b22c13

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

.github/workflows/test_and_build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.0"]
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1212

1313
steps:
1414
- uses: actions/checkout@v3

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ In Development
22
--------------
33

44
* A new option to parse `My Name <address@domain>` strings, i.e. a display name plus an email address in angle brackets, is now available. It is off by default.
5+
6+
2.1.2 (June 16, 2024)
7+
---------------------
8+
9+
* The domain name length limit is corrected from 255 to 253 IDNA ASCII characters. I misread the RFCs.
510
* When a domain name has no MX record but does have an A or AAAA record, if none of the IP addresses in the response are globally reachable (i.e. not Private-Use, Loopback, etc.), the response is treated as if there was no A/AAAA response and the email address will fail the deliverability check.
611
* When a domain name has no MX record but does have an A or AAAA record, the mx field in the object returned by validate_email incorrectly held the IP addresses rather than the domain itself.
712
* Fixes in tests.

email_validator/rfc_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
EMAIL_MAX_LENGTH = 254
4242
LOCAL_PART_MAX_LENGTH = 64
4343
DNS_LABEL_LENGTH_LIMIT = 63 # in "octets", RFC 1035 2.3.1
44-
DOMAIN_MAX_LENGTH = 255 # in "octets", RFC 1035 2.3.4 and RFC 5321 4.5.3.1.2
44+
DOMAIN_MAX_LENGTH = 253 # in "octets" as transmitted, RFC 1035 2.3.4 and RFC 5321 4.5.3.1.2, and see https://stackoverflow.com/questions/32290167/what-is-the-maximum-length-of-a-dns-name
4545

4646
# RFC 2142
4747
CASE_INSENSITIVE_MAILBOX_NAMES = [

email_validator/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.1.1"
1+
__version__ = "2.1.2"

test_requirements.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
# the earliest Python version we support, and some exception
88
# messages may depend on package versions, so we pin versions
99
# for reproducible testing.)
10-
coverage==7.4.4
10+
coverage==7.5.3
1111
dnspython==2.6.1
12-
exceptiongroup==1.2.0
13-
flake8==7.0.0
12+
exceptiongroup==1.2.1
13+
flake8==7.1.0
1414
idna==3.7
1515
iniconfig==2.0.0
1616
mccabe==0.7.0
17-
mypy==1.9.0
17+
mypy==1.10.0
1818
mypy-extensions==1.0.0
19-
packaging==24.0
20-
pluggy==1.4.0
21-
pycodestyle==2.11.1
19+
packaging==24.1
20+
pluggy==1.5.0
21+
pycodestyle==2.12.0
2222
pyflakes==3.2.0
23-
pytest==8.1.1
23+
pytest==8.2.2
2424
pytest-cov==5.0.0
2525
tomli==2.0.1
26-
typing_extensions==4.11.0
26+
typing_extensions==4.12.2

tests/test_syntax.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ def test_domain_literal() -> None:
392392
('obsolete."quoted".atom@example.com', 'The email address contains invalid characters before the @-sign: \'"\'.'),
393393
('11111111112222222222333333333344444444445555555555666666666677777@example.com', 'The email address is too long before the @-sign (1 character too many).'),
394394
('111111111122222222223333333333444444444455555555556666666666777777@example.com', 'The email address is too long before the @-sign (2 characters too many).'),
395-
('me@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.111111111122222222223333333333444444444455555555556.com', 'The email address is too long (4 characters too many).'),
396-
('me@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555566.com', 'The email address is too long after the @-sign (1 character too many).'),
397-
('me@中1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555566.com', 'The email address is too long after the @-sign.'),
395+
('meme@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.com', 'The email address is too long (4 characters too many).'),
396+
('me@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.11111111112222222222333333333344444444445555555555.com', 'The email address is too long after the @-sign (1 character too many).'),
397+
('me@中1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444.com', 'The email address is too long after the @-sign.'),
398398
('my.long.address@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.11111111112222222222333333333344444.info', 'The email address is too long (2 characters too many).'),
399399
('my.long.address@λ111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.11111111112222222222333333.info', 'The email address is too long (when converted to IDNA ASCII).'),
400400
('my.long.address@λ111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444.info', 'The email address is too long (at least 1 character too many).'),

0 commit comments

Comments
 (0)