Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“python_requires” should be set with “>=3.6, <3.10”, as zappa 0.54.1 is not compatible with all Python versions. #1111

Closed
PyVCEchecker opened this issue Feb 22, 2022 · 2 comments
Assignees

Comments

@PyVCEchecker
Copy link

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 zappa/__init__.py

SUPPORTED_VERSIONS = [(3, 6), (3, 7), (3, 8), (3, 9)]

if sys.version_info[:2] not in SUPPORTED_VERSIONS:
    ……
    raise RuntimeError(err_msg)

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, <3.10",
     …)

Thanks for your attention.
Best regrads,
PyVCEchecker

@monkut
Copy link
Collaborator

monkut commented Jul 16, 2022

adding.

@monkut monkut self-assigned this Jul 16, 2022
@monkut
Copy link
Collaborator

monkut commented Aug 5, 2022

python 3.6 support was removed, but python_requires was added.
released, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants