Skip to content

Releases: derek73/python-nameparser

v1.3.0

Choose a tag to compare

@derek73 derek73 released this 06 Jul 06:35
b7b728b

This release works through essentially the entire backlog of open issues — nearly every bug and feature request in the tracker, including several dating back to 2014. Alongside the fixes, it adds long-requested functionality: maiden name support, surname-prefix splitting, patronymic name ordering, and a set of new customization hooks on Constants.

The release was developed with Claude Code, and every fix and feature ships with regression tests. The complete list of changes is below.

This release is the bridge release ahead of 2.0: every planned 2.0 removal now has its replacement shipped and emits a DeprecationWarning naming it, so code can migrate while both APIs work. Full details in the release log.

Deprecations (removal in 2.0)

  • == and hash() on HumanName (#223) — the design's three promises (case-insensitive equality, equality with plain strings, hashability) are mutually inconsistent, equality depends on string_format, and maiden is invisible to it. Replacements, new in this release: matches() for semantic comparison (name.matches("Smith, John") and name.matches("John Smith") both match) and comparison_key() for sets, dicts, dedup, and sorting.
  • bytes input (#245) — decode first, e.g. value.decode('utf-8'); the encoding kwarg is deprecated with it.
  • SetManager.__call__ (#243) — iterate the manager or copy with set(manager).
  • SetManager.remove() of a missing member (#243) — will raise KeyError in 2.0 like set.remove; new discard() is the intentional ignore-missing spelling.

Breaking changes

  • HumanName is no longer its own iterator; iter(name) returns a fresh independent iterator (fixes state corruption from break/nested loops/len() mid-loop) (#225)
  • Vestigial unparsable attribute removed (unreachable since 2013; use len(name) == 0); __ne__ removed (derived from __eq__)
  • REGEXES and CAPITALIZATION_EXCEPTIONS are now dicts — iterate with .items() (#227, #233)
  • Internal __process_initial__ renamed _process_initial (dunder names are reserved)

Behavior changes affecting parse output (default-on)

  • Bound Arabic given-name prefixes (abdul, abu, …) join forward into the first name (#150); disable via CONSTANTS.bound_first_names.clear()
  • A leading unknown multi-letter period-abbreviation ("Major.") parses as a title (#109)
  • Parsing no longer mutates the shared CONSTANTS it reads — parse results no longer depend on what was parsed earlier in the process, and parsing is thread-safe against config writes

New

  • maiden field with maiden_delimiters routing (#22); given_names (#157); last_base/last_prefixes for surname particles (#130, #132)
  • patronymic_name_order for Russian and Turkic formal-order names (#85, #185); middle_name_as_last (#133); non_first_name_prefixes (#121); expanded international titles and prefixes (#18, #101, #187)
  • initials_separator (#171), suffix_delimiter (#156), nickname_delimiters (#110, #112), suffix_acronyms_ambiguous (#111)

Hardening & fixes

  • Config boundaries now fail loud instead of silently corrupting: bare strings no longer shred into characters (#238), assignment paths validate (#239, #241), TupleManager rejects malformed input (#242), membership checks normalize like every other operation (#244), Constants subclasses are respected (#226)
  • Customized Constants survive pickle/deepcopy (#167, #168, #169); many parsing fixes — suffix boundaries with prefixed last names (#100), repeated prefix chains (#208), degenerate comma input, roman-numeral and suffix recognition in comma formats (#136, #144), and more

v1.2.1

Choose a tag to compare

@derek73 derek73 released this 19 Jun 23:04

What's Changed

  • Fix initials() interpolating the literal None for empty name parts when empty_attribute_default = None (e.g. "J. None D."); empty parts now render as an empty string and a fully-empty result returns empty_attribute_default
  • Add python -m nameparser "Name String" command-line helper that prints a parsed name
  • Reorganize the test suite from a single tests.py into a tests/ pytest package

Full Changelog: v1.2.0...v1.2.1

v1.2.0

Choose a tag to compare

@derek73 derek73 released this 11 Jun 08:43

What's changed

  • Drop Python 2 and Python < 3.10 support; Python 3.10–3.14 now required
  • Add type hints and type declarations (PEP 561 py.typed marker)
  • Migrate build tooling to pyproject.toml, drop setup.py
  • Remove dead Python 2 compatibility shims (ENCODING constant, next() aliases)
  • Modernize CI: uv-based workflow, trusted publishing to PyPI, Dependabot

v1.1.3

Choose a tag to compare

@derek73 derek73 released this 21 Sep 00:11
  • Fix case when we have two same prefixes in the name (#147)

v1.1.2

Choose a tag to compare

@derek73 derek73 released this 14 Nov 03:04
  • Add support for attributes in constructor (#140)
  • Make HumanName instances hashable (#138)
  • Update repr for names with single quotes (#137)

v1.1.1

Choose a tag to compare

@derek73 derek73 released this 29 Jan 02:28
  • Fix bug in is_suffix() handling of lists (#129)

v1.1.0

Choose a tag to compare

@derek73 derek73 released this 04 Jan 04:30

v1.0.6

Choose a tag to compare

@derek73 derek73 released this 08 Feb 21:44
  • Fix Python 3.8 syntax error warning (#104)

v1.0.5

Choose a tag to compare

@derek73 derek73 released this 12 Dec 05:14
  • Fix suffix parsing bug in comma parts (#98)
  • Fix deprecation warning on Python 3.7 (#94)
  • Improved capitalization support of mixed case names (#90)
  • Remove "elder" from titles (#96)
  • Add post-nominal list from Wikipedia to suffixes (#93)

v1.0.4

Choose a tag to compare

@derek73 derek73 released this 27 Jun 01:42
  • Better nickname handling of multiple single quotes (#86)
  • full_name attribute now returns formatted string output instead of original string (#87)