tchellomello / python-amcrest

A Python 2.7/3.x module for Amcrest and Dahua Cameras using the SDK HTTP API.
GNU General Public License v2.0
213 stars 76 forks source link

setting “python_requires” with ">=3.7" is a better way to declare Python compatibility #223

Open PyVCEchecker opened 1 year ago

PyVCEchecker commented 1 year ago

Hello!

I noticed that "amcrest" use a Python3-specific syntax rule "f_string", which lead to installation failure of Inject in Python 2. And there is such a declaration.

  classifiers=[
      ...
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        ...
    ]

I guess you want to set python>=3.7. And I think it is a better way to declare Python compatibility by using the keyword argument python_requires

Way to improve: modify setup() in setup.py, add python_requires keyword argument:

setup(…
     python_requires=">=3.7",
     …)

Thanks for your attention. Best regrads, PyVCEchecker