zzzsochi/smtp-faker

Code in db.py is not python 3.5 compatible

jakabk opened this issue · 3 comments

The code in db.py:10-18 is python 3.6 only compatible.

class Message(NamedTuple):
    id: str
    ( ... )

From the documentation.

Typed version of namedtuple.

Usage in Python versions >= 3.6::

    class Employee(NamedTuple):
        name: str
        id: int

This is equivalent to::

    Employee = collections.namedtuple('Employee', ['name', 'id'])

Yes, 3.5 is not supported.

In this case perhaps you should modify the setup.py file

   classifiers=[
    "License :: OSI Approved :: BSD License",
    "Operating System :: POSIX",
    "Programming Language :: Python :: 3.5",
    "Topic :: Internet :: WWW/HTTP",
],

Hmmm... Fixed. :-)