Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

Conversation

@youknowone
Copy link
Member

@youknowone youknowone commented Jan 30, 2026

Summary by CodeRabbit

Bug Fixes

  • Improved async test detection to properly recognize inherited async methods from parent classes, ensuring accurate test identification across inheritance hierarchies.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

The patch modifies the async method detection logic to support inherited methods by introducing class inheritance tracking and replacing direct membership checks with ancestor traversal during Phase 2 patch generation.

Changes

Cohort / File(s) Summary
Inheritance-aware async detection
scripts/update_lib/patch_spec.py
Introduces class_bases dictionary and all_classes set to track class inheritance relationships. Replaces direct async method membership test with breadth-first search through the class hierarchy to determine if a test method should be patched as async, enabling support for inherited async methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through inheritance chains,
No async method now remains unseen,
Base classes tracked, ancestors explained,
The patch walks tall where tests have been! 🌿

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Update test_exceptions from v3.14.2' is vague and does not accurately describe the actual changes, which involve refactoring class inheritance tracking and async method resolution in patch_spec.py. Consider a more specific title that reflects the core technical change, such as 'Support inherited async methods in patch spec generation' or 'Track class inheritance for async method resolution'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@youknowone youknowone marked this pull request as ready for review January 30, 2026 15:59
@github-actions
Copy link
Contributor

Code has been automatically formatted

The code in this PR has been formatted using:

  • ruff format
    Please pull the latest changes before pushing again:
git pull origin exceptions

@github-actions
Copy link
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] test: cpython/Lib/test/test_exceptions.py (TODO: 31)
[x] test: cpython/Lib/test/test_baseexception.py
[x] test: cpython/Lib/test/test_except_star.py (TODO: 1)
[ ] test: cpython/Lib/test/test_exception_group.py (TODO: 2)
[x] test: cpython/Lib/test/test_exception_hierarchy.py (TODO: 2)
[x] test: cpython/Lib/test/test_exception_variations.py

dependencies:

dependent tests: (no tests depend on exception)

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@fanninpm
Copy link
Contributor

CI failures seem unrelated, but are worthy of investigation.

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.

3 participants