Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Backwards incompatible:
- Removed previously deprecated constructs: with_injector, Injector.install_into, Binder.bind_scope
- Dependencies are no longer injected into Module.configure and raw module functions (previously
deprecated)
- Removed unofficial support for injecting into parent class constructors
- Removed unofficial support for injecting into parent class constructors

0.15.0
------
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ include pytest.ini
recursive-include docs *.html
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.png
recursive-include docs *.svg
recursive-include docs Makefile
exclude .readthedocs.yaml
exclude .coveragerc
Binary file added docs/_static/user-dependency-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions docs/_static/user-dependency-graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}


def setup(app):
Expand Down
17 changes: 17 additions & 0 deletions docs/terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,23 @@ Or transitively::
>>> user.description
'Sherlock is a man of astounding insight'

The example above forms the following dependency graph. Arrows point from
an object or provider to the binding key it requires: ``User`` needs both
``Name`` and ``Description``, and the ``Description`` provider also needs
``Name``. The same ``Name`` binding supplies both injection sites.

.. figure:: _static/user-dependency-graph.png
:alt: User depends on Name and Description; the provider for Description also depends on Name.
:width: 854px

Dependencies in the User example. ``Name`` is bound to ``'Sherlock'``;
``Description`` is supplied by ``UserAttributeModule.describe``.
:download:`Editable SVG <_static/user-dependency-graph.svg>`.
`Edit diagram <https://svgdiagram.ai/diagram-sources/injector-user-dependency-graph?version=1>`__.

This graph describes binding dependencies. Instance reuse is controlled by
:ref:`scopes`, so a shared binding key does not by itself imply singleton scope.

Assisted injection
``````````````````

Expand Down