Skip to content

Conversation

@fanninpm
Copy link
Contributor

@fanninpm fanninpm commented Jan 18, 2026

A lot of the tests I marked as failing are due to DeprecationWarnings not being emitted.

Summary by CodeRabbit

  • New Features
    • Added support for context-aware warnings configuration option, enabling users to control warning behavior as needed.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

Two structs are extended with a new context_aware_warnings: bool field—Settings and FlagsData—to support a new command-line flag option. The field is initialized to false by default and propagated from settings to flags data during initialization.

Changes

Cohort / File(s) Summary
Context-aware warnings flag
crates/vm/src/vm/setting.rs, crates/vm/src/stdlib/sys.rs
Added context_aware_warnings: bool field to Settings struct with documentation comment and default value false. Updated FlagsData struct to include the same field and modified FlagsData::from_settings() to populate it from settings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • fanninpm

Poem

🐰 A flag so aware, context-bright and true,
Boolean whispers in structures old and new,
Settings and flags in perfect sync they dance,
False by default, but ready to advance! 🚩✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions updating to CPython 3.14, but the actual changes shown involve adding a context_aware_warnings flag to FlagsData and Settings structs. Update the title to accurately reflect the primary change, such as 'Add context_aware_warnings flag to settings and flags' or 'Implement context_aware_warnings option for warning control'.
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.
✅ 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

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.

fanninpm and others added 6 commits January 18, 2026 13:20
XXX- The default setting of this and thread_inherit_context should be
true.
Updating test_sys to CPython 3.14 is beyond the scope of this PR.
@youknowone youknowone merged commit e4ce70b into RustPython:main Jan 18, 2026
13 checks passed
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.

2 participants