Running latest as per pypi, on python 3.7.3. Output below:
(venv) Aarons-MacBook-Pro:whois aaron$ pip list
Package Version
---------- -------
pip 19.1.1
py-spy 0.1.11
setuptools 41.0.1
whois 0.8
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) Aarons-MacBook-Pro:whois aaron$ python
Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import whois
>>> domain = whois.query('google.com')
>>> domain.name
'google.com'
>>> domain.__dict__
{'name': 'google.com', 'registrar': 'MarkMonitor Inc.', 'creation_date': datetime.datetime(1997, 9, 15, 4, 0), 'expiration_date': datetime.datetime(2020, 9, 13, 21, 0, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=61200))), 'last_updated': None, 'name_servers': {'ns2.google.com\r', 'ns3.google.com\r', 'ns2.google.com', 'ns3.google.com', 'ns4.google.com', 'ns4.google.com\r', 'ns1.google.com\r', 'ns1.google.com'}}
>>>
>>> domain = whois.query('google.it')
>>> domain.name
'it'
>>> domain.__dict__
{'name': 'it', 'registrar': '', 'creation_date': datetime.datetime(1987, 12, 23, 0, 0), 'expiration_date': datetime.datetime(2020, 4, 21, 0, 0), 'last_updated': datetime.datetime(2019, 5, 7, 1, 4, 50), 'name_servers': set()}
>>> quit()