Pytoolbox

Latest version: v14.8.5

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

Scan your dependencies

Page 1 of 11

14.8.5

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.8.4...14.8.5

Features

* Make `subprocess` Windows compatible (with some restrictions)

Fix and enhancements

* Merge MRs from dependabot

14.8.4

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.8.3...14.8.4

Features

* Module `multimedia.exif`: Rework it (better typing, None instead of 0, ...)
* Module `multimedia.exif`: Cover it with tests (still some more are welcome)
* Class `multimedia.exif.Metadata`: Convert path to string to fix issues with Gexiv2

Fix and enhancements

* Integrate latest pylintrc
* Fix various linter issues

14.8.3

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.8.2...14.8.3

Features

* Make `filesystem` Windows compatible (with some restrictions)

Fix and enhancements

* Add `.flake8` configuration
* Merge MR from dependabot

14.8.2

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.8.1...14.8.2

Features

* Add TypeAlias `git.RefKind` and use it
* Add function `logging.reset_logger` and use it

Fix and enhancements

* Keep `git` / `subprocess` log records separated
* Prevent a strange issue when reloading logging module

14.8.1

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.8.0...14.8.1

Migrations

* Replace your calls to `argparse.set_columns` by `console.set_columns`
* Replace your calls to `argparse.HelpArgumentParser` by `argparse.ArgumentParser`
* Replace your calls to `filesystem.recursive_copy` by `filesystem.copy_recursive`
* Replace your calls to `subprocess.git_clone_or_pull` by `git.clone_or_pull`
* Replace your calls to `subprocess.ssh` by `ssh.ssh`

Features

* Prevent `pytoolbox` logged events being output to `sys.stderr` by registering a `NullHandler`
* Add class `argparse.ChainAction` (argument parsing action)
* Add function `argparse.separator` (argument parsing type)
* Add function `arpgarse.env_default` (utility function)
* Add convenient constants `DIRECTORY_ARGS`, `FILE_ARG`, `REMAINDER_ARG` and `MULTI_ARG()` (`arpgarse` module)
* Add class `argparse.ArgumentParser` (renamed from `argparse.HelpArgumentParser`)
* Add class `argparse.ActionArgumentParser`
* Add TypeAlias `Color`
* Expose `arpgarse.{ArgumentTypeError,Namespace}` to be convenient (`import argparse` not required)
* Decorator `decorators.deprecated` now accept a `guideline` argument (default to `''`)
* Expose `logging.{CRITICAL, ..., NOTSET}`, `logging.{Logger, LogRecord}` to be convenient (`import logging` not required)
* Add TypedDict `subprocess.CallResult` and use it to type hint functions response (added `exception` key)
* Function `subprocess.cmd`: Now logging to `pytoolbox.subprocess.cmd.<binary>` unless log is defined
* Function `subprocess.cmd`: Log can be a function, a `Logger` or a `str`. `None` will be mapped to default behavior

Fix and enhancements

* Favor `type(obj)` over `obj.__class__`
* Class `exceptions.MessageMixin`: Now show missing attributes (attributes can be properties too)
* Class `exceptions.CalledProcessError`: Add property `cmd_short` and prevent exposing sensitive data in `__str__` or `__repr__`
* Fix calls to `yaml.dump` (as its now `ruamel.yaml`)
* Various improvements such as type hints, documentation, tests

14.8.0

Diff: https://github.com/davidfischer-ch/pytoolbox/compare/14.7.0...14.8.0

Minor compatibility breaks

* Replace `subprocess.CalledProcessError` by `exceptions.CalledProcessError`
* Rename function `subprocess.git_clone_or_pull` to `ssh.clone_or_pull` (keep a deprecated alias)
* Rename function `subprocess.ssh` to `ssh.ssh` (keep a deprecated alias)
* Rename TypeAlias `subprocess.LoggerType` to `logging.LoggerType`

Migrations

* Replace your usage of `subprocess.CalledProcessError` by `exceptions.CalledProcessError`
* Replace your calls to `subprocess.git_clone_or_pull` by `ssh.clone_or_pull`
* Replace your calls to `subprocess.ssh` by `ssh.ssh`

Features

* Add module `git`
* Add module `ssh`
* Add class `exceptions.CalledProcessError`
* Add class `exceptions.DuplicateGitTagError`
* Add class `exceptions.GitReferenceError`
* Add class `exceptions.RegexMatchGroupNotFoundError`
* Add class `exceptions.SSHAgentConnectionError`
* Add class `exceptions.SSHAgentLoadingKeyError`
* Add class `exceptions.SSHAgentParsingError`
* Add function `logging.get_logger`
* Add Protocol `logging.BasicLggerFunc`
* Add class `logging.BasicFuncLogger`
* Add function `regex.group_replace`
* Add TypeAlias `serialization.YamlDataTypes`
* Add function `serialization.get_yaml`
* Add function `serialization.to_yaml`
* Add decorator `unittest.skip_if_missing`

Fix and enhancements

* Module `subprocess`: Now log defaulting to module's log
* Implement `__repr__` for exception classes
* Replace `pyyaml` by `ruamel.yaml`
* Cover `regex.Match` with tests
* Test code with `ruff`

Page 1 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.