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
Remove support for python2.7 #1386
Conversation
Hi @ssbarnea! 👋 Dropping Python 2 compatibility is a breaking change and requires a major version bump to version |
I do not mind using 2.0.0, mostly I got used to other projects where top version is used only on serious architectural changes, second is major, 3rd is minor, and 4th is optional and used only for hotfixes. Example ansible project(s). Anyway, I will update it to 2.0.0. The only worry I have is that as we want to move to a faster release cycle with breaking changes we risk starting to bump the first number quite often. Still, browsers demonstrated that nobody got hurt by this practice. |
BTW, I am really inclined to want to drop py35 too because is nearly end-of life and because having py36 as minimal would enable a serious list of improvements like f-strings or type-checking. Still, that decision is outside the scope of this PR. I want to keep any chance atomic, so is easy to review. |
As it appears coverage does really helped this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In setup.py
Jinja2 limits should be removed, current limit is only to keep Python2 compatibility.
Other dependencies limits should be rechecked.
docs/installation.rst
Outdated
@@ -70,7 +69,7 @@ At the command line: | |||
|
|||
.. code-block:: bash | |||
|
|||
$ pip install --user cookiecutter | |||
$ pip3 install --user cookiecutter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ pip3 install --user cookiecutter | |
$ pip install --user cookiecutter |
It always pip
. We do not care about user simlinks, we care only about normal setup.
On modern systems python2 not exist.
And you will get:
insspb@insspb-notebook:~$ pip -V
pip 20.0.2 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am 100% sure that on modern systems like CentOS 8, pip gets installed as pip3 and non pip. Some applies to virtualenv.
If you want, a more generic command would be python3 -m pip install ...
, which is probably the most portable example.
pip + virtualenv are special tools which need the version prefix to avoid conflicts with their py3 versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm the same behavior on Debian Buster on docker. When installing python3
and python3-pip
, there is no python
or pip
executables, only python3
and pip3
.
Anyway, +1 to python3 -m pip install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to python3 -m pip install
docs/installation.rst
Outdated
@@ -133,6 +132,6 @@ Or with pip: | |||
|
|||
.. code-block:: bash | |||
|
|||
$ pip install --upgrade cookiecutter | |||
$ pip3 install --upgrade cookiecutter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ pip3 install --upgrade cookiecutter | |
$ pip install --upgrade cookiecutter |
Same as above
@ssbarnea Please remember that PR title will be in changelog. So it should start with Changed:/Updated: etc keywords. |
Just want to say that this is a wonderful development. Very exciting to watch unfold. Go go go! |
Not sure where this requirement comes from. The good part about using Release Drafter is that we can change the PR title and labels even after the merge and the notes will be updated, as long we do not tag a new release. This gives us time to tune it. AFAIK, PRs should be concise, easy to read, follow 50/72 rule as commits and use at least one label that is recognized by the drafter. Sadly there is no bot to check that, yet. Re @pydanny Thanks for the message, I am happy to get some confirmation on our actions. Sometimes we worry that we could end-up making unpopular changes. |
Python 2.7 is officially dead and we are not going to make any new release that supports it. This removes py27 code but a follow-up will address other changes like dropping the need to use six library.
@ssbarnea LGTM, but what about 3.5? |
Python 2.7 is officially dead and we are not going to make any new release that supports it.
This removes py27 code but a follow-up will address other changes like removing use of
six
.Major version is bumped to 1.8.0 to mark this breaking change.