facebookresearch/fairseq
Voir sur GitHub“python_requires” should be set with “>=3.6”, as fairseq 0.10.2 is not compatible with all Python versions.
Open
#4 245 ouverte le 1 mars 2022
enhancementhelp wantedneeds triage
Métriques du dépôt
- Stars
- (29 107 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Currently, the keyword argument python_requires of setup() is not set, and thus it is assumed that this distribution is compatible with all Python versions. However, I found the following code checking Python compatibility locally in setup.py
if sys.version_info < (3, 6):
sys.exit("Sorry, Python >= 3.6 is required for fairseq.")
I think it is a better way to declare Python compatibility by using the keyword argument python_requires than checking compatibility locally for some reasons:
- Descriptions in python_requires will be reflected in the metadata
- “pip install” can check such metadata on the fly during distribution selection, and prevent from downloading and installing the incompatible package versions.
- If the user does not specify any version constraint, pip can automatically choose the latest compatible package version for users.
Way to improve: modify setup() in setup.py, add python_requires keyword argument:
setup(…
python_requires=">=3.6,
…)
Thanks for your attention. Best regrads, PyVCEchecker