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 — No alloc Unicode version by joshuamegnauth54 · Pull Request #9820 · RustPython/RustPython

Conversation

@joshuamegnauth54

@joshuamegnauth54 joshuamegnauth54 commented Nov 12, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Simple patch that moves the NameAliases version parser to build.rs. This avoids embedding the text file just to parse the file line each time unicode_version() is called.

I also fixed version_owner to allocate less by not constructing a temporary String to turn into a CString.

  • Closes #xxxx

One of checkbox below must be checked.

  • I did not use AI to write the code of this patch.
  • This PR follows our AI policy

Summary by CodeRabbit

  • Bug Fixes
    • Unicode version reporting now consistently reflects the version bundled with the application, including for modern and legacy data views. This keeps reported version information aligned with the Unicode data available at runtime.

Sorry, something went wrong.

Uh oh!

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

All reactions
@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-12T19:02:51.901214Z
We couldn’t complete this review. Comment @codex review to try again.
f6631da PR opened
ℹ️ 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

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

All reactions

Sorry, something went wrong.

Uh oh!

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

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: RustPython/RustPython
  • Branch: main
  • File: .coderabbit.yml
  • Commit: dba7a05
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d8c01d0-ed6c-4a27-99aa-e5db22df6911
Commits

Reviewing files that changed from the base of the PR and between f6631da and 419664d.

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

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The build script now extracts the modern Unicode version at compile time. The Unicode library exposes modern and legacy version constants, and the standard library uses them for its Unicode version values.

Changes: Unicode version source and consumers

Layer / File(s) Summary
Build-time version extraction
crates/unicode/build.rs
The build script validates the version from the first line of NameAliases.txt and emits it as UNICODE_VERSION. It runs this parser alongside the block parser in small_parsers.
Unicode version constants and accessors
crates/unicode/src/data.rs, crates/unicode/src/lib.rs
The Unicode library defines and re-exports UNICODE_VERSION and UNICODE_VERSION_LEGACY. Ucd::unidata_version() returns the applicable constant. The version test checks the modern constant, and the former unicode_version() function is removed.
Standard-library version values
crates/stdlib/src/unicodedata.rs
Ucd::new initializes its version from the modern or legacy constant. The module-level unidata_version returns UNICODE_VERSION. CString construction panics if the selected value contains an internal NUL.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Possibly related PRs

  • RustPython/RustPython#9406: It changes the same Unicode version source and public re-export that this PR replaces with compile-time constants.
  • RustPython/RustPython#9458: It adds and schedules the generate_blocks parser, which this PR moves into small_parsers and schedules there.

Suggested reviewers: youknowone, youknowdot

Merge Risk: Minimal · previous review f6631

The change moves Unicode version extraction to build time and removes a per-call allocation and parse. No actionable merge-blocking risk was identified in the supplied changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "No alloc Unicode version" matches the main change. The PR moves the NameAliases version parsing to build.rs and embeds the version as the compile-time constants UNICODE_VERSION and UNICODE_…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "No alloc Unicode version" matches the main change. The PR moves the NameAliases version parsing to build.rs and embeds the version as the compile-time constants UNICODE_VERSION and UNICODE_VERSION_LEGACY, so unicode_version() no longer parses the text file or allocates at runtime. The title is short and specific. It does not name the build-time change, but it points to the core purpose, and a teammate scanning history would understand the primary change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: RustPython/RustPython
  • Branch: main
  • File: .coderabbit.yml
  • Commit: dba7a05
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97f1b1a8-34d1-4f02-9d6e-3d96c0865e10
Commits

Reviewing files that changed from the base of the PR and between dba7a05 and f6631da.

Files selected for processing: 4

  • crates/stdlib/src/unicodedata.rs
  • crates/unicode/build.rs
  • crates/unicode/src/data.rs
  • crates/unicode/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

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

@joshuamegnauth54
No alloc Unicode version
419664d
Simple patch that moves the NameAliases version parser to build.rs. This
avoids embedding the text file just to parse the file line each time
unicode_version() is called.

I also fixed version_owner to allocate less by not constructing a
temporary String to turn into a CString.
@joshuamegnauth54
joshuamegnauth54 force-pushed the comp-time-ucd-version branch from f6631da to 419664d Compare November 12, 2026 20:20
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.

1 participant

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