Skip to content

chore(deps): bump tldextract from 5.2.0 to 5.3.0 #18002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2267,9 +2267,9 @@ text-unidecode==1.3 \
--hash=sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8 \
--hash=sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93
# via python-slugify
tldextract==5.2.0 \
--hash=sha256:59509cbf99628c9440f4d19d3a1fd8488d50297ea23879c136576263c5a04eba \
--hash=sha256:c3a8c4daf2c25a57f54d6ef6762aeac7eff5ac3da04cdb607130be757b8457ab
tldextract==5.3.0 \
--hash=sha256:b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609 \
--hash=sha256:f70f31d10b55c83993f55e91ecb7c5d84532a8972f22ec578ecfbe5ea2292db2
# via -r requirements/main.in
transaction==5.0 \
--hash=sha256:106e7bd782bcc0cb5119fc9225b0c9a71dfc53adb938be905223adaef22b1174 \
Expand Down
6 changes: 3 additions & 3 deletions warehouse/accounts/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ def validate_email(self, field):

# Check if the domain is valid
extractor = TLDExtract(suffix_list_urls=()) # Updated during image build
domain = extractor(resp.domain.lower()).registered_domain
domain = extractor(resp.domain.lower()).top_domain_under_public_suffix

mx_domains = set()
if hasattr(resp, "mx") and resp.mx:
mx_domains = {
extractor(mx_host.lower()).registered_domain
extractor(mx_host.lower()).top_domain_under_public_suffix
for _prio, mx_host in resp.mx
}
mx_domains.update({mx_host.lower() for _prio, mx_host in resp.mx})
Expand All @@ -315,7 +315,7 @@ def validate_email(self, field):
mx_ptr = dns.resolver.resolve_address(mx_ip[0].address)
mx_ptr_domain = extractor(
mx_ptr[0].target.to_text().lower()
).registered_domain
).top_domain_under_public_suffix
all_mx_domains.add(mx_ptr_domain)

# combine both sets
Expand Down
2 changes: 1 addition & 1 deletion warehouse/admin/views/prohibited_email_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def add_prohibited_email_domain(request):
raise HTTPSeeOther(request.route_path("admin.prohibited_email_domains.list"))
# validate that the domain is valid
extractor = TLDExtract(suffix_list_urls=()) # Updated during image build
registered_domain = extractor(email_domain).registered_domain
registered_domain = extractor(email_domain).top_domain_under_public_suffix
if not registered_domain:
request.session.flash(f"Invalid domain name '{email_domain}'", queue="error")
raise HTTPSeeOther(request.route_path("admin.prohibited_email_domains.list"))
Expand Down