| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | pypi | coolname | 2.2.0 | 5.0.0 |
| Back | FazBrowse Home | New Git URL |
This PR contains the following updates:
Release Notes
alexanderlukanin13/coolname (coolname)v5.0.0
Compare Source
This major release has new features and significant internal changes, but it is compatible with 4.x in any normal usage
as described in documentation, and you can upgrade from 4.x with minimal unit test coverage.
There are implementation changes that theoretically can break user code in undocumented scenarios.
Even if it breaks, most likely, it will take a minute to fix.
What's new in the default generator:
Complete typing support, tested with mypy strict = True.
Added a few more words, and fixed one spelling mistake.
.. collapse:: Boring technical details
* :py:class:`RandomGenerator` and global methods like :py:func:`generate_slug` now live in the top-level ``coolname`` namespace. It won't affect your code if you've been importing directly from ``coolname`` as per documentation. Basically, instead of this: .. code-block:: python >>> from coolname import generate_slug, RandomGenerator >>> generate_slug <bound method RandomGenerator.generate_slug of <coolname.impl.RandomGenerator object at 0x7a7cb248d6a0>> >>> RandomGenerator <class 'coolname.impl.RandomGenerator'> You will see this (notice no ``impl``): .. code-block:: python >>> generate_slug <bound method RandomGenerator.generate_slug of <coolname.RandomGenerator object at 0x75038bacde80>> >>> RandomGenerator <class 'coolname.RandomGenerator'>In custom generators:
Default parameter value changed: ensure_unique=True. Custom generators can forget about it
and still generate sequences without repeating words.
Consider also using ensure_unique_prefix (disabled by default).
:doc:New parameters <parameters-table> for advanced words/phrases lists:
strip_whitespace, allow_whitespace, separator.
What is considered a valid word? It's now controlled by word_regex parameter, \w+ by default.
Stricter config validation for custom generators, with more helpful error messages.
Custom generator can be rendered into text representation via
:py:meth:~coolname.RandomGenerator.render and :py:meth:~coolname.RandomGenerator.write.
Useful in debugging and logging.
New public API for manipulating configuration files:
Type :py:class:~coolname.types.CoolnameConfigT formally describes config dict.
Config in *.txt allows comment after a word/phrase, Python-style:
.. code-block::
this was allowed before
one two # this is now allowed too.. collapse:: Boring technical details
* Using arbitrary types (such as int) is word/phrase lists is now *strictly forbidden*, not just "undocumented and fails in most circumstances". For example, the following invalid configuration always raises an exception: .. code-block:: python { "all": { "type": "phrases", "phrases": [[1,2], [3,4]]} # don't do this } * ``RandomGenerator`` does not accept :py:class:`collections.abc.Mapping` as config anymore, only plain ``dict`` as described by type ``coolname.types.CoolnameConfigT``.v4.2.0
Compare Source
Backported changes in word lists from 5.0.0
Better mypy support
v4.1.0
Compare Source
v4.0.0
Compare Source
Breaking change: Python 3.10+ is required (because of packaging - see below).
Tests cover Python 3.10-3.14 and PyPy 3.10-3.11.
Switched to modern packaging with pyproject.toml. This should not affect user experience.
Support for egg files is officially dropped, but the package is still pure Python and should work in bundles
(such as PyInstaller - see documentation).
Added a lot of adjectives
Minor optimizations
v3.0.0
Compare Source
Breaking change: Python 3.6 is not supported anymore. Tests cover Python 3.7-3.14 and PyPy 3.7-3.11.
Better type hints (now checked with mypy)
Minor bug fixed, concerning abnormal configs (most likely didn't affect anyone)
More mythical animals + one mistake fixed + few other words
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.