Svcs

Latest version: v24.1.0

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

Scan your dependencies

Page 1 of 4

24.1.0

Highlights

This is just a quick fix for a warning in AIOHTTP 3.9+.


Special Thanks

This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If *you* would like to join them, go to <https://github.com/sponsors/hynek> and check out the sweet perks!


Above and Beyond

[Variomedia AG](https://www.variomedia.de/) ([variomedia](https://github.com/variomedia)), [Tidelift](https://www.tidelift.com/) ([tidelift](https://github.com/tidelift)), [FilePreviews](http://filepreviews.io/) ([filepreviews](https://github.com/filepreviews)), Daniel Fortunov ([asqui](https://github.com/asqui)), Kevin P. Fleming ([kpfleming](https://github.com/kpfleming)), and [Sören Weber](https://www.gedankenspieler.org/) ([SoerenWeber](https://github.com/SoerenWeber)).


Maintenance Sustainers

[Adam Hill](https://adamghill.com) ([adamghill](https://github.com/adamghill)), Dan Groshev ([si14](https://github.com/si14)), Magnus Watn ([magnuswatn](https://github.com/magnuswatn)), [David Cramer](http://cra.mr) ([dcramer](https://github.com/dcramer)), Moving Content AG ([moving-content](https://github.com/moving-content)), [ProteinQure](https://proteinqure.com/) ([ProteinQure](https://github.com/ProteinQure)), Jesse Snyder ([jessesnyder](https://github.com/jessesnyder)), [Rivo Laks](https://rivolaks.com) ([rivol](https://github.com/rivol)), [Ionel Cristian Mărieș](https://blog.ionelmc.ro) ([ionelmc](https://github.com/ionelmc)), [The Westervelt Company](https://westervelt.com) ([westerveltco](https://github.com/westerveltco)), Philippe Galvan ([PhilippeGalvan](https://github.com/PhilippeGalvan)), [Birk Jernström](https://polar.sh) ([birkjernstrom](https://github.com/birkjernstrom)), [Tim Schilling](https://www.better-simple.com) ([tim-schilling](https://github.com/tim-schilling)), Chris Withers ([cjw296](https://github.com/cjw296)), [Christopher Dignam](https://christopher.xyz) ([chdsbd](https://github.com/chdsbd)), [Stefan Hagen](https://stefan-hagen.website) ([sthagen](https://github.com/sthagen)), [Sławomir Ehlert](https://slafs.net) ([slafs](https://github.com/slafs)), Mostafa Khalil ([khadrawy](https://github.com/khadrawy)), [Filip Mularczyk](https://fmularczyk.pl) ([mukiblejlok](https://github.com/mukiblejlok)), [Mike Fiedler](https://mike.fiedler.me) ([miketheman](https://github.com/miketheman)), and [Michel Vittória](https://www.linkedin.com/in/michelvittoria/) ([michelvittoria](https://github.com/michelvittoria)).

Not to forget 5 more amazing humans who chose to be generous but anonymous!


Full Changelog

Fixed

- AIOHTTP: The registry is now stored using `aiohttp.web.AppKey`s on the application. This is an implementation detail and shouldn't matter, but it fixes a warning on AIOHTTP 3.9 and later.

23.21.0

Highlights

The main feature of this release are container-local registries that allow you to define factories that are only valid for a container. For example, based on request metadata! Check out [the docs](https://svcs.hynek.me/en/latest/core-concepts.html#container-local-registries) for details.

There's one minor **backward-incompatible** change regarding the handling of values and context managers – please refer to https://github.com/hynek/svcs/discussions/50 for the reasons.

Finally there's a bunch of fixes around typing.


Special Thanks

This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If *you* would like to join them, go to <https://github.com/sponsors/hynek> and check out the sweet perks!


Above and Beyond

[Variomedia AG](https://www.variomedia.de/) (variomedia), [Tidelift](https://www.tidelift.com/) (tidelift), [FilePreviews](http://filepreviews.io/) (filepreviews), Daniel Fortunov (asqui), and Kevin P. Fleming (kpfleming).


Maintenance Sustainers

[Adam Hill](https://adamghill.com) (adamghill), Dan Groshev (si14), Magnus Watn (magnuswatn), [David Cramer](http://cra.mr) (dcramer), Moving Content AG (moving-content), [ProteinQure](https://proteinqure.com/) (ProteinQure), Jesse Snyder (jessesnyder), [Rivo Laks](https://rivolaks.com) (rivol), [Ionel Cristian Mărieș](https://blog.ionelmc.ro) (ionelmc), [The Westervelt Company](https://westervelt.com) (westerveltco), Philippe Galvan (PhilippeGalvan), [Birk Jernström](polar.sh) (birkjernstrom), [Tim Schilling](www.better-simple.com) (tim-schilling), Chris Withers (cjw296), [Christopher Dignam](https://christopher.xyz) (chdsbd), [Stefan Hagen](https://stefan-hagen.website) (sthagen), [Sławomir Ehlert](slafs.net) (slafs), and Mostafa Khalil (khadrawy).

Not to forget 5 more amazing humans who chose to be generous but anonymous!


Full Changelog

Changed

- **Backwards-Incompatible**: Since multiple people have been bit by the `enter=True` default for `Registry.register_value()`, and it's very early in *svcs* life, we're changing the default to `enter=False` for all versions of `register_value()`.

This means that you have to explicitly opt-in to context manager behavior which makes a lot more sense for singletons like connection pools which are the most common candidates for registered values.

(The irony of shipping a backwards-incompatible change in the release directly following the adoption of a backwards-compatibility policy not lost on me.) [\50](https://github.com/hynek/svcs/discussions/50) [\#51](https://github.com/hynek/svcs/pull/51)

Added

- Container-local registries! Sometimes it's useful to bind a value or factory only to a container. For example, request metadata or authentication information.

You can now achieve that with `svcs.Container.register_local_factory()` and `svcs.Container.register_local_value()`. Once something local is registered, a registry is transparently created and it takes precedence over the global one when a service is requested. The local registry is closed together with the container. [\56](https://github.com/hynek/issues/pull/56)

- Flask: `svcs.flask.registry` which is a `werkzeug.local.LocalProxy` for the currently active registry on `flask.current_app`.

Fixed

- We've stopped rewriting the public names of our objects and `typing.get_type_hints()` now works on them as expected for Python 3.10 and later. [\52](https://github.com/hynek/issues/pull/52) [\#53](https://github.com/hynek/issues/pull/53)

- The detection of container arguments in `svcs.Registry()` when using string-based type annotations is more robust now. [\55](https://github.com/hynek/issues/pull/55)

23.20.0

Highlights

I'm very proud to hereby announce the first stable version of *svcs*.

I'm both excited and anxious how it's going to be received.

Please give it a shot and let me know!


Special Thanks

This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If *you* would like to join them, go to <https://github.com/sponsors/hynek> and check out the sweet perks!


Above and Beyond

[Variomedia AG](https://www.variomedia.de/) (variomedia), [Tidelift](https://www.tidelift.com/) (tidelift), [Sentry](https://sentry.io) (getsentry), [HiredScore](https://hiredscore.com) (HiredScore), [FilePreviews](http://filepreviews.io/) (filepreviews), Daniel Fortunov (asqui), and Kevin P. Fleming (kpfleming).


Maintenance Sustainers

[Adam Hill](https://adamghill.com) (adamghill), Dan Groshev (si14), Magnus Watn (magnuswatn), [David Cramer](http://cra.mr) (dcramer), Moving Content AG (moving-content), [Stein Magnus Jodal](https://jod.al) (jodal), [ProteinQure](https://proteinqure.com/) (ProteinQure), Jesse Snyder (jessesnyder), [Rivo Laks](https://rivolaks.com) (rivol), [Tom Ballinger](http://ballingt.com/) (thomasballinger), [Ionel Cristian Mărieș](https://blog.ionelmc.ro) (ionelmc), [The Westervelt Company](https://westervelt.com) (westerveltco), Philippe Galvan (PhilippeGalvan), [Birk Jernström](polar.sh) (birkjernstrom), [Tim Schilling](www.better-simple.com) (tim-schilling), Chris Withers (cjw296), [Christopher Dignam](https://christopher.xyz) (chdsbd), and [Stefan Hagen](https://stefan-hagen.website) (sthagen).

Not to forget 3 more amazing humans who chose to be generous but anonymous!


Full Changelog

Added

- [Backwards-compatibility](https://github.com/hynek/svcs/blob/main/.github/SECURITY.md)! *svcs* is pronounced stable now -- no more rug-pulls planned! [\#36](https://github.com/hynek/svcs/pull/36)

- Flask: `svcs.flask.container` which is a `werkzeug.local.LocalProxy` (like, for example, `flask.current_app`) and is the currently active container when accessed within a request context.

23.19.0

Just internal re-jiggerings.

23.18.0

With Starlette successfully added, I hope *svcs* is now feature-complete and won't need any bigger changes in the future.

I suspect it can be proclaimed stable soon, just when I realize how to market it…

Added

- Flask: `svcs.flask.get_registry()`.

- Starlette integration. [\31](https://github.com/hynek/svcs/pull/31)

23.17.0

FastAPI integration has landed in 30!

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.