Skip to content

v2.8.1

Choose a tag to compare

@derek73 derek73 released this 03 Nov 04:32
· 2 commits to 2.x since this release
80b551b

nameparser 2.8.1 adds warnings for three 3.0 changes 2.8.0 did not announce: writing a Lexicon set field, reading a vocabulary constant in nameparser.config, and reading nameparser.config.regexes. Reading a Lexicon field (lexicon.titles) does not warn, though 3.0 refuses that too. Code that runs with warnings as errors (-W error, or pytest's filterwarnings = error) will fail where it does any of the three.

Deprecations

  • Deprecate configuring Lexicon through its set fields, which 3.0 makes internal. Lexicon.default().add(titles={"dean"}) now emits a DeprecationWarning naming the field and the migration guide's row for it; 3.0 refuses the call with a TypeError naming the readings that replace it. remove(), Lexicon(...) and dataclasses.replace() with a set field warn too, and add() or remove() with surnames. #754
  • Deprecate the vocabulary constants in nameparser.config, which 3.0 removes. from nameparser.config.titles import TITLES now emits a DeprecationWarning naming Lexicon.default().words(kind="title"), which lists every title in 3.0. nameparser.config.surnames stays. #1007
  • Deprecate nameparser.config.regexes, which 3.0 removes without a replacement. Reading REGEXES now emits a DeprecationWarning; the parser has not read it since 2.0. #1008

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