Skip to content

Update enum from CPython 3.15.0rc2 - #8942

Draft
youknowdot wants to merge 1 commit into
RustPython:mainfrom
youknowdot:cpython-315-core-enum
Draft

youknowdot wants to merge 1 commit into
RustPython:mainfrom
youknowdot:cpython-315-core-enum

Conversation

@youknowdot

Copy link
Copy Markdown

Summary

Sync Lib/enum.py and its regression tests from CPython v3.15.0rc2 (435c9e5a798c99653e3ab64ce29baed0e4f3dfee). This first, isolated 3.15 migration slice brings upstream negative Flag handling, Flag member visibility in dir(), and public exports without changing RustPython's declared Python target or native runtime.

enum.py is identical to the pinned upstream source. The two existing RustPython expected-failure decorators are preserved in test_enum.py; no new skips or expected failures are added.

Validation

Validated on Linux against base be3d12e96c17a8b5e879e0d28980961f91c83258 before creating the preserved commit:

  • cargo run --locked --release -- -m test test_enum test_json test_argparse: 3,199 tests, 9 skipped
  • cargo test --locked --workspace --exclude rustpython_wasm --exclude rustpython-venvlauncher --exclude rustpython-capi: 1,344 passed, 18 ignored
  • (cd crates/capi && cargo test --locked): 112 passed
  • cargo clippy --locked: passed without warnings
  • Configured pre-commit hooks passed during the normal commit using prek 0.5.4; no hook bypass or configuration changes
  • git diff --check and comparison with the pinned CPython source passed

This is a draft. Cross-platform validation and hosted CI remain to be verified. An earlier test_re run encountered baseline locale/AF_UNIX environment failures; that module is not claimed as passing here.

AI assistance

Codex/OpenAI performed the upstream synchronization/reconstruction, diff review, validation, and PR preparation. The execution runtime did not expose an exact model version. The commit preserves the disclosure and Assisted-by: Codex:model-version-unavailable trailer.

Sync enum and its regression tests from CPython v3.15.0rc2 (435c9e5a798c99653e3ab64ce29baed0e4f3dfee). Preserve the two existing RustPython expected-failure decorators. Keep this first migration slice limited to enum without changing the declared Python target or native runtime.

AI assistance: Codex/OpenAI reconstructed the upstream sync, reviewed the diff, and ran validation. The runtime did not expose the exact model version.

Assisted-by: Codex:model-version-unavailable
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[ ] lib: cpython/Lib/enum.py
[ ] test: cpython/Lib/test/test_enum.py (TODO: 2)

dependencies:

  • enum (native: builtins, sys)
    • inspect, types

dependent tests: (16 tests)

  • enum: test_argparse test_ast test_enum test_httplib test_json test_patma test_pstats test_pydoc test_signal test_socket test_ssl test_str test_time test_types test_typing test_uuid

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

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.

1 participant