Skip to content

Set python_requires='>=3.6' - #936

Merged
methane merged 1 commit into
PyMySQL:masterfrom
Nicusor97:add_python_requires
Jan 7, 2021
Merged

Set python_requires='>=3.6'#936
methane merged 1 commit into
PyMySQL:masterfrom
Nicusor97:add_python_requires

Conversation

@Nicusor97

Copy link
Copy Markdown
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
Copy Markdown

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

@Nicusor97

Copy link
Copy Markdown
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

methane commented Jan 7, 2021

Copy link
Copy Markdown
Member

I will do it someday in this year.

@methane

methane commented Jan 8, 2021

Copy link
Copy Markdown
Member

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