=========
changelog
=========

----------------
v9.4.2 -> v9.7.0
----------------

Minor compatibility breaks
==========================

* Rename all functions with _to_ instead of 2 (e.g. str2time -> str_to_time)
* Rename some methods of the class ffmpeg.FFmpeg
* Change signature of console module functions

Features
========

* Add module comparison
* Add module regex
* Add class filesystem.TempStorage
* Add function exception.get_exception_with_traceback
* Add function humanize.natural_int_key
* Add function console.progress_bar

Fixes and enhancements
======================

* Add *streams* methods to ffmpeg.FFmpeg
* Improve ffmpeg module (add Media class for inputs/outputs)
* Improve network.http.download_ext (Can download in chunks + progress callback)

---------------------
v9.3.0-beta -> v9.4.2
---------------------

Features
========

* Add module humanize
* Add module django.models.query.mixins
* Add module django.test.runner.mixins

Fixes and enhancements
======================

* Add __all__ to make the API explicit
* Add method get_media_framerate to FFmpeg class
* Add module private (with _parse_kwargs_string)
* network module: Cleaner usage of string.format()
* Refactor module humanize + add naturalfilesize
* Improve humanize functions to handle [0-1] range + big numbers

--------------------------
v8.6.1-beta -> v9.3.0-beta
--------------------------

Compatibility breaks
====================

* Refactor multimedia modules
* Rename module django.templatetags.pytoolbox_tags to _filters

Minor compatibility breaks
==========================

* Rename django.forms -> django.forms.mixins
* Rename django.views -> django.views.mixins

Features
========

* Add module django.templatetags.pytoolbox_tags
* Add module multimedia.exif
* Add some django mixins

Fixes and enhancements
======================

* Fix unicode handling
* Function datetime.total_seconds now accept instance of timedelta
* Function filesystem.from_template can now use jinja2 to generate the content
* timedelta & to_filesize Django template filters now handle empty string input
* Add argument create_out_directory to method multimedia.ffmpeg.FFmpeg.encode
* Fix multimedia.ffmpeg.FFmpeg.encode: Create output directory before the subprocess
* Improve multimedia.ffmpeg.FFmpeg.encode: Handle process missing + simplify mocking

--------------------------
v8.6.0-beta -> v8.6.1-beta
--------------------------

Fixes and enhancements
======================

* Add function multimedia.ffmpeg.get_subprocess

--------------------------
v8.0.0-beta -> v8.6.0-beta
--------------------------

Minor compatibility breaks
==========================

* Rename module django.models -> django.models.mixins

Features
========

* Add module django.models.fields
* Add class validation.CleanAttributesMixin
* Add class validation.StrongTypedMixin
* Add class django.forms.RequestMixin
* Add class django.views.AddRequestToFormKwargsMixin
* Add class django.views.LoggedCookieMixin
* Add class unittest.AwareTearDownMixin
* Add function subprocess.git_add_submodule
* Add function network.http.download_ext
* Add function datetime.parts_to_time

Fixes and enhancements
======================

* Add some classes in module exception
* Add module django.urls with utility regular expressions
* Improve crypto.githash to handle reading data from a file
* Fix SaveInstanceFilesMixin (use .pk instead of .id)
* Improve datetime.str2time to handle microseconds
* Improve filesystem.try_remove to handle directories (when recursive=True)
* Improve multimedia.ffprobe.get_media_duration (return None in case of error)
* StrongTypedMixin: Allow setting arg to the default value (if set)
* Split HelpTextToPlaceholderMixin logic to allow modify behavior by inheritance
* Fix multimedia.ffmpeg.encode (convert default_in_duration to time)
* Fix multimedia.ffmpeg.encode (may return None - out_duration)
* Fix multimedia.ffmpeg.encode (skip broken out duration)
* Improve multimedia.ffprobe.get_media_duration to handle media infos dict

---------------------------
v7.1.17-beta -> v8.0.0-beta
---------------------------

Compatibility breaks
====================

* Move ffmpeg and x264 modules into multimedia
* Replace unreliable ffmpeg.get_media_* functions by multimedia.ffprobe.get_media_*

Features
========

* Add module multimedia.ffprobe
* Add function datetime.str2time

---------------------------
v6.6.0-beta -> v7.1.17-beta
---------------------------

Compatibility breaks
====================

* Store command line arguments in args attribute, do not update __dict__ of the instance.

Features
========

* Add module argparse

Fixes and enhancements
======================

* Add function argparse.is_file
* Add cleanup argument to juju.boostrap
* Add docstring to function juju.ensure_num_units
* Add get_unit_public_address + properties methods to class juju.Environment (thanks @smarter)
* Add args and namespace kwargs to juju.DeploymentScenario __init__ to allow bypassing sys.arv
* Fix various bugs of juju module + various updates according to juju 1.18
* Fix subprocess.rsync
* Fix crypto.githash
* Fix handling of juju bootstrap error message in Python 3
* Default to something if key is missing in stats (x264.encode)
* Use sudo with juju status (to work around https://bugs.launchpad.net/juju-core/+bug/1237259)
* Add timeout to valid_uri

--------------------------
v5.6.3-beta -> v6.6.0-beta
--------------------------

Compatibility breaks
====================

* Improve errors and time-outs handling in juju module (for the best)
* Move socket & twisted fec generators to pytoolbox_bin

Minor compatibility breaks
==========================

* Remove deprecated flask.get_request_data (replaced by network.http.get_requests_data)
* SmartJSONEncoderV2 now filter the class attributes
* Fix SmartJSONEncoderV2!

Features
========

* Add module decorators
* Add module django.utils
* Add module x264
* Add function datetime.secs_to_time
* Add function datetime.time_ratio
* Add function ffmpeg.get_media_resolution
* Add function mongo.mongo_do
* Add function network.http.download
* Add function subprocess.git_clone_or_pull

Fixes and enhancements
======================

* Fix test_ensure_num_units, str2datetime
* Fix computation of FecReceiver.lostogram
* Fix usage of time_ratio by ffmpeg and x264 modules
* Use renamed IP class (previously IPAddress) fallback import to IPAddress
* Accept None to leave owner or group unchanged (filesystem.chown)
* Set default time-outs to None and update juju module (fixes)
* Add some arguments to recursive_copy and rsync
* Append sudo to juju bootstrap
* Add juju.Environment.wait_unit
* Improve ffmpeg module

--------------------------
v5.6.0-beta -> v5.6.3-beta
--------------------------

Fixes and enhancements
======================

* Add timeout argument to cmd()
* Remove symlink first, to avoid boring exceptions
* Add timeout to juju status !

--------------------------
v5.5.0-beta -> v5.6.0-beta
--------------------------

Features
========

* Add function validation.valid_int()

Fixes and enhancements
======================

* Add constants to juju module
* Juju bootstrap will print time as int
* Add makedirs argument to some methods of the objects of serialization
* Add user argument to function subprocess.cmd
* Add path argument to subprocess.make
* Add extra_args (list) to function subprocess.rsync

* Fix juju, serialization, subprocess modules, update tests
* Function subprocess.cmd : Handle logging.Logger as log, improve docstring, add retry loop
* Upgrade relation_ methods

---------------------------
v5.4.19-beta -> v5.5.0-beta
---------------------------

Minor compatibility breaks
==========================

* Move all django template tags into module pytooblox_tags
* Move juju functions to the Environment class

Features
========

* Add console.choice() (by kyouko-taiga)
* Add function serialization.to_file and use it to improve PickeableObject and JsoneableObject write methods.

Fixes and enhancements
======================

* Add missing MANIFEST.in
* Add new django-related modules
* Add some django mixins + template tags
* Make class django.models.GoogleMapsMixin more generic
* Add cli_output argument to subprocess.cmd
* Add size_only argument to subprocess.rsync
* Do not add hashlib to requirements if already part of the stdlib
* Fix headers + rest markup + update title
* Enhance function ffmpeg.encode
* Call log more often

---------------------------
v5.0.0-beta -> v5.4.19-beta
---------------------------

Deprecated
==========

* flask.get_request_data replaced by network.http.get_request_data

Minor compatibility breaks
==========================

* Split django module into submodules
* Rename SmartModel to AbsoluteUrlMixin

Features
========

* Embed smpte2022lib
* Add entry points (socket-fec-generator + twisted-fec-generator)
* Add commit and release scripts to make it more securely (run tests before, check sphinx ...)
* Add module network.http and classes juju.SimulatedUnit(s)
* Add module django.templatetags with getattribute function
* Add class django.models.SaveInstanceFilesMixin
* Add function django.forms.update_widget_attributes

Fixes and enhancements
======================

* Lighter list of dependencies
* Add --extra-... flags to install dependencies for the extra features/modules.
* Filter packages to avoid installing tests module !
* Fix setup.py to avoid removing tests from packages list if it did not exist.
* Add kwargs to serialization.object2json -> json.dumps
* map_marker : Convert to unicode sooner (to handle special field class)
* django.forms.SmartModelForm : Attributes & replacement class applied depending of the form field's class
* Add fill option to collections.pygal_deque.list()
* Replace range by xrange, values by itervalues, ...
* Handle datetime.date class (function datetime.dateime2epoch)
* Add suffix parameter to AbsoluteUrlMixin.get_absolute_url
* Ensure import from future of great things
* Fix docstrings

Example usage::

    sudo python setup.py install --help
    sudo python setup.py install --extra-flask

--------------------------
v4.8.7-beta -> v5.0.0-beta
--------------------------

Compatibility breaks
====================

* Remove py_ prefix of all modules & paths
* Change license (GNU GPLv3 -> EUPL 1.1)

Features
========

* Add module mongo

Fixes and enhancements
======================

* Use absolute imports
* Update classifiers
* Update README.rst

--------------------------
v4.0.0-beta -> v4.8.7-beta
--------------------------

Minor compatibility breaks
==========================

* Rename duration2secs -> total_seconds
* Rename get_request_json -> get_request_data

Features
========

* Python 3 support
* Add module py_collections
* Add module py_django
* Add function json_response2dict
* Add function make
* Add function ssh
* Greatly improve module py_juju
* Greatly improve module py_serialization

Fixes and enhancements
======================

* Update README.rst
* Update function get_request_data
* Update function map_exceptions
* Update function runtests
* Update setup.py

---------------------------
v3.10.7-beta -> v4.0.0-beta
---------------------------

Compatibility breaks
====================

* Greatly improve module py_serialization

Features
========

* Greatly improve module py_juju
* Add class TimeoutError
* Add function print_error

Fixes and enhancements
======================

* Fix setup.py
* Update cmd
* Update rsync

---------------------------
v2.1.2-beta -> v3.10.7-beta
---------------------------

Compatibility breaks
====================

* Rename module py_mock -> py_unittest
* Remove function unicode_csv_reader

Features
========

* Add module py_console
* Add module py_unicode
* Add module and function runtests
* Add class JsoneableObject
* Add function assert_raises_item
* Add function valid_uri
* Add function validate_list
* Greatly improve module py_juju
* Greatly improve setup and unit-testing

Fixes and enhancements
======================

* Fix shebangs
* Handle unicode
* Use new string formatting
* Update function map_exceptions
* Add kwargs to functions of module py_subprocess
