Skip to content

Upgrade to 2.6.0, add IDNA functions to library #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 25, 2023
Merged

Conversation

bbayles
Copy link
Collaborator

@bbayles bbayles commented Jul 24, 2023

Closes #22

This PR upgrades ada to version 2.6.0.

ada-url/ada#457 added the ada_idna_to_unicode and ada_idna_to_ascii to the C API. This PR adds Python wrappers for them. Some notes:

  • Python users are familiar with this package, which provides idna.decode and idna.encode. I've exposed the functions under those name here.
  • That package accepts either str or bytes types; I've made the same choice here
  • That package emits str for the "to unicode" operation and bytes for the "to ASCII" operation; I've made the same choices here
  • The functions are also available under the names idna_to_ascii and idna_to_unicode

@anonrig
Copy link
Member

anonrig commented Jul 24, 2023

Amazing work as always @bbayles, and welcome to the parents club 💯🥇

@bbayles
Copy link
Collaborator Author

bbayles commented Jul 24, 2023

Fixed the docs in the latest commit - here is the rendered result:


image

@bbayles bbayles merged commit 7a871f4 into main Jul 25, 2023
@bbayles bbayles deleted the idna-methods branch July 25, 2023 13:56
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.

Upgrade to 2.6.0, add IDNA functions to library
2 participants