Skip to content

Breaking Changes

This is a list of breaking changes that have been made to MILC. If your script stops working after a minor or major version upgrade this document will tell you how to fix it.

Version 2.0.0

  • cli.config_source now returns 'env_var' for arguments whose value came from an environment variable via env_prefix. Previously only 'argument', 'config_file', and None were possible values. Code that exhaustively checks config_source values will need to handle 'env_var'.
  • cli.args_passed has been removed from the public API. Use cli.config_source to determine where a value came from.
  • cli.milc_options() now uses is not None checks for all parameters. Previously, passing a falsy value (e.g. name='') would silently fall back to the previously set value. Now it is applied as-is.
  • The context manager code (with cli: aka __enter__/__exit__) has been removed. It added unnecessary complexity.
  • Removed support for set_metadata() and the MILC_APP_NAME, MILC_APP_VERSION, and MILC_APP_AUTHOR environment vars

Version 1.11.0

  • Removed Python 3.8 support.

Version 1.10.0

  • Fixed many bugs identified by the autocanonizer (AI).

Version 1.9.0

Version 1.8.0

  • MILC no longer does a logging.basicConfig before configuring logging. Modules which log during import time may emit extraneous messages with non-MILC formatting.

Version 1.7.0

  • MILC is now fully type hinted
  • You can pass in custom loggers using set_metadata

Version 1.6.0

Version 1.5.0

Version 1.4.0

  • The config subcommand now filters out configuration that has not been explicitly set. The new --all flag will allow you to see all possible configuration options and their default values.
  • Setting program metadata through environment variables has been deprecated. In its place is the new set_metadata() function. See Metadata for more detail.
  • MILC now tracks whether a script is running interactively or not with cli.interactive. You can pass --interactive to force a script into interactive mode even when stdout is not a TTY. milc.questions will always return the default answer when running non-interactively, unless --yes or --no are passed.

Version 1.3.0

  • You can now set the program version number with os.environ['MILC_APP_VERSION'] = '1.2.3'
  • New global arguments: --unicode and --no-unicode
  • ANSIFormatter, ANSIStrippingFormatter, ANSIEmojiLoglevelFormatter, and ANSIStrippingEmojiLoglevelFormatter have been removed in favor of format_ansi() being color aware. The new MILCFormatter is being used in its place.

Version 1.2.0

Version 1.1.0

  • Configuration: 0 and 1 are now considered integers, not boolean

Version 1.0.0

Initial Version