- Add
Constants.copy(), a detached deep copy that preserves the source instance's current customizations (unlikeConstants(), which always starts from library defaults) -- useful asCONSTANTS.copy()for a private snapshot of the shared config (#260) - Deprecate passing
constants=NonetoHumanName(or assigninghn.C = None): it silently builds a freshConstants(), discarding any customizations the caller may have expected to carry over from the sharedCONSTANTS. EmitsDeprecationWarning; will raiseTypeErrorin 2.0. Useconstants=Constants()for fresh library defaults orconstants=CONSTANTS.copy()for a private snapshot instead (closes #260) - Deprecate assigning
Constants.empty_attribute_defaultfor removal in 2.0 (#255): onceNonesupport goes, the only legal value left is the default'', so a dial with one position isn't configuration. EmitsDeprecationWarning; reading the attribute is unaffected - Deprecate unknown-key attribute access on
TupleManager/RegexTupleManager(CONSTANTS.regexes.typo,CONSTANTS.capitalization_exceptions.typo, etc.) for removal in 2.0 (#256): a misspelled or omitted key currently degrades silently (None/EMPTY_REGEX) with no traceback pointing at the typo. EmitsDeprecationWarningnaming the miss and the known keys; will raiseAttributeErrorin 2.0..get()remains available for intentional soft access - Deprecate
HumanNameslice access (name[1:-3]) and item assignment (name['first'] = value) for removal in 2.0 (#258): field access by position has no real use case, and item assignment duplicates plain attribute assignment. Both emitDeprecationWarning; string-key access (name['first']) is unaffected - Deprecate
SetManager.add_with_encoding()itself for removal in 2.0 (#245), regardless of argument type: useadd()instead (decoding bytes first). Previously only thebytespath warned; thestrpath was silent even though the whole method goes away - Deprecate loading a legacy-format
Constantspickle (written by nameparser <= 1.2.x, before the 1.3.0 pickle fix) for removal in 2.0 (#279):__setstate__'s migration shim currently skips the stale computed-property key silently. EmitsDeprecationWarningonce per call telling users to re-pickle; will raiseValueErrorin 2.0 - Fix the
"Lastname, Firstname"comma format not being recognized when the input uses the Arabic comma،(U+060C, the standard comma in Arabic/Persian/Urdu text) or the fullwidth CJK comma,(U+FF0C) instead of the ASCII comma: both variants now also split the format and no longer leak into the parsed output (closes #265)
Full changelog: https://github.com/derek73/python-nameparser/blob/master/docs/release_log.rst