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 3.7 (after 2023-06-27) #695

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Drop support for Python 3.7 (after 2023-06-27) #695

merged 1 commit into from
Jun 26, 2023

Conversation

jairhenrique
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2023

Codecov Report

Merging #695 (b827cbe) into master (92ca5a1) will increase coverage by 0.83%.
The diff coverage is 88.88%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #695      +/-   ##
==========================================
+ Coverage   89.63%   90.46%   +0.83%     
==========================================
  Files          28       28              
  Lines        1794     1793       -1     
  Branches      256      324      +68     
==========================================
+ Hits         1608     1622      +14     
+ Misses        151      136      -15     
  Partials       35       35              
Impacted Files Coverage Δ
vcr/cassette.py 96.31% <0.00%> (ø)
vcr/config.py 95.06% <50.00%> (ø)
vcr/migration.py 74.48% <66.66%> (ø)
vcr/matchers.py 95.34% <100.00%> (ø)
vcr/patch.py 88.42% <100.00%> (ø)
vcr/request.py 97.53% <100.00%> (ø)
vcr/stubs/__init__.py 93.87% <100.00%> (+5.61%) ⬆️
vcr/stubs/aiohttp_stubs.py 94.40% <100.00%> (ø)
vcr/unittest.py 100.00% <100.00%> (ø)
vcr/util.py 93.33% <100.00%> (+2.85%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jairhenrique jairhenrique force-pushed the drop37 branch 2 times, most recently from 671ca77 to 7e63038 Compare May 11, 2023 16:22
tox.ini Outdated Show resolved Hide resolved
@hartwork
Copy link
Collaborator

hartwork commented May 13, 2023

End of life of Python 3.7 is June 27th. We should probably not drop support before that date, so I'll add that info to the title of the pull request.

@hartwork hartwork changed the title Drop support to python 3.7 Drop support for Python 3.7 (after 2023-06-27) May 13, 2023
tox.ini Outdated Show resolved Hide resolved
@jairhenrique jairhenrique force-pushed the drop37 branch 2 times, most recently from 703eea5 to 9a0d728 Compare May 15, 2023 14:25
Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique I understand that six should no longer be needed without Python 2 but I don't understand .test_case with regard to its original mission and the two related changes here. Could you help me (and potentially other reviewers) understand these changes? Thanks in advance!

Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique I came across a test that looks like <3.6 only. Does this look like something that should be dropped in here as well?

@pytest.mark.skipif("sys.version_info >= (3, 6)", strict=True, raises=ConnectionError)
def test_post_chunked_binary_secure(tmpdir, httpbin_secure):
"""Ensure that we can send chunked binary without breaking while trying to concatenate bytes with str."""
data1 = iter([b"data", b"to", b"send"])
data2 = iter([b"data", b"to", b"send"])
url = httpbin_secure.url + "/post"
with vcr.use_cassette(str(tmpdir.join("requests.yaml"))):
req1 = requests.post(url, data1).content
print(req1)
with vcr.use_cassette(str(tmpdir.join("requests.yaml"))):
req2 = requests.post(url, data2).content
assert req1 == req2

@jairhenrique
Copy link
Collaborator Author

@jairhenrique I came across a test that looks like <3.6 only. Does this look like something that should be dropped in here as well?

I will drop!

@alisakr
Copy link

alisakr commented May 25, 2023

@jairhenrique Would it be possible to delay this? I imagine a lot of companies will be continuing to use python 3.7 past end of life. I already know examples that won't be off 3.7 by then.

@jairhenrique
Copy link
Collaborator Author

@alisakr Since the core language is no longer supported, I believe it is a waste of effort for libraries to maintain support for a deprecated version.

Python 3.8 has been live since October 2019. I believe enough time has passed to be able to move up a step in versions.

Keeping dependencies up to date is part of the job.

@alisakr
Copy link

alisakr commented May 25, 2023

@jairhenrique agreed but sadly not practice (I'm trying to make it so at my employer). In any case, I think it's okay if tests don't run on python 3.7 as long as there's nothing that explicitly prevents it from running on python 3.7. Is that the case? Or will this version explicitly prevent usage or installation on python 3.7

@jairhenrique
Copy link
Collaborator Author

@alisakr The version that is released with changes from this PR will not work with Python 3.7. You will be able to use an earlier version of the library.

All new fixes and improvements will prioritize live Python versions.

@hartwork
Copy link
Collaborator

I fully support @jairhenrique in this, well said.

tests/unit/test_vcr.py Outdated Show resolved Hide resolved
@jairhenrique jairhenrique force-pushed the drop37 branch 2 times, most recently from 7373caf to 7dda5d9 Compare June 12, 2023 11:32
Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique thanks again for your work and patience here and and the multiple rebases resolving conflicts! 👍 The end-of-life date is tomorrow, we're close enough, let's get your work merged!

@hartwork hartwork merged commit ad1010d into master Jun 26, 2023
6 checks passed
@hartwork hartwork deleted the drop37 branch June 26, 2023 16:38
@hartwork
Copy link
Collaborator

@alisakr in case you missed it, we made release 4.4.0 today right before dropping Python 3.7 support for upcoming 5.0.0. That should allow you to pull in one last round of bug fixes into a Python 3.7 environment — that was part of the idea behind #724 — while also being clear that the only path forward with VCR.py or anything Python is with Python >=3.8 from now on.

jairhenrique pushed a commit that referenced this pull request Jun 26, 2023
Drop support for Python 3.7 (after 2023-06-27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants