python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.14k stars 333 forks source link

Add python version requirement on setup.py #595

Closed jason-the-j closed 1 month ago

jason-the-j commented 6 months ago

Problem: All python versions previous to 3.8 are now end of life and no longer supported. But, pip automatically installs the latest version of flask_restx on python 3.6 (or any version under 3.8), resulting in ModuleNotFoundError on importlib.metadata which is available starting with python 3.8.

Solution: include python_requires option when setup for pip to resolve python dependency accordingly. prevent installing the latest and unsupported flask_restx regardless of python version. fixes #586

peter-doggart commented 1 month ago

@jason-the-j I've merged this as #609 to fix some lint errors on the fly. Thanks for your contribution and fix. :)