GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Define sched_param.__reduce__ with #[pymethod] by youknowdot · Pull Request #9551 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 2, 2026 •
edited by youknowone
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

  • Define posix.sched_param.__reduce__ with #[pymethod] instead of a hand-built PyMethodDef installed in #[extend_class]. It now reports __text_signature__ == '($self, /)' with __doc__ is None, matching CPython's METH_NOARGS method without a docstring. The return value is unchanged: (type, (sched_priority,)).
  • PyStructSequence::extend_class now installs the default __reduce__ unconditionally. Method definitions are installed after class extension, so an impl's own __reduce__ replaces the default; the contains check had no remaining users.

Not in scope

The class signature of sched_param still falls back to (iterable=(), /) (CPython: (sched_priority)). An earlier revision of this PR added a constructor_args option to #[pystruct_sequence] for it; that option was removed because sched_param would be its only user and the declared type was not tied to the type slot_new binds.

Validation

  • cargo fmt --check, cargo clippy -p rustpython-vm --all-targets (no new warnings).
  • On macOS: time.struct_time pickle round-trip and os.stat_result.__reduce__ signature/doc checked. sched_param is Linux-only; relying on CI for it.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:fix-sched-param-main-20261102 (255a440) with main (e2abc4c)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowdot
youknowdot force-pushed the fix-sched-param-main-20261102 branch from f9ee4da to 43d2077 Compare November 3, 2026 07:09
This was referenced Nov 4, 2026
Align list, tuple and slice controls #9696
Merged
Match sequence and timestamp signature metadata to Python 3.15 #9742
Merged
@youknowdot youknowdot mentioned this pull request Nov 11, 2026
Match remaining native signatures and watchdog thread limits #9808
Merged
youknowdot and others added 3 commits November 12, 2026 12:23
@youknowdot @youknowone
Connect custom struct sequence constructor signature metadata
c19b91b
Assisted-by: OpenAI Codex:model version not exposed
@youknowdot @youknowone
Remove callable signature metadata tests
5175f58
Retain coverage of signature infrastructure while removing tests tied to individual Python callables, as requested.

Assisted-by: OpenAI Codex:model version not exposed
@youknowone
Test struct sequence constructor_args signature directly
880ae1a
Replace the derive expansion token comparison tests with a vm test that
checks the class signature produced by constructor_args. Install the
default struct sequence __reduce__ unconditionally; an impl's own
__reduce__ method replaces it.

Assisted-by: Claude
@youknowone
youknowone force-pushed the fix-sched-param-main-20261102 branch from 43d2077 to 880ae1a Compare November 12, 2026 09:10
@youknowone
Drop struct sequence constructor_args option
255a440
Remove the constructor_args pystruct_sequence option, the
PyStructSequence::CONSTRUCTOR_PARAMS constant, and their tests. The class
signature of struct sequences again falls back to (iterable=(), /);
sched_param keeps its #[pymethod] __reduce__.

Assisted-by: Claude
@youknowone youknowone changed the title Expose sched_param signatures from its existing bindings Define sched_param.__reduce__ with #[pymethod] Nov 12, 2026
youknowone
youknowone approved these changes Nov 12, 2026
View reviewed changes
@youknowone
youknowone marked this pull request as ready for review November 12, 2026 12:59
@youknowone
youknowone merged commit 8ababe1 into RustPython:main Nov 12, 2026
28 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T12:59:47.234226Z
We couldn’t complete this review. Comment @codex review to try again.
255a440 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@youknowdot @youknowone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.