Skip to content

🧪 Fix the circular import branch directory skip - #13430

Merged
webknjaz merged 1 commit into
aio-libs:masterfrom
webknjaz:testing/13388-circular-imports-branch-cov
Aug 16, 2026
Merged

🧪 Fix the circular import branch directory skip#13430
webknjaz merged 1 commit into
aio-libs:masterfrom
webknjaz:testing/13388-circular-imports-branch-cov

Conversation

@webknjaz

Copy link
Copy Markdown
Member

What do these changes do?

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 address is by bringing the coverage on the test module back to 100% metric.

Are there changes in behavior for the user?

Nah.

Is it a substantial burden for the maintainers to support this?

Nope.

Related issue number

This is just a follow-up for PR #13388.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder
    • name 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 an
        improper 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 breaking
        changes 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 build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and 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 above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      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.

@webknjaz webknjaz self-assigned this Aug 16, 2026
@webknjaz webknjaz added infra tests backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot labels Aug 16, 2026
@webknjaz

Copy link
Copy Markdown
Member Author

This is actually not a fix yet, which is why it's in draft. I'll update the PR post experimentation in #13425.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.42%. Comparing base (356d355) to head (705c6c5).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13430   +/-   ##
=======================================
  Coverage   98.41%   98.42%           
=======================================
  Files         133      133           
  Lines       49748    49747    -1     
  Branches     2629     2628    -1     
=======================================
+ Hits        48960    48961    +1     
+ Misses        663      662    -1     
+ Partials      125      124    -1     
Flag Coverage Δ
Autobahn 21.95% <100.00%> (+<0.01%) ⬆️
CI-GHA 98.32% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.09% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.45% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.34% <100.00%> (-0.01%) ⬇️
Py-3.10 97.54% <100.00%> (+<0.01%) ⬆️
Py-3.11 97.79% <100.00%> (+<0.01%) ⬆️
Py-3.12 97.88% <100.00%> (+<0.01%) ⬆️
Py-3.13 97.87% <100.00%> (-0.01%) ⬇️
Py-3.14 97.89% <100.00%> (-0.01%) ⬇️
Py-3.14t 96.97% <100.00%> (-0.01%) ⬇️
Py-pypy-3.11 96.84% <100.00%> (+<0.01%) ⬆️
VM-macos 97.34% <100.00%> (-0.01%) ⬇️
VM-ubuntu 98.09% <100.00%> (+<0.01%) ⬆️
VM-windows 96.45% <100.00%> (+<0.01%) ⬆️
cython-coverage 82.19% <ø> (ø)

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

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

@webknjaz
webknjaz force-pushed the testing/13388-circular-imports-branch-cov branch from a3040b8 to a34ae1b Compare August 16, 2026 16:57
@codspeed-hq

codspeed-hq Bot commented Aug 16, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 8.1%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 83 untouched benchmarks
⏩ 83 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
test_ten_compressed_responses_iter_chunked_1mb[isal.isal_zlib] 207 ms 191.4 ms +8.1%

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/13388-circular-imports-branch-cov (705c6c5) with master (356d355)

Open in CodSpeed

Footnotes

  1. 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.

@webknjaz

This comment was marked as outdated.

@webknjaz

This comment was marked as resolved.

@webknjaz
webknjaz force-pushed the testing/13388-circular-imports-branch-cov branch from c396327 to 0353feb Compare August 16, 2026 21:22
@webknjaz
webknjaz marked this pull request as ready for review August 16, 2026 21:22
@webknjaz
webknjaz requested a review from asvetlov as a code owner August 16, 2026 21:22
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "🧪 Fix the circular import branch direct..." | Re-trigger Greptile

Comment thread tests/test_circular_imports.py
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.
@webknjaz
webknjaz force-pushed the testing/13388-circular-imports-branch-cov branch from 0353feb to 705c6c5 Compare August 16, 2026 21:30
@webknjaz
webknjaz merged commit 7dc43ae into aio-libs:master Aug 16, 2026
51 of 52 checks passed
@patchback

patchback Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.15: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.15/7dc43ae0926dd9363b71c06b213a74e61a520e39/pr-13430

Backported as #13434

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.14: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.14/7dc43ae0926dd9363b71c06b213a74e61a520e39/pr-13430

Backported as #13435

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Aug 16, 2026
… 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)
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Aug 16, 2026
… 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)
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Aug 16, 2026
… branch directory skip

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 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)
webknjaz added a commit to webknjaz/aiohttp that referenced this pull request Aug 17, 2026
… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note infra tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant