Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.14.0] - 2023-12-02
Added
- Support for Python
3.11and3.12 - Support for
no_user_inputinAcknowledge.display()andEcho.display().
Fixed
- Raise
ValueErrorwhen dynamic value returns the wrong type. BasicQuestionvalidatesvalue_if_not_askedusing theValidatorif provided.Choicevalidatesvalue_if_not_askedfor dynamic options that depend on the currentAnswers.
Removed
- Support for Python version
3.7. tests/directory no longer included in distributions.
Internal
- Use hatch for build backend.
[0.13.0.post1] - 2023-05-12
Changed
- Update project metadata for ownership change.
Internal
- Use OpenID Connect as a trusted publisher for uploading releases.
[0.13.0] - 2022-10-24
Added
- Ability for
Choiceto display a custom message instead of the value being selected. This includes a new type alias (Options) which supports both theMapping[str, str]andList[str]forms. (#389)
Deprecated
- The
OptionListtype forChoicein favor ofOptions(#389)
Fixed
- All exceptions raised by
columbolisted in the docstrings. Improved phrasing to make messaging consistent.
[0.12.0] - 2022-09-05
Changed
- Expand acceptable versions of
typing-extensionsto include v4
Added
- Python version
3.10tested during CI - Python version
3.10added to package classifiers should_askkeyword argument forEchoandAcknowledgeinteractions (#356)
Changed
BasicQuestion.ask()will only evaluate dynamic values for the prompt message and default value once instead of repeatedly when the response was invalid.
Fixed
- Prevent infinite loop when the default value for a
BasicQuestiondoes not satisfy theValidatorandno_user_inputwas set toTrue. Now raises aValueErrorwhen this situation is detected.
The intent was that the default value would always satisfy the Validator, but that was not enforced or explicitly
documented.
Removed
- Support for Python version
3.6.
[0.11.0] - 2021-08-04
Changed
- Removed legacy validator signature and logic
Added
value_if_not_askedkwarg forQuestioninteractions to set a value if the question is not asked (#169)
[0.10.1] - 2021-02-26
Fixed
dataclasseswas not listed as a dependency for versions of Python < 3.7
[0.10.0] - 2021-02-18
Added
Changed
- Improved validation for converting question names to command line arguments (#82)
Deprecated
- Support for
Validators that returnOptional[str](#39)
[0.9.0] - 2020-12-18
First public release. No code changes from v0.8.0.
[0.8.0] - 2020-02-17
Added
- All
Interactions gained acopy()method to allow for creating slightly altered instances of an existingInteraction. parse_args()andformat_cli_help()accept an optionalparser_nameto be displayed in errors and help text.
Changed
- Stop producing universal wheels.
Fixed
StaticOrDynamicValueenforces that the result of the callable must be the same type as the static type.
Removed
DynamicValueis no longer exposed as a type alias.
[0.7.0] - 2020-02-10
Added
format_cli_help()function to produce CLI help text.
Changed
- Type hints on public API. Be more restrictive when functions should not be making mutations. Be less restrictive when functions don't rely on specific implementations.
Fixed
CliExceptioninherits fromColumboException.- Raise
DuplicateQuestionNameExceptionif a list of interactions contains multiple questions with the same name. The same exception is also raised when an existing answers dictionary already contains a name used by a given questions.
[0.6.0] - 2020-01-13
Added
parse_args()function now accepts an initial dictionary ofanswers.
Fixed
- Expose additional type hints used in signatures of public API.
[0.5.0] - 2020-01-06
Added
exit_on_erroradded toparse_args()as an optional argument. WhenFalse, the function will raise an exception instead of exiting the application if the arguments can't be parsed.
Changed
- Rewrote Columbo example script text.
- Made example script stand alone.
- Test against each supported python version in CI.
- Add support for python 3.8.
- Use
prompt-toolkitfor user interaction instead ofclick. - Mark
user_iosub-module as private. - Expose exception types raised by library.
Fixed
- Add
Argsclass thatuser_iorelies on. - Explicit type is required for
singledispatchon python 3.6. - Specify minimum supported python version.
Removed
- Ability to run the module as an application.
- Dynamic loading of questions from a file.
[0.4.0] - 2019-12-17
Changed
- return type of
Validatorreturn type updated frombooltoOptional[str] is_validfunction updated tovalidate, return type updated frombooltoOptional[str]
Fixed
BasicQuestionconstructor now respects thevalidatorargument- If
validatorcallable provided, question will be asked until validator returnsTrue
[0.3.0] - 2019-11-21
get_answers()takes optionalanswersdict, appending new answers to this as opposed to new dictionary
[0.2.0] - 2019-11-08
Added
get_answers()takes list of interactions and builds dict of answers, handling user I/O
[0.1.0] - 2019-10-15
Initial Release