diff --git a/CHANGES.rst b/CHANGES.rst index 9114224..77586a8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -15,6 +15,7 @@ Changelog - Set user agent in elastic_search.py example to avoid default user agent - Updated elastic_search.py example for ES 6.6.0 - Readme update for RDAP vs Legacy Whois output (#204) +- Removed the disallow_permutations argument from ipwhois_cli.py (#226) 1.0.0 (2017-07-30) ------------------ diff --git a/CLI.rst b/CLI.rst index 5c8b360..cf4a986 100644 --- a/CLI.rst +++ b/CLI.rst @@ -20,7 +20,7 @@ Usage ipwhois_cli.py [-h] [--whois] [--exclude_nir] [--json] [--hr] [--show_name] [--colorize] [--timeout TIMEOUT] [--proxy_http "PROXY_HTTP"] - [--proxy_https "PROXY_HTTPS"] [--disallow_permutations] + [--proxy_https "PROXY_HTTPS"] [--inc_raw] [--retry_count RETRY_COUNT] [--asn_alts "ASN_ALTS"] [--asn_methods "ASN_METHODS"] [--extra_org_map "EXTRA_ORG_MAP"] @@ -60,12 +60,6 @@ IPWhois settings: The proxy HTTPS address passed to request.ProxyHandler. User auth can be passed like "https://user:pass@192.168.0.1:443" - --disallow_permutations - Disable additional methods if DNS lookups to Cymru - fail. This is the opposite of the ipwhois - allow_permutations, in order to enable - allow_permutations by default in the CLI. *WARNING* - deprecated in favor of new argument asn_methods. Common settings (RDAP & Legacy Whois): --inc_raw Include the raw whois results in the output. diff --git a/UPGRADING.rst b/UPGRADING.rst index 004aec2..3fdca30 100644 --- a/UPGRADING.rst +++ b/UPGRADING.rst @@ -9,6 +9,15 @@ any changes that may affect user experience when upgrading to a new release. This page is new as of version 1.0.0. Any information on older versions is likely missing or incomplete. +****** +v1.1.0 +****** + +- Exceptions now inherit a new BaseIpwhoisException rather than Exception +- Removed support for Python 2.6/3.3, added support for 3.7 +- Removed the disallow_permutations argument from ipwhois_cli.py. Use + ans_methods instead. + ****** v1.0.0 ****** diff --git a/ipwhois/scripts/ipwhois_cli.py b/ipwhois/scripts/ipwhois_cli.py index 56daa6a..ef957e3 100644 --- a/ipwhois/scripts/ipwhois_cli.py +++ b/ipwhois/scripts/ipwhois_cli.py @@ -150,15 +150,6 @@ group.add_argument( 'can be passed like "https://user:pass@192.168.0.1:443"', required=False ) -group.add_argument( - '--disallow_permutations', - action='store_true', - help='Disable additional methods if DNS lookups to Cymru fail. This is the' - ' opposite of the ipwhois allow_permutations, in order to enable ' - 'allow_permutations by default in the CLI. *WARNING* deprecated in ' - 'favor of new argument asn_methods.', - default=False -) # Common (RDAP & Legacy Whois) group = parser.add_argument_group('Common settings (RDAP & Legacy Whois)') @@ -372,9 +363,6 @@ class IPWhoisCLI: proxy HTTP support or None. proxy_https (:obj:`urllib.request.OpenerDirector`): The request for proxy HTTPS support or None. - allow_permutations (:obj:`bool`): Allow net.Net() to use additional - methods if DNS lookups to Cymru fail. *WARNING* deprecated in - favor of new argument asn_methods. Defaults to True. """ def __init__( @@ -382,8 +370,7 @@ class IPWhoisCLI: addr, timeout, proxy_http, - proxy_https, - allow_permutations + proxy_https ): self.addr = addr @@ -412,12 +399,9 @@ class IPWhoisCLI: handler = ProxyHandler(handler_dict) self.opener = build_opener(handler) - self.allow_permutations = allow_permutations - self.obj = IPWhois(address=self.addr, timeout=self.timeout, - proxy_opener=self.opener, - allow_permutations=self.allow_permutations) + proxy_opener=self.opener) def generate_output_header(self, query_type='RDAP'): """ @@ -1442,6 +1426,7 @@ class IPWhoisCLI: return output + if script_args.addr: results = IPWhoisCLI( @@ -1452,8 +1437,7 @@ if script_args.addr: ) else None, proxy_https=script_args.proxy_https if ( script_args.proxy_https and len(script_args.proxy_https) > 0 - ) else None, - allow_permutations=(not script_args.disallow_permutations) + ) else None ) if script_args.whois: