A Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy!
pathlib.Path.chmod
in ubelt.Path.chmod
. Can now
specify string codes like "u+x" or "+rw". Old stat logic works as it
previously did.ubelt.cmd
to be a PathLike
object, which we will
expect to be an executable.ub.modname_to_modpath
now handles cases where editable packages have modules where the name is different than the package.ast.Num
Full Changelog: https://github.com/Erotemic/ubelt/compare/v1.3.4...v1.3.5
Path.copy
and Path.move
; they are now well enough tested.util_format
submodule has been renamed to util_repr
. The
util_format
is now a deprecated alias for util_repr
.FormatterExtensions
to ReprExtensions
, with the former now being a deprecated alias.ubelt.cmd
now returns an object that ducktypes subprocess.CompletedProcess
.ubelt.cmd
now contains a capture
argument which will disable capturing of output.ubelt.cmd
...detaching now only prints if verbosity is > 1ChDir
to util_path
.JobPool
so references to futures are released after they are yielded to the user.hash_data
. Note that it is unpadded, hence non-RFC compliant.pattern
as a convenience option to ubelt.Path.ls
.IndexableWalker.allclose
can now take unwrapped objects.ubelt.cmd
now respects cwd
when system=True
.util_platform
ub.Path.copy
and ub.Path.move
ub.utext
which is a repr2 with new defaults.ub.IndexableWalker.allclose
method to replace indexable_allclose
ub.schedule_deprecation
can now accept the strings "soon" or "now" for "when" arguments.ub.schedule_deprecation
can now accept stacklevel
as as an argument.ub.Path.apppdir
can now be called without arguments.TempDir
ub.Timer
can now accept ns
as a keyword to enable nanosecond resolution.ProgIter.format_message
return value has changed.ub.Path.mkdir
now returns itselfdict_hist
in the basic case by 2xindexable_allclose
where tolerances were not respected.modname_to_modpath
with exclude and editable installs.PythonPathContext
import_module_from_modname
with editable installs where it would try to match modules that had the requested module as a prefix.timeout
argument is now respected in the thread / process case of JobPool
ubelt.util_dict.UDict.take
.__add__
, __radd__
, startswith
, and endswith
methods to ubelt.Path
to make
it a better drop-in replacement for string based paths.ubelt.SetDict
now promote the type.cls
keyword argument to ubelt.SetDict
methods.ensure_app_cache_dir
, ensure_app_config_dir
, ensure_app_data_dir
,
get_app_cache_dir
, get_app_config_dir
, get_app_data_dir
, readfrom
, writeto
, ensure_unicode
.__editable__
based install path with ub.modname_to_modpath
ub.compatible
.warncls
argument to ub.schedule_deprecation
.ubelt.symlink
ubelt.memoize_method
where the method name and docstring were
not wrapped correctly.timeout
argument now works correctly with ub.cmd
when tee=True
.appname
to ubelt.download
which was supposed to exist as indicated
by the docs, but didn't.ubelt.cmd
are now properly closed.ub.compatible
no longer errors on positional only functions, instead it
returns the keyword-compatible arguments.ubelt.symlink
with unintuitive behavior when an empty string
was given as the link path. This now raises an error.ubelt.sorted_vals
and ubelt.map_vals
were
renamed to ubelt.sorted_values
and ubelt.map_values
, but the old names
are still available as aliases.Path.augment
have been modified.Path.augment
, deprecate overloaded suffix
and introduce stemsuffix
as an alternative.