Snakeoil

Latest version: v0.10.9

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

Scan your dependencies

Page 7 of 13

0.7.2

---------------------------

- snakeoil.cli.arghparse: Add support to specify a default subparser for parser
instances. This allows for things such as adding conflicting options to both
the root command and subcommands without causing issues in addition to helping
support default subparsers.

- Add initial support to replace C extensions with cython modules.

- snakeoil.contexts: Add patch context manager for modifying module
attributes.

- snakeoil.cli.tool: New module for running scripts -- abstraction of pkgcore's
method for running its commandline tools.

- snakeoil.process.spawn: Imported from pkgcore.spawn.

- snakeoil.process: Add fallback parameter to find_binary().

- snakeoil.strings: New module for string-related methods.

- snakeoil.dist.generate_docs: Support custom doc generation by projects.

- snakeoil.osutils: Add force_symlink() method.

0.7.1

---------------------------

- Drop py3.3 support.

- snakeoil.process.namespaces: Ignore recursive remounting errors for the root
directory. When layering namespaces only the first mount() call in this case
will work, subsequent calls will raise invalid argument errors.

0.7.0

---------------------------

- snakeoil.xml: Prefer lxml.etree when available.

- snakeoil.bash: Conditional line continuation support for iter_read_bash().

- snakeoil.dist.distutils_extensions: Move to external pkgdist project and
bundle the standalone module to circumvent pre-setup parsing dep cycles.

- snakeoil.lists: Deprecated module name was renamed to snakeoil.sequences.
Stub will exist with warnings until 0.8.

- snakeoil.osutils: Add supported_systems() decorator to support restricting
functions to set of supported systems.

- snakeoil.process: Remove get_proc_count() and get_physical_proc_count().

- snakeoil.cli.arghparse: Add generic argparse related support from pkgcore.

0.6.6

---------------------------

- snakeoil.cli: Add userquery() from pkgcore.ebuild.formatter.

- snakeoil.formatters: Don't force colored output if the terminal doesn't
support it.

- Add support for adding extended docs to argparse arguments via the 'docs'
kwarg. This allows for adding extended content meant for man pages directly
to the arguments in scripts. To enable support, all that must be done is
importing snakeoil.cli which will monkeypatch add_argument() from argparse to
ignore 'docs' kwargs by default. The extended content can be pulled at
certain times such as during doc generation by setting a flag, see
snakeoil.dist.generate_man_rsts for example usage.

- snakeoil.dist.distutils_extensions: Drop get_number_of_processors() since
multiprocessing.cpu_count is used instead.

- snakeoil.klass: Add patch decorator method for simplified monkeypatching.

- snakeoil.contextlib has been moved to snakeoil.contexts to avoid any potential
namespace issues from contextlib in the stdlib.

0.6.5

---------------------------

- snakeoil.process: Add is_running() that determines whether a process is
running or not using the PID status from the proc filesystem.

- snakeoil.process: Deprecate get_physical_proc_count() and get_proc_count(),
use cpu_count() from multiprocessing instead or other similar support.
Support will be removed in 0.7.

- Add a build_py3 target to snakeoil.dist.distutils_extensions to allow for
writing py3 compatible code and using 3to2 for conversion purposes instead of
writing py2 compatible code and using 2to3 during project builds.

- Drop some extra complexity from snakeoil.osutils.ensure_dirs(), mostly this
entails not altering perms on existing dirs anymore while traversing up the
components of a given path.

- Add initial user namespace support functionality. Currently the process
running the code gets its uid/gid mapped to root in the new namespace, but
that will be made more configurable later on.

- Add support for setting the system hostname and domain name under a UTS
namespace.

- Make sure child mount namespaces don't affect their parents. Some distros use
shared rootfs mount namespaces by default so child mount namespace mount
events propagate back up to their parents if they aren't made private or
slaved.

- Move mount methods from snakeoil.osutils into their own module at
snakeoil.osutils.mount.

- snakeoil.fileutils: add a touch(1) equivalent.

- Add the beginnings of a context manager module as snakeoil.contextlib.
Currently this just includes the SplitExec class leveraged by pychroot.

- Move snakeoil.namespaces to snakeoil.process.namespaces since they directly
relate to processes and we'll probably add a similar module for cgroups in
the near future.

- snakeoil.version: format_version() was merged into get_version().

0.6.4

---------------------------

- Add header install directory to the search path when building extensions.
This helps fix building consumers like pkgcore in virtualenvs.

- Simplify snakeoil.xml by dropping deprecated elementtree related module
fallbacks.

- Drop internal OrderedDict implementation from snakeoil.mappings, use the
version from collections instead.

- Fix snakeoil.compatibility ConfigParser defaults so 3rd party usage doesn't
get overridden.

- Add ctypes-based umount/umount2 wrapper in snakeoil.osutils.

Page 7 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.