Skip to content

Set python_requires='>=3.6' #936

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

Merged
merged 1 commit into from
Jan 7, 2021
Merged

Conversation

Nicusor97
Copy link
Contributor

From your changelog seems like in the latest version you dropped Python 2 support but it is incomplete. You need to set python_requires in your setup.py that will prevent users with Python 2.7 from downloading a sdist version they cannot build.

Note: supporting python_requires requires setuptools>=24.2.0 and pip>=9.0.0 to benefit from it.
Details here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires

Here is the current issue if you try to install latest version of fastavro on Python 2:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\compile.rdv\appdata\local\temp\pip-install-_ifmxj\PyMySQL\setup.py", line 6, in <module>
        with open("./README.rst", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

Also, the 1.0.0 version could be yanked.

@Nicusor97 Nicusor97 force-pushed the add_python_requires branch from d74b819 to b3c2acb Compare January 7, 2021 07:54
@methane methane merged commit 5d1e27d into PyMySQL:master Jan 7, 2021
@karelyatin
Copy link

can a new release also be pushed on pypi including this fix so it install fine on python2 as well?

@Nicusor97
Copy link
Contributor Author

I think the 1.0.0 version needs to be yanked too in order to avoid python2 user to install this version.

@methane
Copy link
Member

methane commented Jan 7, 2021

I will do it someday in this year.

@methane
Copy link
Member

methane commented Jan 8, 2021

But note that you can see such issue always when you are using Python 2.7. I strongly recommend to move Python 3.
I don't want support Python 2 anymore, including "it install fine" without pinning.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants