Skip to content

Commit

Permalink
feat: get updated lists during build step
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Aug 28, 2024
1 parent a5c23b6 commit 35a5e9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ COPY --from=static /opt/warehouse/src/warehouse/admin/static/dist/ /opt/warehous
COPY --from=build /opt/warehouse/ /opt/warehouse/
COPY . /opt/warehouse/src/

# Pre-cache tlb list
RUN tldextract --update
# Load our module to pre-compile as much bytecode as we can easily.
# Saves time collectively on container boot!
RUN python -m warehouse
2 changes: 1 addition & 1 deletion warehouse/accounts/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def validate_email(self, field):
)

# Check if the domain is valid
extractor = TLDExtract(suffix_list_urls=()) # Use embedded snapshot list
extractor = TLDExtract() # List is updated during image build
domain = extractor(address.domain.lower()).registered_domain

if (
Expand Down

0 comments on commit 35a5e9a

Please sign in to comment.