Picobox

Latest version: v4.0.0

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

Scan your dependencies

Page 1 of 2

4.0.0

What's Changed

* **BREAKING**: The `picobox.contrib` package is renamed into `picobox.ext`. See https://github.com/ikalnytskyi/picobox/pull/70.
* Add `Python 3.12` support. See https://github.com/ikalnytskyi/picobox/pull/61.
* Drop `Python 3.7` support. It reached its end-of-life recently. See https://github.com/ikalnytskyi/picobox/pull/60.
* Fix `picobox.pass_()` decorator issue when it was shadowing a return type of the wrapped function breaking code completion in some LSP servers. See https://github.com/ikalnytskyi/picobox/pull/62.
* Fix `picobox.push()` context manager issue when it wasn't announcing properly its return type breaking code completion in some LSP servers for the returned object. See https://github.com/ikalnytskyi/picobox/pull/62.
* Fix `Box.put()` and `picobox.put()` to require either `value` or `factory` argument. Previously, they could have been invoked with `key` argument only, which makes no sense and causes runtime issues later on. See https://github.com/ikalnytskyi/picobox/pull/69.

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/3.0.0...4.0.0

3.0.0

What's Changed

* Add `Python 3.10` & `Python 3.11` support. See https://github.com/ikalnytskyi/picobox/pull/51.
* Drop `Python 2.7` support. It's dead for more than a year anyway. Those who want to use picobox with `Python 2` should stick with `2.x` branch. See https://github.com/ikalnytskyi/picobox/pull/39.
* Drop `Python 3.4`, `Python 3.5` and `Python 3.6` support. They reached their end-of-life and are not maintained anymore. See https://github.com/ikalnytskyi/picobox/pull/39 and https://github.com/ikalnytskyi/picobox/pull/52.
* Add type annotations to public interface. Now users can use `mypy` to leverage type checking in their code base. See https://github.com/ikalnytskyi/picobox/pull/47.
* Make some parameters keyword-only: `factory` and `scope` in `Box.put()`, `as_` in `Box.pass_()` and `chain` in `picobox.push()`. See https://github.com/ikalnytskyi/picobox/pull/49.
* Use [PEP 621](https://peps.python.org/pep-0621/) `pyproject.toml` in a so-called source distribution.

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/2.2.0...3.0.0

2.2.0

What's Changed

* Fix `picobox.singleton`, `picobox.threadlocal` & `picobox.contextvars` scopes so they do not fail with unexpected exception when non-string formattable missing key is passed. See https://github.com/ikalnytskyi/picobox/pull/30.
* Add `picobox.contrib.flaskscopes` module with *application* and *request* scopes for Flask web framework. See https://github.com/ikalnytskyi/picobox/pull/31 and https://github.com/ikalnytskyi/picobox/pull/37.
* Add `picobox.Stack` class to create stacks with boxes on demand. Might be useful for third-party developers who want to use picobox yet avoid collisions with main application developers. See https://github.com/ikalnytskyi/picobox/pull/33.

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/2.1.0...2.2.0

2.1.0

What's Changed

* Add `picobox.contextvars` scope (python 3.7 and above) that can be used in asyncio applications to have a separate set of dependencies in all coroutines of the same task. See https://github.com/ikalnytskyi/picobox/pull/23.
* Fix ``picobox.threadlocal`` issue when it was impossible to use any hashable key other than ``str``. See https://github.com/ikalnytskyi/picobox/pull/21.
* Nested `picobox.pass_` calls are now squashed into one in order to improve runtime performance. See https://github.com/ikalnytskyi/picobox/pull/25.
* Add `Python 2.7` support. See https://github.com/ikalnytskyi/picobox/pull/26.

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/2.0.0...2.1.0

2.0.0

What's Changed

* `picobox.push()` can now be used as a regular function as well, not only as a context manager. This is a breaking change because from now one a box is pushed on stack immediately when calling `picobox.push()`, no need to wait for `__enter__()` to be called. See https://github.com/ikalnytskyi/picobox/pull/16.
* New `picobox.pop()` function, that pops the box from the top of the stack. See https://github.com/ikalnytskyi/picobox/pull/16 and https://github.com/ikalnytskyi/picobox/pull/17.
* Fixed a potential race condition on concurrent calls to `picobox.push()` that may occur in non-CPython implementations. See https://github.com/ikalnytskyi/picobox/pull/16.

New Contributors

* malor made their first contribution in https://github.com/ikalnytskyi/picobox/pull/16

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/1.1.0...2.0.0

1.1.0

What's Changed

* New ``ChainBox`` class that can be used similar to ``ChainMap`` but for boxes. This basically means from now on you can group few boxes into one view, and use that view to look up dependencies. See https://github.com/ikalnytskyi/picobox/pull/11.
* New ``picobox.push()`` argument called ``chain`` that can be used to look up keys down the stack on misses. See https://github.com/ikalnytskyi/picobox/pull/14.

**Full Changelog**: https://github.com/ikalnytskyi/picobox/compare/1.0.0...1.1.0

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.