Pytoolbox

Latest version: v14.8.3

Safety actively analyzes 640549 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 10

8.6.0beta

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 info dict

8.0.0beta

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`

7.1.17beta

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

6.6.0beta

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

5.6.3beta

Fixes and enhancements

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

5.6.0beta

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

Page 9 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.