Repository navigation
Make nameparser.config.surnames private as config/_ko_surnames.py - #1077
Merged
Merged
Conversation
The Korean census list moves with git mv to nameparser/config/_ko_surnames.py, keeping KOREAN_SURNAMES, so nameparser.config holds no public module and the public import surface is nameparser and nameparser.locales. The words stay public as Lexicon.default().surnames; 2.8.2 warns of the move (#1076). The list stays in config/ because the default lexicon reads it and _lexicon may not import locales/; _ko_ follows vocab/ko.toml's tag. test_layering refuses a public module in nameparser/config/, and migrate's constant table gains a KOREAN_SURNAMES row that test_lexicon runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…decision is Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…surnames # Conflicts: # AGENTS.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3.0 renames
nameparser/config/surnames.pytonameparser/config/_ko_surnames.py(git mv, keepingKOREAN_SURNAMES). After this,nameparser.confighas no public module, and the public import surface isnameparserandnameparser.locales. The words stay public asLexicon.default().surnames, a field 4i-b kept public. #1076 warns of the move in 2.8.2.from nameparser.config.surnames import KOREAN_SURNAMESraisesModuleNotFoundError. 2.1.0 through 2.8.2 imported it.Why
config/and why_ko_._lexiconmay not importlocales/, the layer above it. The lists only a pack reads (locales/_es_given_names.py,_es_ar_given_names.py) stay beside their packs._ko_follows the BCP 47 tag naming ofvocab/ko.toml.Code and tests
_lexicon.pyimports the new module.config/__init__.pyand_invariants.py: docstrings updated.tests/v2/test_layering.py: the module joins the gone-modules list, and a new test refuses any public module innameparser/config/.tests/v2/test_contracts.py: the frozen-constant sweep and the guarded-module roster read the private module. The quiet-import row now readsLexicon.default().surnames. The star-import test of the public module is dropped, since no public module is left.docs/migrate.rst's constant table gains aKOREAN_SURNAMES→d.surnamesrow.test_lexicon.py's table test now runs that row against the list too.Docs
customize.rst,migrate.rst(two places, plus the row),locales.rst,usage.rst, andmodules.rst(automodule dropped).release_log.rst: a 3.0 Remove bullet citing the 2.8.2 warning. The unreleased 3.0 vocabulary-modules bullet drops its "stays".AGENTS.md: the import surface, the vocabulary list and the layering line.nameparser/vocab/README.md: the line that also said the packs "move here in phase 3", which phase 3 did, is rewritten.decisions/3-0-reevaluations. It supersedes the "stays" part of the 2026-11-02 Shouldfrom nameparser.config.titles import TITLESstill work in 3.0, now thatLexicon.readings_of()answers what a word is? #1007 entry, and its Standing line is updated.Checks: the suite (3.11 and 3.15), mypy, ruff,
sphinx-build -b doctestand-b html, andpython -m doctest README.rstall pass.Follow-up: master's release log should gain the 2.8.2 entry once 2.8.2 ships, as 2.8.1's did.
🤖 Generated with Claude Code