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 — Match SymbolTable repr with CPython format by moreal · Pull Request #7139 · RustPython/RustPython

Conversation

@moreal

@moreal moreal commented Feb 14, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Improvements
    • Symbol table objects now display with detailed information (table name, object ID, and line number) when printed in the Python REPL or error messages.
    • Updated symbol table class identifier for clarity.

Sorry, something went wrong.

Uh oh!

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

All reactions
@moreal
Match SymbolTable repr with CPython format
7b54cc9
@coderabbitai

coderabbitai Bot commented Feb 14, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request modifies symtable.rs to add Python-level representation support for PySymbolTable. It imports Representable, changes the exported class name from "SymbolTable" to "symtable entry", decorates the class with with(Representable), and implements a custom repr_str method for formatted output.

Changes

Cohort / File(s) Summary
Symbol Table Representation
crates/vm/src/stdlib/symtable.rs
Added imports (Py, types::Representable), renamed pyclass from "SymbolTable" to "symtable entry", added with(Representable) to pyclass attribute, and implemented Representable trait with custom repr formatting including class name, table name, object id, and line number.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • RustPython/RustPython#6048: Modifies the same PySymbolTable type with API/property refactoring while this PR changes its representation and class naming.

Suggested reviewers

  • youknowone

Poem

🐰 A symbol table dressed in new attire,
With symtable entry and repr to inspire,
Hops through the code with representable flair,
Displaying its essence with formatting care! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (29 files):

⚔️ .github/workflows/upgrade-pylib.md (content)
⚔️ Cargo.lock (content)
⚔️ Lib/collections/__init__.py (content)
⚔️ Lib/hashlib.py (content)
⚔️ Lib/test/test_collections.py (content)
⚔️ Lib/test/test_hashlib.py (content)
⚔️ Lib/test/test_hmac.py (content)
⚔️ Lib/test/test_inspect/test_inspect.py (content)
⚔️ Lib/test/test_keywordonlyarg.py (content)
⚔️ Lib/test/test_positional_only_arg.py (content)
⚔️ Lib/test/test_re.py (content)
⚔️ Lib/test/test_smtplib.py (content)
⚔️ Lib/test/test_struct.py (content)
⚔️ Lib/test/test_symtable.py (content)
⚔️ Lib/test/test_ucn.py (content)
⚔️ Lib/test/test_unicodedata.py (content)
⚔️ Lib/test/test_urlparse.py (content)
⚔️ crates/codegen/src/compile.rs (content)
⚔️ crates/stdlib/Cargo.toml (content)
⚔️ crates/stdlib/src/blake2.rs (content)
⚔️ crates/stdlib/src/hashlib.rs (content)
⚔️ crates/stdlib/src/md5.rs (content)
⚔️ crates/stdlib/src/sha1.rs (content)
⚔️ crates/stdlib/src/sha256.rs (content)
⚔️ crates/stdlib/src/sha3.rs (content)
⚔️ crates/stdlib/src/sha512.rs (content)
⚔️ crates/stdlib/src/unicodedata.rs (content)
⚔️ crates/vm/src/stdlib/symtable.rs (content)
⚔️ crates/vm/src/vm/mod.rs (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Match SymbolTable repr with CPython format' accurately describes the main change, which is implementing a Representable trait for PySymbolTable to align its string representation with CPython's format.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch fix/fail-symtable-test_symtable_entry_repr
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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.

@github-actions

github-actions Bot commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[ ] lib: cpython/Lib/hashlib.py
[ ] test: cpython/Lib/test/test_hashlib.py (TODO: 9)

dependencies:

  • hashlib

dependent tests: (15 tests)

  • hashlib: test_hashlib test_hmac test_smtplib test_tarfile test_unicodedata test_urllib2_localnet
    • urllib.request: test_http_cookiejar test_pathlib test_pydoc test_site test_ssl test_urllib test_urllib2 test_urllib2net test_urllibnet

[x] lib: cpython/Lib/symtable.py
[ ] test: cpython/Lib/test/test_symtable.py (TODO: 17)

dependencies:

  • symtable

dependent tests: (1 tests)

  • symtable: test_symtable

Legend:

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

Sorry, something went wrong.

Uh oh!

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

@moreal moreal self-assigned this Feb 14, 2026
youknowone
youknowone reviewed Feb 14, 2026
View reviewed changes
Comment thread crates/vm/src/stdlib/symtable.rs

#[pyattr]
#[pyclass(name = "SymbolTable")]
#[pyclass(name = "symtable entry")]

@youknowone youknowone Feb 14, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

SymbolTable itself is not an entry, is this correct?

Sorry, something went wrong.

Uh oh!

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

All reactions
youknowone
youknowone approved these changes Feb 14, 2026
View reviewed changes
@moreal
moreal marked this pull request as ready for review February 14, 2026 13:51
@youknowone
youknowone merged commit e8698aa into RustPython:main Feb 14, 2026
24 of 25 checks passed

Uh oh!

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

youknowone pushed a commit to youknowone/RustPython that referenced this pull request Mar 22, 2026
@moreal
Match SymbolTable repr with CPython format (RustPython#7139)
40caa66
youknowone pushed a commit that referenced this pull request Sep 16, 2026
@moreal
Match SymbolTable repr with CPython format (#7139)
dd05bac
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

@moreal moreal

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

@moreal @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.