ChangeLog

All bugs/feature details can be found at:

Where XXXXX is the ‘Issue #’ referenced below. Additionally, this change log is available online at:

See the Upgrading section for more information related to any incompatible changes, and how to update your application to fix them. Also check out the What’s New section for details on new features.

2.11.1 - DEVELOPMENT (will be released as dev/2.11.2 or stable/2.12.0)

This is a branch off of the 2.10.x stable code base. Maintenance releases for 2.10.x will happen under the stable/2.10.x git branch, while forward feature development will happen as 2.11.x under the git master branch.

Bugs:

  • Issue #397 - [ext.logging] Removes deprecated warn from ILog validator, in-favor of warning
  • Issue #401 - [ext.daemon] Can’t get user in daemon extension
  • Issue #415 - [core] FrameworkError when reusing CementApp object

Features:

  • None

Refactoring:

  • Issue #378 - [tests] Refactor dto comply with Flake8
  • Issue #418 - [ext.daemon] Ability to daemonize without --daemon

Incompatible:

  • None

Deprecation:

  • None

2.10.2 - Thu July 14, 2016

Bumping version due to issue with uploading to PyPi.

2.10.0 - Thu July 14, 2016

Bugs:

  • Issue #363 - CementTestCase does not delete temporary files/directories
  • Issue #346 - AttributeError: ‘module’ object has no attribute ‘SIGHUP’ on Windows
  • Issue #352 - CementApp.extend() breaks on CementApp.reload()
  • Issue #366 - Output handler override options dissappear
  • Issue #385 - JsonOutputHandler/YamlOutputHandler/MustacheOutputHandler Do not pass keyword args down to backend render functions
  • Issue #393 - CementApp.Meta.hooks ignored for hooks defined by extensions

Features:

  • Issue #350 - Support for plugin directories
  • Issue #370 - Handlebars templating support
  • PR #371 - Jinja2 templating support
  • Issue #373 - Switch over to using Flake8 for PEP8 and style compliance
  • PR #375 - Redis cache handler support
  • Issue #379 - Support for alternative config file extensions
  • Issue #380 - Support for Cython/Compiled Plugins
  • Issue #389 - ConfigObj support for Python 3
  • Issue #394 - Watchdog extension for cross-platform filesystem event monitoring
  • Issue #395 - Ability to pass metadata keyword arguments to handlers via CementApp.Meta.meta_defaults.

Refactoring;

  • Issue #386 - Partially deprecated use of imp in favor of importlib on Python >= 3.1
  • Issue #390 - ArgparseArgumentHandler should store unknown arguments

Incompatible:

  • None

Deprecation:

  • Issue #365 - Deprecated LoggingLogHandler.warn()
  • Issue #372 - Deprecated Explicit Python 3.2 Support
  • Issue #376 - Deprecated cement.core.interface.list()

2.8.0 - Wed Feb 24, 2016

Bugs:

  • Issue #310 - Resolved issue where console/file logs had duplicate entries under certain circumstances.
  • Issue #314 - Resolved inconsistent behavor in colorlog extension.
  • Issue #316 - Running Nose tests with -s option causes traceback
  • Issue #317 - Calling CementApp.run() should return results from Controller._dispatch()
  • Issue #320 - Partials not rendering with Mustache templates
  • Issue #325 - Wrap Utility Doesn’t Support Unicode
  • Issue #328 - Post Run Hook Not Executing
  • Issue #331 - KeyError: ‘USER’ When Running Nose Tests
  • Issue #338 - Support non-ascii encoding for email subject and body

Features:

  • Issue #205 - Added new ArgparseController and expose decorator in ext_argparse to eventually replace CementBaseController.
  • Issue #299 - Added Argcomplete Framework Extension
  • Issue #322 - Added Tabulate Framework Extension (tabulatized output)
  • Issue #336 - Added Support for CementApp.reload() (SIGHUP)
  • Issue #337 - Added app.run_forever() alternative run method.
  • Issue #342 - Added Alarm/Timeout Support
  • Issue #343 - Memcached Extension/Pylibmc Now Supports Python 3

Refactoring:

  • Issue #311 - Refactor Hooks/Handlers into CementApp
  • Issue #319 - Use os.devnull instead of internal NullOut hack.

Incompatible:

  • Issue #311 - Hook signal now requires app argument.
  • Issue #313 - Default Cement.Meta.exit_on_close to False. Calls to sys.exit() should be explicit by the app developer, and not implied by the framework.
  • Issue #332 - Output Handler Interface Must Support Keyword Arguments

2.6.0 - Thu May 14, 2015

Bugs:

  • Issue #294 - Added work-around for scenario where an app wants to support arbitrary positional argument with a value of default. By default, this will attempt to explicitly call the default command rather than using default as the argument. This fix adds CementBaseController.Meta.default_func allowing the developer to override the name of the default function that is called if no matching sub-command is passed.

Features:

  • Issue #197 - Added support for colorized logging.
  • Issue #281 - Added support for Python with statement.
  • Issue #282 - Added support to define/register hooks and handlers via CementApp.Meta.
  • Issue #290 - Added ability to disable Cement framework logging via CementApp.Meta.framework_logging = False.
  • Issue #297 - Added experimental support for reloading configurations anytime config files and/or plugin config files are modified. Optional extension ext_reload_config.

Incompatible:

  • Issue #308 - No longer require explicit CementApp.Meta.base_controller if a controller with the label of base is registered. This is potentially backward in-compatible in that previously CementBaseController.Meta.label defaulted to base. It now defaults to None, which makes more sense but will break for any controllers that have not explicitly set a label of base.

2.4.0 - Wed Sep 17, 2014

Bugs:

  • Issue #211 - LoggingLogHandler namespace causes issues (regression)
  • Issue #235 - Duplicate Config Section when plugin already loaded
  • Issue #246 - Plugin extension does not disable after already being enabled

Features:

  • Issue #119 - Added cement.utils.shell.Prompt to quickly gather user input in several different ways.
  • Issue #182 - Added a mail interface with basic implementations of ‘dummy’ (just prints message to console) and ‘smtp’
  • Issue #229 - Ability to override handlers via command line options. Also related: Issue #225.
  • Issue #248 - Added documentation for BASH Auto-Completion example.
  • Issue #249 - Allow utils.shell.exec_cmd* to accept additional. parameters, passing all args and kwargs down to subprocess.Popen. Allows features such as changing the current working directory, and setting a timeout value, etc (everything that Popen supports).
  • Issue #257 - CementBaseController._dispatch() should return result of controller function.
  • Issue #259 - Add yaml and yaml_configobj config handlers.
  • Issue #262 - Add json and json_configobj config handlers.
  • Issue #267 - Add support for multiple plugin_dirs and plugin_config_dirs
  • Issue #269 - Allow app.close() to accept an exit code, and exit with that code.
  • Issue #270 - Add support for multiple template_dirs
  • Issue #274 - Add cement.core.interface.list function
  • Issue #275 - Added examples/ directory with working examples based on Examples section of the documentation.

Incompatible:

  • Issue #227 - Standardize handler config section naming conventions. All handler config sections are now labeled after interface.handler (i.e. output.json, or mail.sendgrid, etc).
  • Issue #229 - Handler override options deprecate the use of --json, and --yaml output handler options.
  • Issue #260 - Extensions/Plugins/Bootstrap modules must accept app argument in load() function. See Upgrading doc for more information.

2.2.0 - Wed Jan 29, 2014

Bugs:

Features:

  • Issue #209 - Added app.debug property to allow developers to know if –debug was passed at command line of via the config
  • Issue #219 - Merged ext.memcached into mainline
  • Issue #222 - Merged ext.configobj into mainline
  • Issue #223 - Merged ext.genshi into mainline
  • Issue #224 - Merged ext.yaml into mainline

Incompatible:

  • Issue #202 - Deprecated namespace packaging for cement and cement.ext. Resolves issues with certain IDE’s and other situations where the lack of a proper __init__.py causes issues. This change means that external extensions can no longer share the cement.ext module namespace, and must have it’s own unique module path.

Misc:

2.1.4 - Tue Oct 29, 2013

Bugs:

  • Issue #191 - KeyError when using minimal logger with –debug
  • Issue #199 - Moved post_argument_parsing hook down, after arguments_override_config logic happens.
  • Issue #204 - utils.misc.wrap should handle None type
  • Issue #208 - LoggingLogHandler does not honor Meta.config_section

Features:

  • Issue #190 - Merged daemon extension into core
  • Issue #194 - Added pre_argument_parsing/post_argument_parsing hooks
  • Issue #196 - Added utils.misc.wrap
  • Issue #200 - Merged ext.mustache into mainline.
  • Issue #203 - Added support for external template directory
  • Issue #207 - Added support for alternative ‘display’ name for stacked controllers

Incompatible:

  • Issue #163 - LoggingLogHandler.Meta.clear_loggers was changed from a boolean option, to a list. Additionally, LoggingLogHandler.clear_loggers() now requires a namespace argument. ILog interface no longer defines clear_loggers() as a required function (though ILog interfaces are welcome to implement one if necessary).
  • Issue #173 - Deprecated ‘has_key()’ from configparser extension
  • Issue #201 - Add Deprecation Warning for CementApp.get_last_rendered()

2.1.2 - Thu Nov 1st, 2012

This is a branch off of the 2.0.x stable code base. Maintenance releases for 2.0.x will happen under the stable/2.0.x git branch, while forward feature development will happen here under as 2.1.x under the git master branch.

Bugs:

  • Issue #162 - Unable to set log ‘level’ by config
  • Issue #167 - Non-stacked controllers not listed in –help
  • Issue #169 - Fixed tests.utils.shell_tests timeout issue
  • Issue #171 - No handlers could be found for logger
  • Issue #183 - os.environ[‘HOME’] does not exist on Windows

Features:

  • Issue #161 - Ability to override usage
  • Issue #164 - Store previously rendered data as app._last_rendered, and retrievable by app.get_last_rendered().
  • Issue #165 - Allow utils.fs.backup() to support a suffix kwarg
  • Issue #166 - Ability to set the ‘app’ for CementTestCase.make_app()
  • Issue #170 - Added support for nested and embedded controllers.

Misc:

  • Issue #172 - 100% PEP8 Compliant
  • Issue #160 - Refactor CementApp._resolve_handler() as handler.resolve()

Deprecation Notices:

  • Issue #173 - ConfigParserConfigHandler.has_key() is now deprecated, and will be removed in future versions. Please use if key in app.config.keys(section) instead.

Incompatible Changes:

  • Issue #141 - Removed shortcuts from CementBaseController (such as log, pargs, etc). Use self.app.<shortcut> instead.
  • Issue #167 - Listed above, in order to fix this issue as well as restrict future issues we implemented a hard requirement that all base controllers have the label ‘base’. This should not be a major change for anyone using Cement 2.0.x as it is a simple 1 line change in any one application. As all documentation encourages the use of the label ‘base’ it should not be a wide spread incompatibility.
  • Issue #179 - CementBaseController hidden, visible, and exposed have been removed, and replaced by other private means of managing the dispatch of commands.
  • CementBaseController no longer implements a default command.
  • Issue #177 - Renamed several cement.core.backend pieces including: handlers -> __handlers__, hooks -> __hooks__, SAVED_STDOUT -> __saved_stdout__, and SAVED_STDERR -> __saved_stderr__.
  • Issue #178 - Moved backend.defaults() to utils.misc.init_defaults(), and backend.minimal_logger() to utils.misc.minimal_logger()

2.0.0 - Fri Aug 03, 2012

This is the initial stable release of the 2.0.x branch. Future releases of this branch will include bug/security fixes and minor feature updates. Forward moving feature development will continue out of the 2.1.x branch.

Bugs:

  • Issue #143 - Incorrect doc regarding logging. The LoggingLogHandler now supports an optional ‘namespace’ argument allowing the developer to override the log prefix.
  • Issue #150 - foundation.CementApp.Meta.argv now defaults to None, but is overridden in __init__() with sys.argv if no other argv is passed as meta.

Features:

  • Issue #138 - Added ‘shell’ argument to utils.shell.exec_cmd() and utils.shell.exec_cmd2().
  • Issue #140 - Included ~/.myapp/config in default config search
  • Issue #144 - Added a note on Contributing, as well as a CONTRIBUTORS file.
  • Issue #152 - Added ‘argument_formatter’ to ControllerBaseClass.Meta.
  • Issue #153 - Added spawn_process() and spawn_thread() to utils.shell.

Incompatible Changes:

  • Issue #100 - Interfaces audit.
    • ILog.level() redefined as ILog.get_level()
    • IPlugin.loaded_plugins attribute redefined as IPlugin.get_loaded_plugins()
    • IPlugin.enable_plugins attribute redefined as IPlugin.get_enabled_plugins()
    • IPlugin.disabled_plugins attribute redefined as IPlugin.get_disabled_plugins()
  • Issue #145 - The IArgument interface no longer specifies that the parsed_args be maintained by the handler implementation. This means that app.args.parsed_args is no longer available, however app.pargs functions just the same as it points to app._parsed_args.
  • Issue #148 - The CementExtensionHandler.loaded_extensions property is
    now a callable at CementExtensionHandler.get_loaded_extensions().
  • Issue #151 - Removed all previously deprecated code including:
    • Removed CementApp.Meta.defaults, and CementBaseHandler.Meta.defaults. Now use config_defaults instead.
    • Removed cement.foundation.lay_cement(). Now use CementApp directly.
    • Removed cement.handler.enabled(). Now use handler.registered() instead.
  • Issue #154 - Validate for handler config_defaults and config_section by default. Only incompatible if not previously sub-classing from handler.CementBaseHandler.
  • Issue #157 - CementRuntimeError renamed as FrameworkError
  • Issue #158 - CementSignalError renamed as CaughtSignal
  • Issue #159 - CementInterfaceError renamed as InterfaceError

Misc:

  • Issue #155 - Removed unused CementArgumentError, and CementConfigError. These types of exceptions should be defined at the application level.

1.9.14 - Sun Jul 16, 2012

Bugs:

  • Issue #127 - Inherited positional arguments listed multiple times

Feature Enhancements:

  • Issue #131 - Controller aliases
  • Issue #126 - Add a ‘bootstrap’ importer to CementApp
  • Added cement.utils.test.CementTestCase for improved testing.

Incompatible Changes:

  • Issue #129 - Simplify extensions/plugins/hooks/etc.
    • Hooks renamed from ‘cement_xxx_hook’ to just ‘xxx’. For example, the ‘cement_pre_setup_hook’ is now simply ‘pre_setup’. Additionally, the ‘cement_on_close_hook’ is now broken out into ‘pre_close’, and ‘post_close’.
    • The cement.core.hooks.register decorator was replaced with a simple function of the same name. New usage is: register(‘hook_name’, hook_func).
    • Plugins, extensions, and the application bootstrap now attempt to call a ‘load()’ function, meaning library code and loading code can live in the same file (i.e. hooks won’t be registered just because you imported an extension to sub-class a handler, etc).
  • cement.utils.test_helper moved to cement.utils.test.
  • By default, command line arguments no longer override config settings. This is now configurable by the CementApp.Meta.arguments_override_config boolean. Related: Issue #136.

1.9.12 - Thu Jul 05, 2012

Bugs:

  • Fixed version mis-hap in setup.py

1.9.10 - Wed Jul 04, 2012

Feature Enhancements:

  • Issue #118 - Added utils.fs.backup() to safely backup files/dirs.

Misc:

  • Issue #111 - Use relative imports (makes cement more portable as it can be included and distributed with 3rd party sources).
  • Issue #120 - Use standard json rather than relying on jsonpickle

Incompatible Changes:

  • core.util.abspath moved to utils.fs.abspath
  • core.util.is_true moved to utils.misc.is_true
  • Namespace reverted from ‘cement2’ back to ‘cement’.
  • The following extensions have been removed from the cement source tree, and are now available externally (see: http://github.com/cement): daemon, memcached, configobj, yaml, genshi.

1.9.8 - Thu May 3, 2012

Feature Enhancements:

  • Issue #95 - Add a ‘config_section’ Meta default for all handlers. Required to parse config options for a handler.
  • Issue #97 - Add a standard cache handler interface.
  • Issue #105 - Add ‘meta_override’ and ‘core_meta_override’ list to CementApp().Meta. Also resolves Issue #104.
  • Issue #108 - Add CementApp.extend() functionality.
  • Issue #109 - Add cement.ext.memcached extension

Incompatible Changes:

  • Issue #103 - plugin_bootstrap_module renamed as plugin_bootstrap.
  • Issue #106 - Deprecate Meta.defaults in favor of Meta.config_defaults
  • Issue #107 - Make the app name the default config section, not [base]

1.9.6 - Wed Apr 18, 2012

Bug Fixes:

  • Issue #89 - Secondary controllers display under other controllers
  • Issue #90 - Logging to file doesn’t expand ‘~’
  • Issue #91 - Logging to file doesn’t create basedir

Feature Enhancements:

  • Issue #88 - Add cement.ext.genshi extension, provides Genshi Text Templating Launguage support.
  • Issue #93 - Add epilog support for CementBaseController.

Refactoring:

Incompatible Changes:

  • Issue #96 - Move ‘setup()’ functions to ‘_setup()’
  • Moved CementBaseController.dispatch() to _dispatch()
  • Moved CementBaseController.usage_text to _usage_text()
  • Moved CementBaseController.help_text to _help_text()
  • backend.defaults() no longer accepts an app name as an argument.
  • foundation.lay_cement() is deprecated. Use foundation.CementApp() directly.
  • No longer pass anything but ‘app’ object to handlers _setup() functions.
  • handler.enabled() is deprecated. Use handler.registered().

1.9.4 - Wed Dec 21, 2011

Bug Fixes:

  • Issue #73 - Hooks broken in Python 3
  • Issue #81 - Controller defaults should be processed before base controller.setup()

Feature Enhancements:

  • Issue #65 - Added ‘daemon’ extension. Process is daemonized by passing the ‘–daemon’ option. Handles switching the run user/group, as well as managing a pid file.
  • Issue #72 - Added new framework hooks.
  • Issue #76 - Added app.close() functionality including a cement_on_close_hook() allowing plugins/extensions/etc to be able to cleanup on application exit.
  • Issue #77 - Added default signal handler for SIGINT/SIGTERM as well as the cement_signal_hook which is called when any catch_signals are encountered.
  • Issue #78 - Added cement_pre_render_hook, and cement_post_render_hook allowing developers to control the data that is rendered to console.
  • Issue #84 - Ability to run all tests from utils/run_tests.sh

Incompatible Changes:

  • Issue #72 - The framework hooks ‘cement_add_args_hook’ and ‘cement_validate_config’ were removed in favor of the new pre/post setup and run hooks.
  • Issue #82 - Change ‘meta’ classes to Python-proper ‘Meta’, and interfaces to use ‘IMeta’. Old functionality will be completely removed before Cement stable release.

1.9.2 - Wed Nov 02, 2011

This is an initial beta release of Cement, and therefore no bugs or features are listed. Future releases will detail all changes.