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

Set Explicit requirement for Python>=3.7 #103

Merged
merged 2 commits into from
Oct 30, 2020
Merged

Set Explicit requirement for Python>=3.7 #103

merged 2 commits into from
Oct 30, 2020

Conversation

kaxil
Copy link
Contributor

@kaxil kaxil commented Oct 30, 2020

Check https://packaging.python.org/guides/dropping-older-python-versions/ for more details

The latest cattrs 1.1.0 removed support for Python 3.6 but it since most of the libraries like Airflow (I am the maintainer and PMC Member of the Airflow Project) have an open bound for cattrs in the dependency, new users trying to setup airflow breaks (Issue: apache/airflow#11965).

Setting an explicit python_requires means Python 3.6 users won't be able to download the new cattrs version and fallback to the older version that supports Python 3.6 and hence it will work without breaking Airflow too.

Thanks for creating and maintaining this library, appreciate all your effort, hope this PR is useful

@kaxil
Copy link
Contributor Author

kaxil commented Oct 30, 2020

cc @Tinche

@codecov
Copy link

codecov bot commented Oct 30, 2020

Codecov Report

Merging #103 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #103   +/-   ##
=======================================
  Coverage   97.70%   97.70%           
=======================================
  Files           7        7           
  Lines         435      435           
=======================================
  Hits          425      425           
  Misses         10       10           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c92a62e...fd7073f. Read the comment docs.

@jqmp
Copy link

jqmp commented Oct 30, 2020

I ran into this problem too (we depend on cattrs in the Bionic library). It seems to me that someone will also need to delete version 1.1.0 from PyPI, right? Otherwise, pip will still happily install 1.1.0 on Python 3.6.

Thanks @Tinche for the great library, and @kaxil for submitting this fix!

@Tinche
Copy link
Member

Tinche commented Oct 30, 2020

Thanks, let's get this applied! I will release this as 1.1.1 and delete 1.1.0.

@Tinche Tinche merged commit a85f215 into python-attrs:master Oct 30, 2020
@kaxil kaxil deleted the set-strict-req branch October 30, 2020 20:10
@Tinche
Copy link
Member

Tinche commented Oct 30, 2020

Release 1.1.0 yanked!

@kaxil
Copy link
Contributor Author

kaxil commented Oct 30, 2020

Thanks for the quick release @Tinche , I can confirm this works now

root@283e9b83e39d:/# python --version
Python 3.6.12

root@283e9b83e39d:/# pip install 'cattrs==1.1.1'
ERROR: Could not find a version that satisfies the requirement cattrs==1.1.1 (from versions: 0.5.0, 0.6.0, 0.7.0, 0.8.0.dev0, 0.8.0, 0.8.1, 0.9.0, 0.9.2, 1.0.0rc0, 1.0.0, 1.1.0)
ERROR: No matching distribution found for cattrs==1.1.1

root@283e9b83e39d:/# pip install 'cattrs'
Collecting cattrs
  Using cached cattrs-1.0.0-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: attrs>=17.3 in /usr/local/lib/python3.6/site-packages (from cattrs) (20.2.0)
Installing collected packages: cattrs
Successfully installed cattrs-1.0.0

@potiuk
Copy link

potiuk commented Nov 1, 2020

Nice @kaxil!

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

Successfully merging this pull request may close these issues.

4 participants