샘플
idna 3.11: uts46_remap
검증된 샘플 — pypi idna 3.11: uts46_remap. python 3.12 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다: uts46_remap normalizes domain names with case folding…
sha256:be998ed4d06c8c4224bc4104afacbb568718f9e4ac4d7fb654c18228319bf69f
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 2
- 빌드한 서명 키
- 1
선언된 환경
python 3.12 linux 24 · ubuntu · glibc 2.39 x64 python 3.12 python pip
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962… |
2026-08-26 |
| python 3.12 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1python:3.12-slim@sha256:09f7da3bc104… |
2026-09-07 |
케이스
HOW- 목표
- verify idna.uts46_remap in pkg:pypi/idna@3.11
- 패키지
- 심벌
-
- idna.uts46_remap
- 환경
- python 3.12
- 생성일
- 2026-08-26T04:39:18Z
컨트랙트
- uts46_remap normalizes domain names with case folding and NFC normalization
- uts46_remap maps fullwidth and ideographic label separators to ASCII dots
- uts46_remap removes characters with status I (ignored) such as zero-width spaces
- uts46_remap preserves deviation characters when transitional=False and replaces them when transitional=True
- uts46_remap raises InvalidCodepoint for disallowed UTS46 codepoints
파일
- NOTES.md
- PROMPT.md
- csx.json
- requirements.txt
- spec.json
- test/contract.py
소스
# idna: UTS46 Domain Remapping (idna.uts46_remap)
## Prior Network Solutions
The network query for `verify idna.uts46_remap in pkg:pypi/idna@3.11` returned NO_SAFE_MATCH.
## Release Pinned
- `idna`: 3.11
## Observed Behaviour
In `idna` 3.11:
1. `uts46_remap` normalizes domain strings with Unicode case folding and NFC normalization (e.g. `EXAMPLE.COM` -> `example.com`, `KÖLN.DE` -> `köln.de`).
2. Label separators such as fullwidth dots (`\u3002`, `\uff0e`) are remapped to standard ASCII dots (`.`).
3. Ignored characters (UTS#46 status 'I', e.g. Zero-Width Space `\u200b`) are stripped from output.
4. Deviation characters (UTS#46 status 'D', e.g. German Eszett `ß` `\u00df` and Greek final sigma `ς` `\u03c2`) are preserved when `transitional=False` and mapped to replacement sequences (`ss`, `σ`) when `transitional=True`.
5. Disallowed characters (UTS#46 status 'X', e.g. `\x80`, `\u200e`) raise `idna.InvalidCodepoint`.
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify idna.uts46_remap in pkg:pypi/idna@3.11
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:pypi/idna@3.11
Demonstrate these symbols/APIs:
- idna.uts46_remap
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:4407aa747fa3bf4295563e57196d521525b774cabf3e7f247b4b237e04826197","contract":["uts46_remap normalizes domain names with case folding and NFC normalization","uts46_remap maps fullwidth and ideographic label separators to ASCII dots","uts46_remap removes characters with status I (ignored) such as zero-width spaces","uts46_remap preserves deviation characters when transitional=False and replaces them when transitional=True","uts46_remap raises InvalidCodepoint for disallowed UTS46 codepoints"],"goal":"verify idna.uts46_remap in pkg:pypi/idna@3.11","kind":"HOW","packages":["pkg:pypi/idna@3.11"],"schemaVersion":1,"symbols":["idna.uts46_remap"]},"contractCommand":["python","test/contract.py"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"pypi","executionContext":"python","language":"python","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"pip","runtime":"python","runtimeVersion":"3.12","schemaVersion":1},"license":"MIT-0","packages":["pkg:pypi/idna@3.11"],"schemaVersion":1,"subject":"pkg:pypi/idna@3.11","symbols":["idna.uts46_remap"],"verifierAdapter":"python@1"}
idna==3.11
{
"schemaVersion": 1,
"goal": "verify idna.uts46_remap in pkg:pypi/idna@3.11",
"kind": "HOW",
"packages": [
"pkg:pypi/idna@3.11"
],
"symbols": [
"idna.uts46_remap"
]
}
import idna
def main() -> None:
# 1. Unicode case folding and normalization (NFC)
assert idna.uts46_remap("EXAMPLE.COM") == "example.com"
assert idna.uts46_remap("KÖLN.DE") == "köln.de"
# 2. Remapping label separators to ASCII dot
assert idna.uts46_remap("example\u3002com") == "example.com"
assert idna.uts46_remap("example\uff0ecom") == "example.com"
# 3. Ignored characters (status 'I') such as Zero-Width Space are deleted
assert idna.uts46_remap("sub\u200bdomain.example.com") == "subdomain.example.com"
# 4. Deviation characters (status 'D') with transitional flag
# German Eszett 'ß' (U+00DF): preserved when transitional=False, mapped to 'ss' when transitional=True
assert idna.uts46_remap("faß.de", transitional=False) == "faß.de"
assert idna.uts46_remap("faß.de", transitional=True) == "fass.de"
# Greek final sigma 'ς' (U+03C2): preserved when transitional=False, mapped to small sigma 'σ' when transitional=True
assert idna.uts46_remap("βόλος.com", transitional=False) == "βόλος.com"
assert idna.uts46_remap("βόλος.com", transitional=True) == "βόλοσ.com"
# 5. Disallowed codepoints raise idna.InvalidCodepoint
for invalid_char in ["\x80", "\u200e", "\u202e"]:
try:
idna.uts46_remap(f"bad{invalid_char}.example.com")
raise AssertionError(f"Expected InvalidCodepoint for codepoint {hex(ord(invalid_char))}")
except idna.InvalidCodepoint as exc:
assert f"Codepoint U+{ord(invalid_char):04X}" in str(exc)
if __name__ == "__main__":
main()
오리진 시더
익명