Skip to content

Replace unmaintained unic-ucd-category crate with icu_properties#24344

Merged
MichaReiser merged 3 commits intoastral-sh:mainfrom
ShaharNaveh:replace-unmaintained-unic
Apr 2, 2026
Merged

Replace unmaintained unic-ucd-category crate with icu_properties#24344
MichaReiser merged 3 commits intoastral-sh:mainfrom
ShaharNaveh:replace-unmaintained-unic

Conversation

@ShaharNaveh
Copy link
Copy Markdown
Contributor

@ShaharNaveh ShaharNaveh commented Apr 1, 2026

Summary

The unic-ucd-category crate is unmaintained (see rustsec/advisory-db#2424)

Test Plan

I've made a PR for RustPython at: RustPython/RustPython#7555 that passed the CPython test suite (the failing tests are because of implementation details related to RustPython)

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Apr 1, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 86.76%. The percentage of expected errors that received a diagnostic held steady at 81.53%. The number of fully passing files held steady at 70/132.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Apr 1, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Apr 1, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-await 40 0 0
invalid-return-type 1 0 0
Total 41 0 0

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Full report with detailed diff (timing results)

@ShaharNaveh ShaharNaveh force-pushed the replace-unmaintained-unic branch from 902d4ed to c07c57b Compare April 1, 2026 12:31
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Apr 1, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Copy link
Copy Markdown
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thank you. This makes sense. But we should revert the unrelated dependency version bumps. We intentionally only depend on dependencies that are at least 7 days old and it seems this PR bumps some of them.

!(cat.is_other() || cat.is_separator())
let cat = GeneralCategory::for_char(c);

!matches!(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Let's reorder them so that they match the doc-comment

Cargo.lock Outdated
]

[[package]]
name = "async-trait"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ruff doesn't use any async code. It would be nice if we can disable whatever feature/dependency depends on async-trait

Cargo.lock Outdated
Comment on lines +1226 to +1249
[[package]]
name = "futures-core"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"

[[package]]
name = "futures-task"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"

[[package]]
name = "futures-util"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
dependencies = [
"futures-core",
"futures-task",
"pin-project-lite",
"slab",
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here. These dependencies seem unnecessary in Ruff's context. Is there a way to disable a feature flag to remove the dependency?

Cargo.lock Outdated
[[package]]
name = "inotify"
version = "0.11.0"
version = "0.11.1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you revert your changes and start with a "clean" Cargo.lock. Many of the dependency upgrades seem unrelated to replacing the dependency

Cargo.lock Outdated
checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9"
dependencies = [
"cfg-if",
"futures-util",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is where the problematic dependencies come from. Might be worth checking if js-sys has a feature flag to disable the future stuff

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Apr 1, 2026
@ShaharNaveh
Copy link
Copy Markdown
Contributor Author

Thank you. This makes sense. But we should revert the unrelated dependency version bumps. We intentionally only depend on dependencies that are at least 7 days old and it seems this PR bumps some of them.

Sure! I had to regenerate the lock file for some reason, that's why the large change to Cargo.lock. I'll try to make it smaller somehow

@MichaReiser
Copy link
Copy Markdown
Member

Restoring the lock file and then running cargo build should probably do the trick.

@MichaReiser MichaReiser enabled auto-merge (squash) April 2, 2026 12:21
@MichaReiser MichaReiser merged commit b03dc78 into astral-sh:main Apr 2, 2026
50 checks passed
carljm added a commit that referenced this pull request Apr 2, 2026
* main:
  Add a "release-gate" step to the release workflow (#24365)
  Disallow starred expressions as values of starred expressions (#24280)
  [`pyupgrade`] Ignore strings with string-only escapes (`UP012`) (#16058)
  [ty] Improve consistency and quality of diagnostics relating to invalid type forms (#24325)
  [flake8-type-checking] Clarify import cycle wording for TC001/TC002/TC003 (#24322)
  [`flake8-errmsg`] Avoid shadowing existing `msg` in fix for `EM101` (#24363)
  `RUF072`: skip formfeeds on dedent (#24308)
  Replace unmaintained `unic-ucd-category` crate with `icu_properties` (#24344)
  [ty] Replace markdown hard line breaks in snapshot tests (#24361)
  [ty] Move snapshot for code action test with trailing whitespace to external file (#24359)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants