Skip to content
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

Unicode 16.0 #60

Merged
merged 7 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* This library is being maintained by the team at [NameHash Labs](https://namehashlabs.org) as part of the greater [NameGuard](https://nameguard.io) solution to help protect the ENS community.
* Passes **100%** of the [official validation tests](https://github.com/adraffy/ens-normalize.js/tree/main/validate) (validated automatically with pytest on Linux, MacOS, and Windows, see below for details).
* Passes an [additional suite of further tests](/tools/updater/update-ens.js#L54) for compatibility with the official [Javascript reference implementation](https://github.com/adraffy/ens-normalize.js) and code testing coverage.
* Based on [JavaScript implementation version 1.9.0](https://github.com/adraffy/ens-normalize.js/tree/4873fbe6393e970e186ab57860cc59cbbb1fa162).
* Original implementation based on [JavaScript implementation version 1.9.0](https://github.com/adraffy/ens-normalize.js/tree/4873fbe6393e970e186ab57860cc59cbbb1fa162).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Original implementation based on [JavaScript implementation version 1.9.0](https://github.com/adraffy/ens-normalize.js/tree/4873fbe6393e970e186ab57860cc59cbbb1fa162).
* Supports updates to the ENS Normalize reference implementation for Unicode 16.0.

Spent some time thinking about this line. I think it's best we just fully remove the old idea / bullet point here. I agree it made since when we first released this library, but we already are making reference to Raffy's JS implementation up above and no benefit for anyone if we go into this detail here.

Alternatively, I think it's now useful to make a note here to identify which Unicode version we've updated this library to support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lightwalker-eth I like the idea of mentioning unicode support. But what do you mean by "supports updates"?
Is it supposed to mean "Up-to-date with ENS Normalize reference implementation as of Unicode version 16.0"?
I'm happy to go with your version if you think it sounds ok.

Copy link
Member

Choose a reason for hiding this comment

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

@Carbon225 Good catch. My suggestion could have been more clear. I like the way you proposed writing it:

"Up-to-date with ENS Normalize reference implementation as of Unicode version 16.0."


## Glossary

Expand Down
Binary file modified ens_normalize/spec.pickle
Binary file not shown.
347 changes: 185 additions & 162 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ens-normalize"
version = "3.0.8"
version = "3.0.9"
description = "Ethereum Name Service (ENS) Name Normalizer"
license = "MIT"
authors = ["Jakub Karbowski <[email protected]>"]
Expand All @@ -12,7 +12,7 @@ packages = [{include = "ens_normalize"}]

[tool.poetry.dependencies]
python = "^3.8"
pyunormalize = "^15.1.0"
pyunormalize = "^16.0.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/ens-normalize-tests.json
lightwalker-eth marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tests/test_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ def test_error_meta():
e = ens_process('0x.0χ.0х').error
assert e.general_info == 'Contains visually confusing characters from Cyrillic and Latin scripts'


@pytest.mark.skip(reason='there are no such characters anymore')
def test_error_meta_other_scripts():
# unknown script for character
c = chr(771)
e: CurableSequence = ens_process(f'bitcoin.bitcin.bi̇tcin.bitсin{c}').error
Expand Down
14 changes: 7 additions & 7 deletions tools/updater/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/updater/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"start": "poetry run python update_ens.py"
},
"dependencies": {
"@adraffy/ens-normalize": "github:adraffy/ens-normalize.js#52ce1a2fb22b86416f23a481c956bc74368c35a7"
"@adraffy/ens-normalize": "github:adraffy/ens-normalize.js#21de1f60e93d6b5cd99e8f3402a2dd56a2b6883d"
}
}
2 changes: 1 addition & 1 deletion tools/updater/spec.json
lightwalker-eth marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Loading