Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Nov 12, 2025

The module currently only has a b64encode function adapted from CPython. It's only enabled when librt is compiled with experimental features enabled, so that we are free to iterate on this and break backward compatibility until we are ready to declare the module as stable.

This also adds a way to define experimental features in librt (and mypyc in general, but it's currently only used for librt).

In follow-up PRs I'm planning to add a more efficient implementation of b64encode and add more features to the module, including decoding. I'm not planning to include every feature from the stdlib base64 module, since many of them aren't used very widely.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 3d23716 into master Nov 13, 2025
21 checks passed
@JukkaL JukkaL deleted the mypyc-base64-0 branch November 13, 2025 13:14
@JukkaL
Copy link
Collaborator Author

JukkaL commented Nov 13, 2025

Related issue: mypyc/mypyc#1128 (this is the first functionality in librt that will be available as a public API)

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.

3 participants