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

Drop support for Python 2.7 #328

Merged
merged 16 commits into from Jun 8, 2020
Merged

Drop support for Python 2.7 #328

merged 16 commits into from Jun 8, 2020

Conversation

wsanchez
Copy link
Member

@wsanchez wsanchez commented Mar 24, 2020

The current plan (as of Jan 25 2020) is that the final release of Python will be 2.7.18 slated for mid-April 2020.

This PR removes support for Python 2.7 from CI, removes Python 2.7-specific code, and reformats for Python 3.5+ per black.

Before we merge this, we should ship a release so that 2.7 users have the latest work already done with 2.7 support in place.

@wsanchez wsanchez requested a review from a team as a code owner March 24, 2020 23:44
@wsanchez wsanchez mentioned this pull request Mar 24, 2020
Copy link
Contributor

@twm twm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we need some additional metadata to avoid causing Python 2.7 users pain.

setup.py Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #328 into master will decrease coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #328      +/-   ##
==========================================
- Coverage   98.16%   97.87%   -0.29%     
==========================================
  Files          48       48              
  Lines        3928     3915      -13     
  Branches      262      259       -3     
==========================================
- Hits         3856     3832      -24     
- Misses         55       62       +7     
- Partials       17       21       +4     
Impacted Files Coverage Δ
src/klein/_app.py 96.49% <ø> (-1.76%) ⬇️
src/klein/_form.py 99.26% <ø> (ø)
src/klein/_session.py 96.11% <ø> (-2.92%) ⬇️
src/klein/storage/_memory.py 100.00% <ø> (ø)
src/klein/test/_strategies.py 100.00% <ø> (ø)
src/klein/test/_trial.py 100.00% <ø> (+25.00%) ⬆️
src/klein/test/test_request.py 100.00% <ø> (ø)
src/klein/test/test_request_compat.py 100.00% <ø> (ø)
src/klein/test/test_session.py 99.20% <ø> (ø)
src/klein/_dihttp.py 96.36% <100.00%> (-3.64%) ⬇️
... and 14 more

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 2c7498f...28d61cf. Read the comment docs.

@twm

This comment has been minimized.

@rodrigc rodrigc closed this Mar 28, 2020
@rodrigc rodrigc reopened this Mar 28, 2020
@rodrigc

This comment has been minimized.

@twm

This comment has been minimized.

@wsanchez

This comment has been minimized.

@wsanchez
Copy link
Member Author

wsanchez commented Apr 2, 2020

Blocked on #329 (Release Klein 20.4)

@wsanchez wsanchez changed the title Drop support for Python 2.7 [DO NOT MERGE] Drop support for Python 2.7 Apr 2, 2020
@wsanchez wsanchez marked this pull request as draft April 10, 2020 16:32
@wsanchez wsanchez changed the title [DO NOT MERGE] Drop support for Python 2.7 Drop support for Python 2.7 Apr 10, 2020
* master: (26 commits)
  [requires.io] dependency update
  Fix #349: Update forms example to run correctly
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  Don't use "l" as a variable name.
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  mock 4 dropped Py2
  hypothesis5 drops Py2
  Update dependencies
  Don't have two tw192's
  ...

# Conflicts:
#	.travis.yml
#	tox.ini
@wsanchez
Copy link
Member Author

In case anyone noticed codecov/project being red, it's unhappy because reducing several lines into one line (which black is doing in some cases because u"foo""foo") decreases the total number of lines, which are all covered, so the percentage of covered lines is dropping a bit.

@wsanchez wsanchez marked this pull request as ready for review June 8, 2020 04:03
* master:
  [requires.io] dependency update
  [requires.io] dependency update
@wsanchez wsanchez merged commit 21a957f into master Jun 8, 2020
@wsanchez wsanchez deleted the py27-not branch June 8, 2020 19:04
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jun 20, 2021
Most of patches are home-grown instead of from upstream, as upstream fixes
are quite large and cannot be cleanly backported. Specifically, upstream
moves test strategies from Klein to Hyperlink [1] and drop Python 2.x
support [2,3]. The fix for Werkzeug 2.x in test_resource.py [3] is smaller,
while it cannot be cleanly backported, either.

[1] twisted/klein#393
[2] twisted/klein#328
[3] twisted/klein#355
[4] twisted/klein#499

git-svn-id: file:///srv/repos/svn-community/svn@965883 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jun 20, 2021
Most of patches are home-grown instead of from upstream, as upstream fixes
are quite large and cannot be cleanly backported. Specifically, upstream
moves test strategies from Klein to Hyperlink [1] and drop Python 2.x
support [2,3]. The fix for Werkzeug 2.x in test_resource.py [3] is smaller,
while it cannot be cleanly backported, either.

[1] twisted/klein#393
[2] twisted/klein#328
[3] twisted/klein#355
[4] twisted/klein#499



git-svn-id: file:///srv/repos/svn-community/svn@965883 9fca08f4-af9d-4005-b8df-a31f2cc04f65
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.

None yet

3 participants