mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
Merge branch 'release/4.23.1' into master
This commit is contained in:
commit
b2ea773c71
|
@ -7,6 +7,12 @@ that were made in every particular version.
|
|||
From version 0.7.6 *Dependency Injector* framework strictly
|
||||
follows `Semantic versioning`_
|
||||
|
||||
4.23.1
|
||||
------
|
||||
- Hotfix a bug with importing FastAPI ``Request``.
|
||||
See issue: `#398 <https://github.com/ets-labs/python-dependency-injector/issues/398>`_.
|
||||
Thanks to `@tapm <https://github.com/tapm>`_ for reporting the bug.
|
||||
|
||||
4.23.0
|
||||
------
|
||||
- Add support of aliases for ``Configuration`` provider.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Top-level package."""
|
||||
|
||||
__version__ = '4.23.0'
|
||||
__version__ = '4.23.1'
|
||||
"""Version number.
|
||||
|
||||
:type: str
|
||||
|
|
|
@ -345,8 +345,13 @@ def _unpatch(
|
|||
def _fetch_reference_injections(
|
||||
fn: Callable[..., Any],
|
||||
) -> Tuple[Dict[str, Any], Dict[str, Any]]:
|
||||
# # Hotfix, see: https://github.com/ets-labs/python-dependency-injector/issues/362
|
||||
if GenericAlias and fn is GenericAlias:
|
||||
# Hotfix, see:
|
||||
# - https://github.com/ets-labs/python-dependency-injector/issues/362
|
||||
# - https://github.com/ets-labs/python-dependency-injector/issues/398
|
||||
if GenericAlias and any((
|
||||
fn is GenericAlias,
|
||||
getattr(fn, '__func__', None) is GenericAlias
|
||||
)):
|
||||
fn = fn.__init__
|
||||
|
||||
signature = inspect.signature(fn)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import sys
|
||||
|
||||
from fastapi import FastAPI, Depends
|
||||
from fastapi import Request # See: https://github.com/ets-labs/python-dependency-injector/issues/398
|
||||
from fastapi.security import HTTPBasic, HTTPBasicCredentials
|
||||
from dependency_injector import containers, providers
|
||||
from dependency_injector.wiring import inject, Provide
|
||||
|
|
Loading…
Reference in New Issue
Block a user