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
The shared module-level CONSTANTS is sound — it's the only channel that reaches parses happening inside code you don't own (helpers, pipelines, third-party libraries using nameparser internally), the same justification logging and locale have. The gotchas all come from mutating it casually. The docs should state that as a contract instead of warning about it:
CONSTANTS is for application-level configuration, set once at startup. For anything scoped — one dataset, one library, one test — pass your own Constants instance.
Changes:
customize.rst: lead the customization docs with the contract; demote the "Potential Gotcha" section to a consequence of violating it rather than a surprise property of the API
nameparser/config/__init__.py module docstring: same reframe (it currently teaches the None sentinel first)
The shared module-level
CONSTANTSis sound — it's the only channel that reaches parses happening inside code you don't own (helpers, pipelines, third-party libraries using nameparser internally), the same justificationloggingandlocalehave. The gotchas all come from mutating it casually. The docs should state that as a contract instead of warning about it:Changes:
nameparser/config/__init__.pymodule docstring: same reframe (it currently teaches theNonesentinel first)Constants.copy()existsNo code changes. Depends on #260 only for the vocabulary mention; the reframe itself is true today.