Skip to content

RFC: nameparser 2.0 — a new core API#285

Merged
derek73 merged 2 commits into
masterfrom
rfc/nameparser-2.0
Jul 24, 2026
Merged

RFC: nameparser 2.0 — a new core API#285
derek73 merged 2 commits into
masterfrom
rfc/nameparser-2.0

Conversation

@derek73

@derek73 derek73 commented Jul 12, 2026

Copy link
Copy Markdown
Owner

TL;DR: if you only use HumanName and never customize configuration, 2.0 should be a non-event for you — but it's cool and we'd love your feedback anyway.

This PR adds a design document: docs/design/nameparser-2.0-rfc.md, the RFC for nameparser 2.0 — a new immutable core API (parse()ParsedName, Lexicon/Policy configuration) alongside HumanName, which continues to work as a compatibility layer through all of 2.x.

This PR is documentation-only and will stay that way. Implementation happens on separate branches with their own PRs; what lands here are amendments to the design as implementation and feedback teach us things.

How to review:

There is no comment deadline. The PR stays open while the design settles; merging it marks the design stable (likely around the first 2.0 alpha) and keeps the document in docs/design/ as the standing record. The design may change in response to comments right up to that point — that's what this is for.

🤖 Generated with Claude Code

The design document for 2.0: a new immutable core API (parse() ->
ParsedName, Lexicon/Policy configuration) alongside HumanName as a
compatibility layer through 2.x. Covers the compatibility promise, the
new API, migration mechanics, locale plans, rejected alternatives, and
the feedback questions. Discussion: #284.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@derek73 derek73 self-assigned this Jul 12, 2026
@derek73 derek73 added the docs Documentation fixes and updates label Jul 12, 2026
@derek73 derek73 added this to the v2.0 milestone Jul 12, 2026
derek73 added a commit that referenced this pull request Jul 12, 2026
Points readers at the RFC PR (#285) and the pinned discussion
issue (#284).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository owner deleted a comment from codecov-commenter Jul 12, 2026
@derek73 derek73 mentioned this pull request Jul 12, 2026
6 tasks
derek73 added a commit that referenced this pull request Jul 24, 2026
2.0.0rc1 shipped to PyPI, so "2.0 is in design" is stale. Point the
notice at the release candidate: pip install --pre nameparser (a plain
install still gets 1.x) and the version-pinned 2.0 docs. Dropped the
design-RFC link (#285) since the design is now running code; kept the
#284 feedback issue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@derek73

derek73 commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

Implemented and shipped as 2.0.0rc1pip install --pre nameparser. The design in this RFC is now the running code; see #288 for the implementation and #284 for feedback.

Two reconciliations before merging the RFC as the standing design
record. The design did not drift -- it grew after this doc froze on
2026-07-11 -- so nothing here contradicted the release; it was missing
a field and carried an illustrative string that never matched output.

- Add the `maiden` field (#274), decided after the RFC was written: a
  birth surname introduced by a marker like née/geb. that v1 folded
  into middle/last. It is the one user-facing 2.0 field the document
  omitted.
- Fix the ambiguity example's detail text to the actual shipped string
  ("leading 'Van' may be a family-name particle; read as a given
  name"). Detail text is not stable API, but an example that does not
  reproduce is a wart in a standing record.

Verified every other code example in the RFC runs verbatim against
2.0.0rc1 -- replace(), the Token repr, the FAMILY_FIRST example, the RU
locale, and the "not in 2.0" claim for parse_all()/explain().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@derek73
derek73 merged commit 5e08f54 into master Jul 24, 2026
8 checks passed
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.67%. Comparing base (8f570ce) to head (6d7270e).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #285      +/-   ##
==========================================
- Coverage   97.70%   97.67%   -0.04%     
==========================================
  Files          13       13              
  Lines         917      947      +30     
==========================================
+ Hits          896      925      +29     
- Misses         21       22       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73
derek73 deleted the rfc/nameparser-2.0 branch July 24, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant