Skip to content

Bump nameparser from 2.1.0 to 2.2.0 - #480

Merged
Evan-CTL merged 1 commit into
mainfrom
dependabot/pip/nameparser-2.2.0
Sep 4, 2026
Merged

Bump nameparser from 2.1.0 to 2.2.0#480
Evan-CTL merged 1 commit into
mainfrom
dependabot/pip/nameparser-2.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 4, 2026

Copy link
Copy Markdown
Contributor

Bumps nameparser from 2.1.0 to 2.2.0.

Release notes

Sourced from nameparser's releases.

v2.2.0

A rename plus about thirty parsing fixes.

The nameparser.config word lists are renamed to match the Lexicon they feed — PREFIXESPARTICLES, BOUND_FIRST_NAMESBOUND_GIVEN_NAMES, FIRST_NAME_TITLESGIVEN_NAME_TITLES, SUFFIX_NOT_ACRONYMSSUFFIX_WORDS, and NON_FIRST_NAME_PREFIXESNON_GIVEN_NAME_PARTICLES — and are now frozen. Every 1.x name still imports with a DeprecationWarning until 3.0. The rename itself changes no parse.

The fixes cluster around surname particles, largely what a declared name_order means for Latin-script names; then maiden-name clauses, Arabic bound given names, and credentials after a comma.

Breaking: TITLES.add("dean") now raises AttributeError. Build a private Constants (c = Constants(); c.titles.add("dean"); HumanName(name, constants=c)) or a Lexicon (Parser(lexicon=Lexicon.default().add(titles={"dean"}))) instead. See the migration guide.

Full release notes: https://nameparser.readthedocs.io/en/latest/release_log.html

Changelog

Sourced from nameparser's changelog.

  • 2.2.0 - August 31, 2026

    nameparser 2.2 is a rename plus about thirty parsing fixes.

    The nameparser.config word lists were still named for v1's fields — PREFIXES, BOUND_FIRST_NAMES, FIRST_NAME_TITLES — while the Lexicon they feed has used particles and given names since 2.0. They now agree, and the lists are frozen, which retires editing one in place as a way to change a default. The rename itself changes no parse.

    The fixes cluster around surname particles, largely what a declared name_order means for Latin-script names, which this release settles; then maiden-name clauses, Arabic bound given names, and credentials after a comma. Most reach the default name order, and a bullet says so where its change is family-first only. Each names the shapes it moves, and the issue it closes carries the measurement.

    What breaks is code that writes to a default word list. Code that imports one by its 1.x name has until 3.0.

    Breaking Changes

    • Add docs/design/ contributor documentation: rules.md (the parser's normative rules, with executable examples), decisions.md (the decision record) and mechanisms.md (the solution-pattern catalog). New tests execute every documented example and verify every code citation
    • Change every vocabulary set in nameparser.config to a frozenset. Editing one in place -- TITLES.add("dean"), the old way of changing a global default -- now raises AttributeError at the line that writes it. To change the defaults for HumanName, build a private Constants and pass it (c = Constants(); c.titles.add("dean"); HumanName(name, constants=c)); for the 2.0 API, build a lexicon (Parser(lexicon=Lexicon.default().add(titles={"dean"}))). Mutating the shared CONSTANTS still works, but warns and goes away in 3.0. CAPITALIZATION_EXCEPTIONS is a mapping, not a set, and is unchanged. See :doc:migrate and :doc:customize (#293)

    Behavior Changes

    • Fix a title changing how the name behind it is read. "Dr. Van Johnson" gave family Van Johnson with no given name, and "Sir Van Johnson" gave given Van Johnson with no family at all; both now read given Van, family Johnson -- the reading the untitled "Van Johnson" has always had. A leading word that is both a title and a particle is unchanged: "St John Smith", "Do John Smith" and "Freiherr von Richthofen" keep their readings. See the P2 entry of docs/design/decisions.md (closes #367)

    • Fix a given-name title keeping a bound given name from joining the word after it. "Sheik abdul salam" read given abdul, family salam, and now reads given abdul salam with an empty family, as "Sir John" does; "الشيخ عبد الله" reads given عبد الله. A title that addresses by family is unchanged ("Dr. abdul salam"). This also restores "Sheik Abu Bakar" to given Abu Bakar, which the fix above had regressed, and drops the PARTICLE_OR_GIVEN ambiguity that name reported through 2.1 (closes #369)

    • Fix a bound given name swallowing the family name before a single-letter generational suffix. "abdul Smith V" read given abdul Smith with no family, where "abdul Smith II" and "abdul Smith Jr" read correctly; it now reads given abdul, family Smith, suffix V, and so do I and X, for every bound given-name word. A suffix word before the numeral no longer hides it ("abdul Smith Jr V" reads family Smith). Shipped since 1.x: 1.4.0 read first abdul Smith, last V (closes #401)

    • Fix a bound given name joining a suffix as "the word after it". "abdul Jr Smith Berg" read given abdul Jr and now reads given abdul, middle Jr Smith, where "John Jr Smith Berg" puts it. Where the suffix was a split credential the bound word joined into it -- "abdul Ph. D. Smith Berg" read suffix abdul Ph. D., a 2.0 regression -- and now reads given abdul, middle Smith, suffix Ph. D. (closes #421)

    • Fix a bound given name joining past a credential that the suffix rule then takes, leaving no family. "abdul Smith Jr Ma" read given abdul Smith with no family and now reads family Smith, suffix Jr, Ma, as "John Smith Jr Ma" does; "abdul Smith Ma" reads family Smith, suffix Ma. Both as 1.4.0 read them. "abdul Smith Berg Ma" keeps its join, and "Berg, abdul Sir" still reads given abdul Sir (closes #425)

    • Remove the Czech/Slovak abbreviation roz. from the default maiden markers. Marker matching is case-folded and period-insensitive, so Roz -- the diminutive of Rosalind -- was the same string as the marker, and a marker takes every word after it: "Rosalind Roz Smith" read maiden Smith with no family name at all. It and "Rosalind Roz Jones Smith" now read as 1.4.0 read them. The full participle is untouched -- "Anna Nováková rozená Svobodová" still reads maiden Svobodová -- and a caller who wants the abbreviation back adds it to their own lexicon: Parser(lexicon=Lexicon.default().add(maiden_markers={"roz"})) (found in #335's review)

    • Add the Polish maiden marker z domu to the default vocabulary, and let a maiden_markers entry be more than one word. "Maria Kowalska z domu Nowak" now reads family Kowalska, maiden Nowak, where every earlier version read the marker as part of the name (1.4.0: middle Kowalska z domu, family Nowak). The bracketed spelling moves with it. maiden_markers and given_name_titles are now the two fields exempt from the multi-word warning. See :doc:customize (#434)

    • Fix a bracketed maiden clause reading as a nickname because its brackets were not declared. "Jane Smith nee Jones" gave maiden Jones while "Jane Smith (née Jones)" gave nickname née Jones; the bracketed spelling now reads family Smith, maiden Jones too, and so does the Japanese "山田 花子(旧姓 佐藤)", which needed Policy(maiden_delimiters=...) through 2.1. Every delimiter pair the parser ships moves the same way, quotes included. An interior clause no longer eats the name behind it ("Jane (née Jones) Smith" keeps family Smith), and two clauses beside each other each keep their own role ("Jane "Janey" Smith (née Jones)" reads nickname Janey, maiden Jones). A clause with no marker in it is still a nickname, which is what Policy(maiden_delimiters=...) remains for. This reaches HumanName (closes #335)

    • Fix a particle chain and a maiden name taking a trailing generational numeral as a name word. "John van der Berg V" read family van der Berg V and "John née Jones Smith V" read maiden Jones Smith V, where "John Smith V" reads suffix V; both now stop before the numeral, for I and X alike. A word before the numeral that is an initial keeps its reading ("John van der J. V"). The chain also stops before a bare credential with words to spare -- "John van der Berg Ma" reads suffix Ma, as 1.4.0 did -- and no longer swallows the given name behind an unlisted abbreviation: "Xyz. van Johnson" and "Esq. van Gogh" read given van (closes #424)

    • Fix a name losing its given/family split when a comma is followed only by an honorific. "John Smith, Mr." returned the whole of "John Smith" as the family name and now gives given John, family Smith, title Mr.: it is "Mr. John Smith" with the honorific moved to the end, and marks no surname boundary. A comma followed by an actual name still fixes the family ("John Smith, Jones"), and a single pre-comma piece has no split to keep ("Smith, Dr." is unchanged). The pre-comma name now also picks up the declared name order -- "de Mesnil Jean, Dr." keeps family de Mesnil under a family-first order -- and the particle-or-given ambiguity report ("Van Johnson, Mr.")

    • Fix pure postnominals being claimed as titles: jr, junior, phd, do and se have left the default titles vocabulary, and dr/sra have left the suffix vocabulary they never belonged in, so "Smith, PhD" gives suffix rather than title PhD. Twelve words are genuine duals and keep both memberships, with position deciding -- "Lt. Smith" is a title, "Smith, LT" a postnominal, bare Md before a name the Bengali and South Asian abbreviation of Muhammad, MD after it the degree. The cost is in leading position, where a dropped word now reads as a name: "PhD Smith" gives given PhD, which is what makes "Do Nguyen" parse as the Vietnamese name it is. dr and sra also stop being recognized in trailing position, so "John Smith Dr." gives family Dr.. An ambiguous credential acronym (ma, ed, jd, do) counts as a suffix only when written with its periods, so "Jack Ma." keeps family Ma. as 1.4.0 read it. Routing a trailing title word to title is a separate open question (#316)

... (truncated)

Commits
  • e52aeaa Release 2.2.0
  • 1ca20a6 docs,tests(examples): a French given name on the French surname
  • 3454353 docs(customize): what declaring a name_order settles for Latin scripts
  • 6f9159d Merge pull request #477 from derek73/claude/v2-2-0-release-finalization-de07b4
  • fe1bccb docs(release_log): say what the release is, plainly
  • c4924d4 docs(release_log,tests): a real name for the #458 example
  • 02dd54b docs(release_log): cut the noise from the 2.2 bullets
  • 8a90436 docs(release_log): don't cut a bold lead at an abbreviation's period
  • 1c32a84 docs(release_log): a bold lead sentence on every substantial bullet
  • 69434a4 docs(release_log): the star-import change is not a breaking change
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [nameparser](https://github.com/derek73/python-nameparser) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/derek73/python-nameparser/releases)
- [Changelog](https://github.com/derek73/python-nameparser/blob/master/docs/release_log.rst)
- [Commits](derek73/python-nameparser@v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: nameparser
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Sep 4, 2026
@Evan-CTL
Evan-CTL merged commit fd38e83 into main Sep 4, 2026
1 check passed
@Evan-CTL
Evan-CTL deleted the dependabot/pip/nameparser-2.2.0 branch September 4, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant