Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python_files/pythonrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
if sys.platform != "win32":
import readline

# Avoid caching this file by linecache and incorrectly report tracebacks.
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment has a grammatical error. It should say "incorrectly reporting tracebacks" instead of "incorrectly report tracebacks".

Suggested change
# Avoid caching this file by linecache and incorrectly report tracebacks.
# Avoid caching this file by linecache and incorrectly reporting tracebacks.

Copilot uses AI. Check for mistakes.
__spec__ = __loader__ = None
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new behavior of setting __spec__ and __loader__ to None should have test coverage to ensure that these attributes are properly set and that they prevent linecache from incorrectly caching this file. Consider adding a test that verifies these attributes are None after module import.

Copilot uses AI. Check for mistakes.


original_ps1 = ">>> "
is_wsl = "microsoft-standard-WSL" in platform.release()

Expand Down