Skip to content

Commit

Permalink
Merge pull request #1315 from njgheorghita/remove-guess-tld
Browse files Browse the repository at this point in the history
Remove all remaining guess_tld kwargs
  • Loading branch information
njgheorghita authored Apr 5, 2019
2 parents 814c3c0 + ac80a64 commit a548482
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"ethtoken",
"py-geth>=1.4.0",
"py-solc>=0.4.0",
"pytest>=3.5.0,<4.0.0",
"pytest>=4.4.0,<5.0.0",
"sphinx",
"sphinx_rtd_theme>=0.1.9",
"toposort>=1.4",
Expand All @@ -37,7 +37,7 @@
"bumpversion",
"flaky>=3.3.0",
"hypothesis>=3.31.2",
"pytest>=3.6.0,<4.0.0",
"pytest>=4.4.0,<5.0.0",
"pytest-mock==1.*",
"pytest-pythonpath>=0.3",
"pytest-watch==4.*",
Expand Down
4 changes: 1 addition & 3 deletions tests/core/middleware/test_name_to_address_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class TempENS():
def __init__(self, name_addr_pairs):
self.registry = dict(name_addr_pairs)

def address(self, name, guess_tld=True):
# no automated web3 usages should be guessing the TLD
assert not guess_tld
def address(self, name):
return self.registry.get(name, None)


Expand Down
6 changes: 2 additions & 4 deletions web3/_utils/ens.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def is_ens_name(value):


def validate_name_has_address(ens, name):
addr = ens.address(name, guess_tld=False)
addr = ens.address(name)
if addr:
return addr
else:
Expand All @@ -37,9 +37,7 @@ class StaticENS:
def __init__(self, name_addr_pairs):
self.registry = dict(name_addr_pairs)

def address(self, name, guess_tld=True):
# no automated web3 usages should be guessing the TLD
assert not guess_tld
def address(self, name):
return self.registry.get(name, None)


Expand Down

0 comments on commit a548482

Please sign in to comment.