mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 11:51:39 +03:00
Deprecate provider.delegate() method
This commit is contained in:
parent
5d4eeb648a
commit
42b0bde8d2
|
@ -13,6 +13,7 @@ follows `Semantic versioning`_
|
|||
- Deprecate ``ext.aiohttp`` module.
|
||||
- Deprecate ``ext.flask`` module.
|
||||
- Remove deprecated ``types`` module.
|
||||
- Deprecate ``.delegate()`` provider method in favor of ``.provider`` attribute.
|
||||
- Add ``sanic`` example.
|
||||
- Update ``aiohttp`` example.
|
||||
- Update ``flask`` example.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,7 @@ import re
|
|||
import sys
|
||||
import types
|
||||
import threading
|
||||
import warnings
|
||||
import weakref
|
||||
|
||||
try:
|
||||
|
@ -257,6 +258,11 @@ cdef class Provider(object):
|
|||
|
||||
:rtype: :py:class:`Delegate`
|
||||
"""
|
||||
warnings.warn(
|
||||
'Method ".delegate()" is deprecated since version 4.0.0. '
|
||||
'Use ".provider" attribute instead.',
|
||||
category=DeprecationWarning,
|
||||
)
|
||||
return Delegate(self)
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue
Block a user