- Add
one_lineargument toinfo_countmethod - Bump dependencies
- Remove support for Python 3.8 and 3.9
- Add support for Python 3.13
- Bump dependencies
- Remove support for Python 3.7
- Add support for Python 3.12
- Fix github and sr.ht de-synchronization
- Move to the your-tools organization
- Move from invoke to just
- Bump flake8 plugins
- Bump copier template
- Fix two warnings found by SonarQube
- Bump black
- Add multi selection method
select_choices. Initial patch by @cunyap
- Fix bug in
message_for_exception
- Drop support for Python 3.6
- Bump flake8 and its plugins
- Add support for Python 3.10
- Fix pypi badge
fatalcan now be called with a custom exit code, different than the default 1.
- Development branch is now called
main. - Fix #66 - only call
colorama.init()on Windows.
- breaking: Remove buggy workarounds on Windows.
Colors will now be off by default unless
cli_setup()is called withcolor="always". Configurations that are known to work arecmd.exeandgit-bashwhen usingwinpty. - breaking:
colorama.init()is called unconditionally whencli_uiis imported
- Move out of TankerHQ GitHub organization
- Fix using
info_tablewithkeys="headers"
- Remove Python 3.5 compat
- Add a
__repr__method to some of the classes
- Mark this package as typed
- Fix calling
dot()without fileobj argument.
- Switch to poetry for packaging and dependency management.
- Add a
sortargument to theask_choices()function to disable sorting the list of choices. Patch by@smandon. - CI: Drop Python 3.4, add Python 3.8, switch to GitHub Actions
- Relax type constraints for the
info_table()function.
- Relax constraints on the
Tokentype. - Expose the
MessageRecorderclass, not thepytestfixture.
Breaking change: Rename main package from
uitocli_ui. This name is less likely to cause clash with existing code:# old (<= 0.7) import ui ui.info("This is", ui.green, "green") # new (>= 0.8) import cli_ui cli_ui.info("This is", cli_ui.green, "green")Breaking change: use colorama instead of hard-coding ANSI sequences names and values of cli_ui constants. All existing names have been kept, but some of the values changed slightly.
ask_functions now take a variable number of tokens as first argument. This allows to color the prompt when requiring input from the user, for instance:res = cli_ui.ask_yes_no( "Deploy to", cli_ui.bold, "production", cli_ui.reset, "?", default=False )
Breaking change: Because of this new feature, the list of choices used by
ask_choiceis now a named keyword argument:# Old (<= 0.7) ask_choice("select a fruit", ["apple", "banana"]) # New (>= 0.8) ask_choice("select a fruit", choices=["apple", "banana"])
- Annotate everything with
mypy. - Use
blackfor automatic code formatting. - If you need the
record_message()pytest fixture in your own tests, you can now import it withfrom cli_ui.tests import message_recorder.
- Remove buggy
entry_pointsfromsetup.py.
- Switch to
dmenv. This makes it possible to usecli-uiwithcolorama >= 4.0.
- Switch to poetry .
- Fix crash in
ask_passwordwhen password was empty. - Let the :py:exc:`KeyboardInterrupt`` exception propagate back to the caller instead of catching
it ourselves and returning
None. Reported by Théo Delrieu.
- Add
ask_passwordandread_password. Patch by @drazisil
- Fix metadata (owner moved from TankerApp to TankerHQ)
- Export
Colorclass.
- Export a
Symbolclass, to use when you do not want to force color as withUnicodeSequence
- Expose the previously private
UnicodeSequenceclass.
- Add
info_section - Cosmetic changes about prefixes for
debug,warnanderrormessages. (See #6 for the details)
- Add
cli_ui.setupto configure things like verbosity and when to use colored output (#3) - Add a
message_recorderincli_ui.tests.confthat can be used as apytestfixture in other projects.
First public release