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

Enable testing on Python 3.12 & PyPy 3.9/3.10 #754

Merged
merged 4 commits into from
Aug 9, 2023

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Aug 2, 2023

As requested in #707 (comment).

I've also noticed that PyPy3.9 and 3.10 were missing, so added them as well.

@jairhenrique
Copy link
Collaborator

@mgorny can you apply the patch suggested on #707

Copy the `debuglevel` and `_http_vsn` attributes from base connection
class into response classes, in order to fix compatibility with
Python 3.12.  For reasons I don't comprehend, these end up being called
on the class rather than instance, so regular proxying logic does not
work.

Fixes kevin1024#707
@mgorny
Copy link
Contributor Author

mgorny commented Aug 3, 2023

@mgorny can you apply the patch suggested on #707

I've done it in a slightly better way. However, I'm still not convinced it's the correct solution.

@codecov-commenter
Copy link

codecov-commenter commented Aug 3, 2023

Codecov Report

Merging #754 (9f2be3b) into master (69de388) will decrease coverage by 0.09%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ 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     #754      +/-   ##
==========================================
- Coverage   90.46%   90.37%   -0.09%     
==========================================
  Files          27       27              
  Lines        1815     1819       +4     
  Branches      337      337              
==========================================
+ Hits         1642     1644       +2     
- Misses        129      131       +2     
  Partials       44       44              
Files Changed Coverage Δ
vcr/stubs/__init__.py 94.00% <100.00%> (+0.12%) ⬆️

... and 1 file with indirect coverage changes

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

Disable the C extension in aiohttp that's incompatible with Python 3.12
as of 3.8.5, in order to make it possible to install it (in pure Python
version) for testing.
@mgorny
Copy link
Contributor Author

mgorny commented Aug 3, 2023

The problem with aiohttp is that the current release's sdist has C files generated using old version of Cython. I've added a tox change that disables the C extension when building for 3.12, making it possible to install pure Python version of aiohttp for testing.

@mgorny
Copy link
Contributor Author

mgorny commented Aug 3, 2023

I think the remaining test failures are (preexisting) flakiness and not related to my changes.

@jairhenrique
Copy link
Collaborator

LGTM.
@hartwork can you help with this review?

@hartwork
Copy link
Collaborator

hartwork commented Aug 7, 2023

@jairhenrique sorry, I lack bandwidth for this, I need to cut down my time on VCR.py for now.

@jairhenrique jairhenrique merged commit defad28 into kevin1024:master Aug 9, 2023
9 checks passed
@mgorny
Copy link
Contributor Author

mgorny commented Aug 9, 2023

Thank you!

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