ndejong / ouilookup

A CLI tool and Python3 module for looking up hardware MAC addresses from the published OUI source at ieee.org.
https://pypi.org/project/ouilookup/
BSD 2-Clause "Simplified" License
22 stars 5 forks source link

Import statement changing between versions and python 3.6 incompatibility #3

Open charithjp opened 8 months ago

charithjp commented 8 months ago

The module name might have changed from 0.2.4 to 0.3.1 so the import statement went from: from OuiLookup import OuiLookup to from ouilookup import OuiLookup

The 0.3.1 version also throws the following error with Python 3.6:

  File "C:\Python36\lib\site-packages\ouilookup\__init__.py", line 23, in <module>
    from .main import OuiLookup  # noqa: E402
  File "<fstring>", line 1
    (expression=)
               ^
SyntaxError: invalid syntax

Possibly a newer string formatting method that's not compatible with 3.6 according to https://stackoverflow.com/questions/49582183/pythonl-invalid-syntax-file-fstring-line-1

sanderjo commented 7 months ago

Me too:

Following https://pypi.org/project/ouilookup/#:~:text=from%20OuiLookup%20import%20OuiLookup gives an error:

>>> from OuiLookup import OuiLookup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'OuiLookup'

And this does work:

>>> from ouilookup import OuiLookup
>>> OuiLookup().query('00:00:aa:00:00:00')
[{'0000AA000000': 'XEROX CORPORATION'}]

So change in documentation?