Asphalt

Latest version: v4.11.1

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

Scan your dependencies

Page 2 of 5

4.8.0

- ``Context`` now accepts parametrized generic classes as resource types
- Deprecated context variables in favor of dependency injection
- Replaced ``asphalt.core.context.Dependency`` with
``asphalt.core.context.resource`` due to issues with strict type checking (the former
is now deprecated and will be removed in v5.0)
- Added support for dependency injection on synchronous functions
- Added shortcut functions for obtaining resources (``asphalt.core.get_resource()``,
``asphalt.core.require_resource()``)
- Fixed dependency injection not working with forward references
(``from __future__ import annotations``)

4.7.0

- Removed all uses of Python 3.5 style ``await yield_()`` from core code and documentation
- Added tracking of current Asphalt context in a :pep:`555` context variable, available via
``current_context()``
- Added dependency injection in coroutine functions via ``Dependency()`` and ``inject()``

4.6.0

- Added support for Python 3.10
- Dropped support for Python 3.5 and 3.6
- Removed all uses of the ``loop`` argument (fixes Python 3.10 compatibility)
- Switched to v0.15+ API of ``ruamel.yaml``
- Switched from ``pkg_resources`` to ``importlib.metadata`` for loading entry points
- Fixed ``DeprecationWarning`` about passing coroutine objects to ``asyncio.wait()``
- Fixed ``DeprecationWarning`` about implicitly creating a new event loop using
``get_event_loop()``
- Added the ``py.typed`` marker to enable type checking with dependent projects
- Deprecated the use of ``Context`` as a synchronous context manager

4.5.0

- Added new custom YAML tags (``!Env``, ``!BinaryFile`` and ``!TextFile``)

4.4.4

- Changed the ``async_timeout`` dependency to allow the 3.x and newer releases

4.4.3

- Fixed exception in ``stream_events()`` cleanup code introduced in the previous release

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.