🧪 Run tests from sdist like downstreams - #13388
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #13388 +/- ##
==========================================
- Coverage 98.99% 98.41% -0.59%
==========================================
Files 132 133 +1
Lines 49454 49746 +292
Branches 2572 2629 +57
==========================================
- Hits 48959 48958 -1
- Misses 371 663 +292
- Partials 124 125 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
76ee2ad to
69d5ed8
Compare
Merging this PR will improve performance by 19.76%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_client_send_large_websocket_compressed_messages[isal.isal_zlib] |
86.4 ms | 72.2 ms | +19.76% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing webknjaz:testing/wheel-ci-cd-from-sdist (9c7a5fc) with master (77c5108)2
Footnotes
-
83 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
master(616e937) during the generation of this report, so 77c5108 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
21560bc to
c41a21f
Compare
This is set up on the `pyproject.toml` level.
c41a21f to
250ed16
Compare
250ed16 to
f9dc264
Compare
|
@aiolibsbot review and keep in mind that this is intended to be very minimalist in scope/diff. Any improvements should be in follow-ups if at all possible. |
Understood — scoped review, follow-ups noted as suggestions only. Two blockers, both debug scaffolding, not design: Everything else is a suggestion. |
PR Review — 🧪 Run tests from sdist like downstreamsSolid restructuring with two debug leftovers that must come out before merge. The core design is right and carefully executed. Building the sdist once in
Strip the two debug leftovers and this is ready; the rest are fine as follow-ups. 🔴 Blocking
1. Debug leftover: `- run: exit 1` as the first step of `deploy`
|
| - lint-from-sdist | ||
| - lint-from-git |
There was a problem hiding this comment.
Is it worth splitting into 2 jobs? I feel like keeping it in one job is probably enough (and reduces the number of runners needed at once).
There was a problem hiding this comment.
This is a temporary solution, I didn't want to figure out a big refactoring in scope of this PR.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
|
Backport PR to 3.15: #13413 |
|
Backport PR to 3.14: #13414 |
PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric.
…kip coverage PR #13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to find out what changed.
PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there.
PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there.
PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there.
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
… branch directory skip PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there. (cherry picked from commit 7dc43ae)
… branch directory skip PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there. (cherry picked from commit 7dc43ae)
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
… branch directory skip PR aio-libs#13388 introduced partial branch coverage in a directory scan skip logic in `tests/test_circular_imports.py::test_no_warnings`. This patch is attempting to address is by bringing the coverage on the test module back to 100% metric via an explicitly applied "no branch" pragma. The missing branch coverage only appears in test environments checking real project installs that are non-editable. Editable installs have a `aiohttp/.hash/` cache directory that would contain files like `_http_parser.pyx.hash`, `_cparser.pxd.hash`, `hdrs.py.hash`, `_find_header.pxd.hash` and `_http_writer.pyx.hash` which speed up processes in local development environment. The `continue` instruction would only be hit there. (cherry picked from commit 7dc43ae)
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
…ke downstreams Merge PR aio-libs#13388 from branch 'testing/wheel-ci-cd-from-sdist' (cherry picked from commit 203c1c5)
What do these changes do?
This allows us make sure everything they need is shipped through PyPI. And brings us closer to how
pip installwould build wheels in the wild. We now also run tests in CI from sdist.Are there changes in behavior for the user?
A quality-of-life change — once released, the users' installers will be able to get new aiohttp versions in their pure-python form by default, even if there's no pre-built wheel for their runtime (like if they get back to a certain version in the future with an interpreter released years later).
Is it a substantial burden for the maintainers to support this?
It's actually bringing the infra closer to the rest of the repos. So it's a win.
Related issue number
And this should help us out getting CI/CD to:
Checklist
CONTRIBUTORS.txtCHANGES/foldername it
<issue_or_pr_num>.<type>.rst(e.g.588.bugfix.rst)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature: A new behavior, public APIs. That sort of stuff..deprecation: A declaration of future API removals and breakingchanges in behavior.
.breaking: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc: Notable updates to the documentation structure or buildprocess.
.packaging: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.