Title: nameparser 2.0: a new core API, with full compatibility through 2.x — direction and feedback · Issue #284 · derek73/python-nameparser · GitHub
Open Graph Title: nameparser 2.0: a new core API, with full compatibility through 2.x — direction and feedback · Issue #284 · derek73/python-nameparser
X Title: nameparser 2.0: a new core API, with full compatibility through 2.x — direction and feedback · Issue #284 · derek73/python-nameparser
Description: nameparser 2.0 is in design. This issue is the front door: the short version, links to the full design, and the specific feedback that would help most. There is no deadline — comment whenever; implementation will proceed in parallel and ...
Open Graph Description: nameparser 2.0 is in design. This issue is the front door: the short version, links to the full design, and the specific feedback that would help most. There is no deadline — comment whenever; impl...
X Description: nameparser 2.0 is in design. This issue is the front door: the short version, links to the full design, and the specific feedback that would help most. There is no deadline — comment whenever; impl...
Opengraph URL: https://github.com/derek73/python-nameparser/issues/284
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"nameparser 2.0: a new core API, with full compatibility through 2.x — direction and feedback","articleBody":"nameparser 2.0 is in design. This issue is the front door: the short version, links to the full design, and the specific feedback that would help most. There is no deadline — comment whenever; implementation will proceed in parallel and alphas will be announced here.\n\n## The promise\n\n**Code that runs warning-free on 1.4 keeps running on every 2.x release with identical results**, getting at most `DeprecationWarning`s. `HumanName` continues to work as a compatibility layer. The old API is removed in 3.0, not 2.x, and only after every removal has warned first. If you use `HumanName` and don't customize configuration, 2.0 should be a non-event.\n\n## What's new\n\nA second, immutable API alongside `HumanName`:\n\n```python\nfrom nameparser import parse\n\nname = parse(\"Dr. Juan Q. Xavier de la Vega III\")\nname.given # \"Juan\" (the new API says given/family, not first/last)\nname.family # \"de la Vega\"\nname.family_base # \"Vega\"\n```\n\n- `parse()` returns a frozen value object; no mutable state anywhere in the new API\n- configuration becomes immutable `Lexicon` (vocabulary) + `Policy` (behavior) objects you build at startup — no more mutating shared `CONSTANTS` (which keeps working through 2.x, with a warning)\n- family-first name order (`Policy(name_order=FAMILY_FIRST)`) and opt-in locale packs (`RU`, `TR_AZ` at 2.0.0; zh/ko/vi/ja staged)\n- genuinely ambiguous parses are *reported* (`name.ambiguities`) instead of silently guessed\n- still deterministic, rules-based, zero dependencies; Python ≥ 3.11\n\n## Read and comment\n\n- **The full RFC: #285** — line comments welcome there; it covers the API, migration mechanics, timeline, and rejected alternatives\n- **[Milestone v2.0](https://github.com/derek73/python-nameparser/milestone/35)** — the tracked removals and changes\n\n## Feedback that would help most\n\n1. Do you compare `HumanName` objects with `==` (especially against strings), or use them in sets/dicts? (2.0 changes this to object identity — warned since 1.3.0; `matches()`/`comparison_key()` are the replacements. The one silent behavior change.)\n2. Do you subclass `HumanName` and override parsing methods? Tell us what the override does — we'd rather absorb it as a feature than break it silently (#280).\n3. Do you mutate `CONSTANTS` after startup, not just at import time?\n4. Do you assign custom regexes to `CONSTANTS.regexes`? What for?\n5. `given`/`family` instead of `first`/`last` in the new API — help or annoy?\n6. Do you build anything on top of nameparser where the promise above would still break you?\n","author":{"url":"https://github.com/derek73","@type":"Person","name":"derek73"},"datePublished":"2026-07-12T03:47:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/284/python-nameparser/issues/284"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a8ef7e2b-4111-50f2-1640-093a3bce8700 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9786:249D7F:246865:3412EF:6A549488 |
| html-safe-nonce | c7da320a22fe8ea495ebd2aa8851521dc64d7e3702ae8a555b0f96e5f73ab1e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Nzg2OjI0OUQ3RjoyNDY4NjU6MzQxMkVGOjZBNTQ5NDg4IiwidmlzaXRvcl9pZCI6IjU1NTk2NTQxNzY1MzQwNzQ1MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0575546cefe09a9c7c3ae1b564bd655b59b6da85ba809ead9365d888652eee24 |
| hovercard-subject-tag | issue:4865291246 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/derek73/python-nameparser/284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9dbda5abd88281bd908a761ccddf38c2cc10b9e952e230cd0790fb21c78dc524/derek73/python-nameparser/issues/284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9dbda5abd88281bd908a761ccddf38c2cc10b9e952e230cd0790fb21c78dc524/derek73/python-nameparser/issues/284 |
| og:image:alt | nameparser 2.0 is in design. This issue is the front door: the short version, links to the full design, and the specific feedback that would help most. There is no deadline — comment whenever; impl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | derek73 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/derek73/python-nameparser git https://github.com/derek73/python-nameparser.git |
| octolytics-dimension-user_id | 18306 |
| octolytics-dimension-user_login | derek73 |
| octolytics-dimension-repository_id | 18353524 |
| octolytics-dimension-repository_nwo | derek73/python-nameparser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18353524 |
| octolytics-dimension-repository_network_root_nwo | derek73/python-nameparser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width