| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
📝 Walkthrough
WalkthroughAdded a new sys-level function is_remote_debug_enabled() (always false), introduced an internal ABIFLAGS_ATTR constant while keeping ABIFLAGS exported, and added "supports_isolated_interpreters": false to the sys.implementation namespace in two construction sites. Changes
Sequence Diagram(s)(Skipped — changes are small API/flag additions without multi-component control flow.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem🚥 Pre-merge checks | ✅ 2 | ❌ 1 ❌ Failed checks (1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agentsIn `@crates/vm/src/stdlib/sys.rs`: - Around line 632-636: The function is_remote_debug_enabled() is not part of CPython 3.14 public API, so either remove it or make it explicitly a RustPython extension: if this was accidental, delete the const fn is_remote_debug_enabled and its #[pyfunction] entry from sys.rs; if intentional, rename it to a RustPython-specific symbol (e.g., _rustpython_is_remote_debug_enabled or keep the Rust name but add a distinct Python name via #[pyfunction(name = "_rustpython_is_remote_debug_enabled")]), add a doc comment stating it is a RustPython extension, and gate it behind a feature flag (e.g., #[cfg(feature = "rustpython_ext")]) so it does not pretend to be the CPython API.
Sorry, something went wrong.
| /// Return True if remote debugging is enabled, False otherwise. | ||
| #[pyfunction] | ||
| const fn is_remote_debug_enabled() -> bool { | ||
| false // RustPython does not support remote debugging | ||
| } |
There was a problem hiding this comment.
⚠️ Potential issue | 🔴 Critical
🧩 Analysis chain🏁 Script executed:
cd crates/vm/src/stdlib && head -c 30000 sys.rs | tail -c 5000 | cat -nRepository: RustPython/RustPython
Length of output: 5912
🏁 Script executed:
sed -n '625,640p' crates/vm/src/stdlib/sys.rsRepository: RustPython/RustPython
Length of output: 550
🏁 Script executed:
sed -n '620,640p' crates/vm/src/stdlib/sys.rsRepository: RustPython/RustPython
Length of output: 649
🌐 Web query:
Python 3.14 sys.is_remote_debug_enabled documentation official API
💡 Result:
Short answer: There is no official sys.is_remote_debug_enabled API in Python 3.14. The documented remote-debugging APIs are sys.remote_exec() and the PEP 768 / remote-debugging configuration flags (PYTHON_DISABLE_REMOTE_DEBUG, -X disable-remote-debug, --without-remote-debug). See the official sys docs and PEP for details. [1][2][3]
Sources:
Function does not match Python 3.14's documented API
While the implementation correctly follows the established pattern used by similar stub functions like _is_gil_enabled(), the sys.is_remote_debug_enabled() function does not exist in Python 3.14's documented public API. Python 3.14's remote debugging support is provided through sys.remote_exec() and configuration flags (PEP 768), not an is_remote_debug_enabled() function.
Clarify whether this is intentional (adding a RustPython-specific extension) or if the function should be removed or renamed to match CPython's actual API.
🤖 Prompt for AI AgentsIn `@crates/vm/src/stdlib/sys.rs` around lines 632 - 636, The function is_remote_debug_enabled() is not part of CPython 3.14 public API, so either remove it or make it explicitly a RustPython extension: if this was accidental, delete the const fn is_remote_debug_enabled and its #[pyfunction] entry from sys.rs; if intentional, rename it to a RustPython-specific symbol (e.g., _rustpython_is_remote_debug_enabled or keep the Rust name but add a distinct Python name via #[pyfunction(name = "_rustpython_is_remote_debug_enabled")]), add a doc comment stating it is a RustPython extension, and gate it behind a feature flag (e.g., #[cfg(feature = "rustpython_ext")]) so it does not pretend to be the CPython API.
Sorry, something went wrong.
There was a problem hiding this comment.
you are wrong
Sorry, something went wrong.
There was a problem hiding this comment.
🌐 Web query:
Python 3.14 sys.is_remote_debug_enabled official documentation
💡 Result:
Short answer: There is no entry for sys.is_remote_debug_enabled in the official Python 3.14 library documentation — it appears in CPython source (sysmodule.c) as an internal/CPython-only symbol but is not documented as a public sys.* API. Evidence:
References
🌐 Web query:
CPython 3.14 SYS_IS_REMOTE_DEBUG_ENABLED callable Python function
💡 Result:
Short answer: There is no Python-callable function named SYS_IS_REMOTE_DEBUG_ENABLED in CPython 3.14. The remote-debug feature is exposed as sys.remote_exec(...) and via build/runtime flags (PYTHON_DISABLE_REMOTE_DEBUG, -X disable-remote-debug, --without-remote-debug) and a debug-offsets flag in the runtime for external tools to inspect. See PEP 768 and the sys / remote-debugging docs. [1][2]
Sources:
🌐 Web query:
CPython 3.14 sysmodule.c "is_remote_debug_enabled" method definition
💡 Result:
CPython 3.14 exposes sys.is_remote_debug_enabled() (returns bool). The public docs and typeshed stub show the API; the remote-debugging implementation is in the remote debugging sources (Python/remote_debugging.c and Modules/_remote_debugging_module.c) introduced for PEP 768. See:
If you want the exact C definition (function name, parameters, and body) I can fetch the specific source file and paste the implementation lines for you — shall I do that?
Sources:
[1] fossies/typeshed sys stub (is_remote_debug_enabled).
[2] Python 3.14 sys library docs (remote_exec / remote debug configure).
[3] CPython PEP 768 / remote-debugging implementation files (Python/remote_debugging.c, Modules/_remote_debugging_module.c).
@youknowone, you're absolutely right, and I apologize for the incorrect review comment.
sys.is_remote_debug_enabled() is indeed a valid Python 3.14 API. It's part of the remote debugging functionality introduced in PEP 768, and the function is properly exposed in CPython 3.14 (as confirmed by the typeshed stubs and implementation in the CPython source).
Your implementation correctly follows the pattern of other stub functions and appropriately returns false since RustPython doesn't support remote debugging. The addition is correct for matching Python 3.14.2's API.
Thank you for the correction!
Learnt from: moreal Repo: RustPython/RustPython PR: 5847 File: vm/src/stdlib/stat.rs:547-567 Timestamp: 2025-06-27T14:47:28.810Z Learning: In RustPython's stat module implementation, platform-specific constants like SF_SUPPORTED and SF_SYNTHETIC should be conditionally declared only for the platforms where they're available (e.g., macOS), following CPython's approach of optional declaration using `#ifdef` checks rather than providing fallback values for other platforms.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.