Skip to content

Accept numeric conversion protocols in sys setters - #16514

Open
xiehuanyi wants to merge 1 commit into
python:mainfrom
xiehuanyi:fix-sys-numeric-conversion-protocols
Open

xiehuanyi wants to merge 1 commit into
python:mainfrom
xiehuanyi:fix-sys-numeric-conversion-protocols

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

sys.setrecursionlimit(np.int64(2000)), sys.set_int_max_str_digits(np.int64(4300)), and sys.setswitchinterval(np.float32(0.005)) succeed at runtime; model their existing integer-index and float/index conversion protocols so type checkers accept these calls.

Agent used: OpenAI Codex, gpt-6.1-sol (xhigh).

Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

This branch has not been deployed

No deployments
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