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 — feat: Sync code.py + test_code_module.py from CPython v3.13.1 by ntvinh2005 · Pull Request #6181 · RustPython/RustPython

Conversation

@ntvinh2005

@ntvinh2005 ntvinh2005 commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

This PR updates RustPython’s stdlib code.py and its associated tests
test_code_module.py to match CPython v3.13.1.

  • Copied from CPython tag v3.13.1
  • Ran with:
    cargo run -- -m test -v test_code_module
  • 17 tests run, 11 passed, 6 failed
  • Failures are expected due to known VM differences:
    • SyntaxError wording
    • IndentationError wording
    • Unicode error mismatch
    • Traceback formatting difference

As per #5529, I’m submitting the updated files as-is. Follow-up issues can be filed for the failing cases.

Sorry, something went wrong.

Uh oh!

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

All reactions
@coderabbitai

coderabbitai Bot commented Oct 3, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • Lib/code.py is excluded by !Lib/**
  • Lib/test/test_code_module.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ShaharNaveh

ShaharNaveh commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

@ntvinh2005 tysm for the PR:)
Can you please update it from CPython 3.13.7 instead? (if there is any difference)

ntvinh2005 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@ntvinh2005

ntvinh2005 commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

Will do it, thanks a lot for your response.

All reactions

Sorry, something went wrong.

Uh oh!

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

@fanninpm

fanninpm commented Oct 4, 2025

Copy link
Copy Markdown
Contributor

I believe you can use the following command to test your changes locally:

# this runs all of the tests (not necessary if you know which test is affected)
cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v
# this runs only the test suite named "test_whatever" (usually located at `Lib/test/test_whatever.py`)
cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v test_whatever

For a list of all resources and more command-line options, you can execute cargo run --release --features ssl,jit -- -m test -h.

ntvinh2005 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@youknowone

youknowone commented Oct 23, 2025

Copy link
Copy Markdown
Member

@ntvinh2005 Thank you for contributing!

Since code.rs is also recently update, please rebase it on the top of upstream/main. (Otherwise merge is also fine)

For the failing tests, you don't need to actually fix the bugs; please add @unittest.expectedFailure # TODO: RUSTPYTHON as other test files.

To update code.py, don't forget to also update Lib/test/test_code.py too.

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone
youknowone force-pushed the feat/sync-codepy-3.13 branch from a624c0b to f811e7b Compare December 30, 2025 07:18
ntvinh2005 and others added 2 commits December 31, 2025 01:29
@ntvinh2005 @youknowone
feat: Sync code module from cpython 3.13
0dc0e25
@youknowone
also udpate test_code_module
1951705
@youknowone
youknowone force-pushed the feat/sync-codepy-3.13 branch from 2cd18e5 to 1951705 Compare December 30, 2025 16:29
@youknowone

youknowone commented Dec 30, 2025

Copy link
Copy Markdown
Member

trying merge first as partially prior work for #6595

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone
youknowone merged commit ca1c4c1 into RustPython:main Dec 30, 2025
13 checks passed

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

No reviews

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.

4 participants

@ntvinh2005 @ShaharNaveh @fanninpm @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.