You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/release_log.rst
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,52 @@
1
1
Release Log
2
2
===========
3
+
* 2.2.0 - Unreleased
4
+
5
+
nameparser 2.2 finishes the 2.0 rename at the layer it never
6
+
reached. The word lists in ``nameparser.config`` were still named
7
+
for v1's fields — prefixes, first names — while the
8
+
``Lexicon`` they feed has spoken of particles and given names since
9
+
2.0. They now agree. The lists are also frozen, which retires
10
+
editing one in place as a way to change a default and replaces it
11
+
with configuring a ``Lexicon`` or a private ``Constants``.
12
+
13
+
Nothing moved between vocabularies and no parse changes: over the
14
+
751 names of the differential corpora, every one of the seven
15
+
fields is identical to 2.1 through both the 2.0 and the 1.x API.
16
+
What breaks is code that *writes* to a default word list, and code
17
+
that imports one by its 1.x name has until 3.0.
18
+
19
+
**Breaking Changes**
20
+
21
+
- Change every vocabulary set in ``nameparser.config`` to a ``frozenset``: ``TITLES``, ``GIVEN_NAME_TITLES``, ``SUFFIX_WORDS``, ``SUFFIX_ACRONYMS``, ``SUFFIX_ACRONYMS_AMBIGUOUS``, ``GLUED_HONORIFICS``, ``PARTICLES``, ``NON_GIVEN_NAME_PARTICLES``, ``BOUND_GIVEN_NAMES``, ``CONJUNCTIONS`` and ``MAIDEN_MARKERS`` (``KOREAN_SURNAMES`` already was one). Editing one in place -- ``TITLES.add("dean")``, the old way of changing a global default -- now raises ``AttributeError: 'frozenset' object has no attribute 'add'`` at the line that writes it. It was never a reliable way to change a default: whether an edit reached a given parse depended on which config objects had already been built, so one program could hold two disagreeing defaults with nothing to say so. To change the defaults for ``HumanName``, build a private ``Constants`` and pass it (``c = Constants(); c.titles.add("dean"); HumanName(name, constants=c)``); mutating the shared ``CONSTANTS`` still works, but warns and goes away in 3.0. For the 2.0 API, build a lexicon and pass it to a parser (``Parser(lexicon=Lexicon.default().add(titles={"dean"}))``). Neither is affected by this change. ``CAPITALIZATION_EXCEPTIONS`` is a mapping, not a set, and is unchanged. See :doc:`migrate` and :doc:`customize` (#293)
22
+
23
+
**Deprecations**
24
+
25
+
- Rename the four vocabularies whose 1.x names described the fields they feed in v1's words, so the data layer matches the ``Lexicon``:
26
+
27
+
.. list-table::
28
+
:header-rows: 1
29
+
:widths: 50 50
30
+
31
+
* - 1.x name
32
+
- 2.2 name
33
+
* - ``nameparser.config.prefixes``
34
+
- :mod:`nameparser.config.particles`
35
+
* - ``prefixes.PREFIXES``
36
+
- ``particles.PARTICLES``
37
+
* - ``prefixes.NON_FIRST_NAME_PREFIXES``
38
+
- ``particles.NON_GIVEN_NAME_PARTICLES``
39
+
* - ``nameparser.config.bound_first_names``
40
+
- :mod:`nameparser.config.bound_given_names`
41
+
* - ``bound_first_names.BOUND_FIRST_NAMES``
42
+
- ``bound_given_names.BOUND_GIVEN_NAMES``
43
+
* - ``titles.FIRST_NAME_TITLES``
44
+
- ``titles.GIVEN_NAME_TITLES``
45
+
* - ``suffixes.SUFFIX_NOT_ACRONYMS``
46
+
- ``suffixes.SUFFIX_WORDS``
47
+
48
+
Every row above still resolves and is removed in 3.0. The two module rows are import paths: importing them still works and says nothing, since both modules are now empty shims. Reading a *constant* -- by attribute access, by ``from ... import``, or by ``from ... import *`` -- emits a ``DeprecationWarning`` naming the module and constant to move to, once per line that reads it rather than once per process, so every place you have to edit is reported rather than only whichever one ran first. ``python -W error::DeprecationWarning -c "import yourapp"`` surfaces them; Python hides ``DeprecationWarning`` outside ``__main__``. Two of the four kept their module, so only the constant moved there. ``SUFFIX_NOT_ACRONYMS`` was also inaccurate as well as dated — ``esq`` is in ``SUFFIX_ACRONYMS`` too. The ``CONSTANTS`` attribute names (``prefixes``, ``non_first_name_prefixes``, ``bound_first_names``, ``first_name_titles``, ``suffix_not_acronyms``) are v1 facade surface and are unchanged. See :doc:`migrate` (#293)
49
+
3
50
* 2.1.0 - August 7, 2026
4
51
5
52
nameparser 2.1 makes East Asian names work without configuration.
0 commit comments