Skip to content

Commit

Permalink
Remove special-use domains from domains() strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
jenstroeger committed Feb 15, 2023
1 parent 8ac3b5c commit e19cf82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hypothesis-python/src/hypothesis/provisional.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
).splitlines()

assert _tlds[0].startswith("#")
TOP_LEVEL_DOMAINS = ["COM"] + sorted(_tlds[1:], key=len)

# Remove special-use domain names from the list. For more discussion
# see https://github.com/HypothesisWorks/hypothesis/pull/3572
TOP_LEVEL_DOMAINS = ["COM"] + sorted(filter(lambda tld: tld != "ARPA", _tlds[1:]), key=len)

class DomainNameStrategy(st.SearchStrategy):
@staticmethod
Expand Down

0 comments on commit e19cf82

Please sign in to comment.