Boltons

Latest version: v24.1.0

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

Scan your dependencies

Page 2 of 6

19.3.0

_(October 28, 2019)_

Three funcutils:

- [funcutils.format_invocation][funcutils.format_invocation] for formatting simple function calls `func(pos1, pos2, kw_k=kw_v)`
- [funcutils.format_exp_repr][funcutils.format_exp_repr] for formatting a repr like `Type(pos, kw_k=kw_v)`
- [funcutils.format_nonexp_repr][funcutils.format_nonexp_repr] for formatting a repr like `<Type k=v>`

[funcutils.format_invocation]: https://boltons.readthedocs.io/en/latest/funcutils.html#boltons.funcutils.format_invocation
[funcutils.format_exp_repr]: https://boltons.readthedocs.io/en/latest/funcutils.html#boltons.funcutils.format_exp_repr
[funcutils.format_nonexp_repr]: https://boltons.readthedocs.io/en/latest/funcutils.html#boltons.funcutils.format_nonexp_repr

19.2.0

_(October 19, 2019)_

A bunch of small fixes and enhancements.

- [tbutils.TracebackInfo][tbutils.TracebackInfo]'s from_frame now respects `level` arg
- [OrderedMultiDict.sorted()][OrderedMultiDict.sorted] now maintains all items, not just the most recent
- [setutils.complement()][setutils.complement] now supports `__rsub__` for better interop with the builtin `set`
- [FunctionBuilder][FunctionBuilder] fixed a few py3 warnings related to inspect module usage (`formatargspec`)
- [iterutils.bucketize][iterutils.bucketize] now takes a string key which works like an attribute getter, similar to other iterutils functions
- Docstring fixes across the board
- CI fixes for Travis default dist change

[OrderedMultiDict.sorted]: http://boltons.readthedocs.org/en/latest/dictutils.html#boltons.dictutils.OrderedMultiDict.sorted

19.1.0

_(February 28, 2019)_

Couple of enhancements, couple of cleanups.

- [queueutils][queueutils] now supports float-based priorities ([204][i204])
- [FunctionBuilder][funcutils.FunctionBuilder] has a new
`get_arg_names()` method, and its `get_defaults_dict()` method
finally includes kwonly argument defaults.
- [strutils.gzip_bytes][strutils.gzip_bytes] arrives to match
[strutils.gunzip_bytes][strutils.gunzip_bytes]

[i204]: https://github.com/mahmoud/boltons/issues/204

19.0.1

_(February 12, 2019)_

Quick release to enhance [FunctionBuilder][funcutils.FunctionBuilder]
and [funcutils.wraps][funcutils.wraps] to maintain function
annotations on Python 3+. ([133][i133], [134][i134], [203][i203])

[i133]: https://github.com/mahmoud/boltons/issues/133
[i134]: https://github.com/mahmoud/boltons/issues/134
[i203]: https://github.com/mahmoud/boltons/issues/203

19.0.0

_(February 10, 2019)_

A very big release indeed, perhaps the biggest yet. A big, big thank you to all the contributors!

- New types and utilities
- [dictutils.ManyToMany][dictutils.ManyToMany] arrives, to complement [dictutils.OneToOne][dictutils.OneToOne]
- [dictutils.FrozenDict][dictutils.FrozenDict] brings immutable mapping to a module near you ([105][i105])
- [setutils.complement()][setutils.complement] introduces "negative" sets, useful for exclusion and many other set operations
- [iterutils.soft_sorted()][iterutils.soft_sorted] allows for looser, more flexible sorting of sequences
- [iterutils.flatten_iter()][iterutils.flatten_iter] and [iterutils.flatten()][iterutils.flatten], to collapse nested iterables. ([118][i118])
- [mathutils.Bits][mathutils.Bits] type for representing a bitstring and translating
between integer, bytestring, hex, and boolean sequence representations.
- funcutils improvements
- [FunctionBuilder][funcutils.FunctionBuilder] and [funcutils.wraps][funcutils.wraps] now support coroutines/async ([194][i194])
- [FunctionBuilder.add_arg()][funcutils.FunctionBuilder.add_arg] allows the addition of arguments to the signature, to match [FunctionBuilder.remove_arg()][funcutils.FunctionBuilder.remove_arg] ([201][i201])
- Similarly [funcutils.wraps()][funcutils.wraps] now takes an "expected" argument, to complement "injected" ([161][i161])
- Other bugfixes and improvements
- [cacheutils.LRI][cacheutils.LRI] is now threadsafe and correctly evicts when duplicate keys are added ([155][i155], [157][i157])
- [dictutils.subdict()][dictutils.subdict] now does its best to return the same type of dictionary it was passed.
- [urlutils][urlutils] now has better IPv6 support and URL can be used more natively like a string
- Improve singularization in [strutils][strutils]
- Fix some deprecation warnings in Python 3.7 ([165][i165], [196][i196])
- Document the change in dict constructor behavior affecting [dictutils.OMD][dictutils.OMD] under Python 3.7+ ([179][i179])

[i105]: https://github.com/mahmoud/boltons/issues/105
[i118]: https://github.com/mahmoud/boltons/issues/118
[i155]: https://github.com/mahmoud/boltons/issues/155
[i157]: https://github.com/mahmoud/boltons/issues/157
[i161]: https://github.com/mahmoud/boltons/issues/161
[i165]: https://github.com/mahmoud/boltons/issues/165
[i179]: https://github.com/mahmoud/boltons/issues/179
[i194]: https://github.com/mahmoud/boltons/issues/194
[i195]: https://github.com/mahmoud/boltons/issues/195
[i196]: https://github.com/mahmoud/boltons/issues/196
[i201]: https://github.com/mahmoud/boltons/issues/201

18.0.1

_(August 29, 2018)_

A few bugfixes and a handy text utility.

- Add MultiSub for multiple string substitutions in a single call
([162][i162])
- `tableutils.Table.to_text()` is more Markdown compatible
- Add LICENSE to package ([164][i164])
- `atomic_save` works better with `overwrite=True` ([161][i161])
- Reduced memory footprint on `tbutils._DeferredLine` with `__slots__`

18.0.0

---

_(March 2, 2018)_

- Add `<thead>` and `<tbody>` structure to tableutils.Table HTML
output, which helps with styling and other functionality (e.g.,
jQuery datatables).
- Add [dictutils.subdict()][dictutils.subdict] to get a filtered version of a dictionary
based on a subset of keys. ([150][i150])
- Add beta version of cacheutils.MinIDMap.

17.2.0

---

_(December 16, 2017)_

A big release with a lot of features and bugfixes, big and small. Just
in time for the holidays!

- Better handling of `file` and `file`-like objects in [remap][iterutils.remap]'s `default_enter`
- Fix line-by-line iteration in [ioutils][ioutils] types
- Change [strutils.slugify][strutils.slugify] to always output at
least a single-character slug (in cases of
all-punctuation/whitespace inputs).
- Fix [DeferredValue][formatutils.DeferredValue] caching in [formatutils][formatutils]
- Add [OneToOne][dictutils.OneToOne] to [dictutils][dictutils]
- Add [MultiFileReader][ioutils.MultiFileReader] to [ioutils][ioutils] (see [135][i135])
- Support passing `dir` argument to [ioutils][ioutils] SpooledIO types
- fix default arguments for [mathutils.clamp][mathutils.clamp] (see [128][i128])
- Add [iterutils.research][iterutils.research], a
[remap][iterutils.remap]-based recursive search function for nested
data
- Improved and expanded [urlutils.SCHEME_PORT_MAP][urlutils.SCHEME_PORT_MAP]
- Simplify [urlutils.find_all_links][urlutils.find_all_links] signature

17.1.0

---

_(February 27, 2017)_

Add urlutils module, with URL type and find_all_links function. also
update Sentinel for Python 3 falsiness

- Add urlutils module, complete with RFC3986-compliant `URL` type
- Also add `urlutils.find_all_links` function, which heuristically
finds all links in plaintext, and creates URLs out of them.
- Update typeutils.Sentinel to be appropriately falsy on Python 3

17.0.0

---

_(January 24, 2017)_

Several tweaks and enhancements to ring in the new year.

- [tbutils][tbutils] objects like the
[ExceptionInfo][tbutils.ExceptionInfo] are now more easily
JSON-serializable thanks to a tweak to [Callpoint][tbutils.Callpoint].
- SpooledIO objects like
[ioutils.SpooledBytesIO][ioutils.SpooledBytesIO] are now
`bool`-able.
- [iterutils.bucketize][iterutils.bucketize] gains the
`value_transform` and `key_filter` arguments.
- [cachedproperty][cacheutils.cachedproperty] properly maintains
docstring
- [funcutils.wraps][funcutils.wraps] maintains a reference to the
wrapped function with `__wrapped__` attribute.
- A bit of cleanup to be backwards compatible to Python 3.3

16.5.1

---

_(November 6, 2016)_

Mostly bug fixes and various tweaks, optimizations, and
documentation. Also added a bit of functionality in the form of
[ioutils][ioutils] and some GUID stuff.

- Add [ioutils][ioutils] with
[SpooledStringIO][ioutils.SpooledStringIO] and
[SpooledBytesIO][ioutils.SpooledBytesIO], two in-memory file-like
objects, like the stdlib [StringIO][StringIO], except that they
automatically spill over to disk when they reach a configurable
size.
- Add [iterutils.GUIDerator][iterutils.GUIDerator] and
[iterutils.SequentialGUIDerator][iterutils.SequentialGUIDerator],
two methods of getting random iterables.
- Add [mathutils.clamp][mathutils.clamp], a combined min-max function,
like numpy's clip.
- Optimized [iterutils.first][iterutils.first].
- Enabled spillover kwargs in [funcutils.wraps][funcutils.wraps]
- fix for default [remap][iterutils.remap] set support, fixes [84][i84]
- improving and testing exceptions around classmethod and staticmethod
for [funcutils.wraps][funcutils.wraps] and
[FunctionBuilder][funcutils.FunctionBuilder], fixes [86][i86] to
the degree possible.

16.5.0

---

_(July 16, 2016)_

A few minor changes, and medium-sized breaking change to
[cacheutils][cacheutils].

- [cacheutils][cacheutils] caching decorators now take the
function/method into account by default. This was done by adding the
scoped argument to [cached][cacheutils.cached] and
[cachedmethod][cacheutils.cachedmethod] (and removing selfish from
cachedmethod). also fixed a bug in a cachedmethod test, as well as
added docs for scoped and key arguments. all of this to fix [83][i83].
- [tableutils.Table][tableutils.Table] cell html can be customized by
overriding `get_cell_html` method.
- [funcutils.total_ordering][funcutils.total_ordering], a
[functools.total_ordering][functools.total_ordering] backport for
python 2.6.
- [funcutils.FunctionBuilder][funcutils.FunctionBuilder] function
names are now configurable.

16.4.1

---

_(June 14, 2016)_

This release primarily contains several [statsutils][statsutils] updates.

- The biggest change was the addition of
[Stats.format_histogram][statsutils.Stats.format_histogram] complete
with Freedman bin selection and other useful options.
- Added inter-quartile range (iqr) to [statsutils.Stats][statsutils.Stats]
- Adding mad (median absolute deviation) to
[Stats.describe][statsutils.Stats.describe], since median and
std_dev were already there.

16.4.0

---

_(June 8, 2016)_

another significant release, thanks to the addition of funcutils.wraps
and funcutils.FunctionBuilder. also iterutils.chunked speedup, and
tbutils.ParsedException.to_string.

- [funcutils.wraps][funcutils.wraps]: Just like functools.wraps, but
can preserve the function signature as well.
- [funcutils.FunctionBuilder][funcutils.FunctionBuilder]: The basis
for [funcutils.wraps][funcutils.wraps], this full-featured type
enables programmatically creating functions, from scratch or from
existing functions. Supports all Python 2 and 3 function features.
- [ecoutils][ecoutils]: Python 2.4 and 2.5 support.
- [iterutils][iterutils]: optimize
[iterutils.chunked_iter][iterutils.chunked_iter] (2-5x faster
depending on runtime). [See 79][i79].
- [tbutils][tbutils]: add the
[ParsedException.to_string][tbutils.ParsedException.to_string]
method, to convert parsed exceptions back into strings, possibly
after manipulation
- switch FunctionBuilder on Python 2 to be congruent with Python 3
(keywords attribute renamed to varkw, preview users might have to
adjust)

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.