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

Add aiohttp tests to CI #1415

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Cycloctane
Copy link
Contributor

What do these changes do?

Test aiohttp with new changes in yarl to prevent unexpected breaking changes.

Are there changes in behavior for the user?

Related issue number

fixes #534

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 14, 2024
Copy link

codspeed-hq bot commented Nov 14, 2024

CodSpeed Performance Report

Merging #1415 will not alter performance

Comparing Cycloctane:tests_aiohttp (bc78e56) with master (e910178)

Summary

✅ 83 untouched benchmarks

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.06%. Comparing base (3fbc1f1) to head (c3bf75b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1415   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files          31       31           
  Lines        5772     5772           
  Branches      345      345           
=======================================
  Hits         5545     5545           
  Misses        201      201           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 96.06% <ø> (ø)
MyPy 48.67% <ø> (ø)
OS-Linux 99.55% <ø> (ø)
OS-Windows 99.62% <ø> (ø)
OS-macOS 99.30% <ø> (ø)
Py-3.10.11 99.28% <ø> (ø)
Py-3.10.15 99.51% <ø> (ø)
Py-3.11.10 99.51% <ø> (ø)
Py-3.11.9 99.28% <ø> (ø)
Py-3.12.7 99.51% <ø> (ø)
Py-3.13.0 99.51% <ø> (ø)
Py-3.9.13 99.23% <ø> (ø)
Py-3.9.20 99.47% <ø> (ø)
Py-pypy7.3.16 99.53% <ø> (ø)
Py-pypy7.3.17 99.55% <ø> (ø)
VM-macos-latest 99.30% <ø> (ø)
VM-ubuntu-latest 99.55% <ø> (ø)
VM-windows-latest 99.62% <ø> (ø)
pytest 99.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

Would you consider testing against maintained aiohttp releases as well?

I see two options:

  1. Install aiohttp from PyPI tarball. It has tests, maybe tarball could be combined with wheels to avoid compilation steps.
  2. Install from GitHub maintained branch.

For any approach editing workflow file for updating a list of supported aiohttp versions is totally fine.

I don't know which is better. Maybe fast aiohttp installation time could be a priority.

It could be implemented in the following PR, sure.

What is your opinion?

@Cycloctane
Copy link
Contributor Author

Cycloctane commented Nov 14, 2024

Awesome, thanks!

Would you consider testing against maintained aiohttp releases as well?

I see two options:

1. Install aiohttp from PyPI tarball. It has tests, maybe tarball could be combined with wheels to avoid compilation steps.

2. Install from GitHub maintained branch.

For any approach editing workflow file for updating a list of supported aiohttp versions is totally fine.

I don't know which is better. Maybe fast aiohttp installation time could be a priority.

It could be implemented in the following PR, sure.

What is your opinion?

I think both options are acceptable if they achieve the same result. Downloading tarball and whl from pypi may be better since it can avoid compiling and building steps.

CHANGES/1415.contrib.rst Outdated Show resolved Hide resolved
Comment on lines 46 to 48
- name: Update pip, wheel, setuptools, build, twine
run: |
python -m pip install -U pip wheel setuptools build twine
Copy link
Member

Choose a reason for hiding this comment

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

Nothing short of build seems to be necessary here.

Copy link
Contributor Author

@Cycloctane Cycloctane Nov 15, 2024

Choose a reason for hiding this comment

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

Nothing short of build seems to be necessary here.

I just realized that we can remove this entire step, since the necessary upgrades are already ensured by the makefile command.

Copy link
Member

Choose a reason for hiding this comment

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

If we want to make this check required in pull requests, it must be integrated into the main CI/CD workflow.

Copy link
Member

Choose a reason for hiding this comment

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

I don't mind too much, but running a different project's test suite kind of feels to me like it's cleaner to me to be in a separate file. We can still add this as a separate required status in the repo settings.

Comment on lines 63 to 65
- name: Run dev_mode tests
run: python -X dev -m pytest -m dev_mode
shell: bash
Copy link
Member

Choose a reason for hiding this comment

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

We probably don't need to run the dev_mode tests here

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, there's no harm in running it, but probably not doing anything useful for yarl. I assume that came from the llhttp workflow which definitely does need this to test strict/lax parsing differences.

@Dreamsorcerer
Copy link
Member

Dreamsorcerer commented Nov 15, 2024

Downloading tarball and whl from pypi may be better since it can avoid compiling and building steps.

So, one reason you probably want to stick to checking out the aiohttp code, is when yarl decides to break something in aiohttp on-purpose, you won't be able to get the tests passing on a released version of aiohttp. By checking out the code from the repo, we can adjust the tests on aiohttp to allow the new behaviour and then rerun the tests here against the new aiohttp commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test aiohttp (and maybe other dependent libraries) before new releases
5 participants