modoboa / modoboa-dmarc

A set of tools to use DMARC through Modoboa.
MIT License
15 stars 11 forks source link

Futures requirement breaks setuptools v57+ on Python 3 #60

Closed PatTheMav closed 2 years ago

PatTheMav commented 2 years ago

If setuptools version 57 or above is used, using futures>=3.1.0 in requirements will break installation, as setuptools itself uses more_itertools which in turn imports from concurrent.futures.

Setuptools runs inside a package's temp directory during pip installation, so it will pick up the futures package itself (instead of importing from Python 3's standard library) with local file paths taking precedence over other import paths.

As the futures package is incompatible with Python 3 this will lead to a syntax error of course and pip will end up installing v2.2 of it, which also downgrades modoboa-dmarc to v1.0.0 (which is not compatible with the Django version required by modoboa v1.17 which requires an on_delete kwarg for ForeignKey fields that was added later).

Changing the requirement to futures>=3.1.1 should fix this issue as the author has added an upper version boundary for the package starting with v3.1.1.

See also discussion here: https://github.com/pypa/setuptools/issues/2687