Add announce of Python 3.5 support dropping

This commit is contained in:
Roman Mogylatov 2021-10-31 21:00:28 -04:00
parent 0b3bcf334e
commit 72d0e2610d
6 changed files with 10732 additions and 10489 deletions

View File

@ -19,6 +19,7 @@ follows `Semantic versioning`_
- Add ``Configuration(pydantic_settings=[...])`` argument.
- Drop support of Python 3.4. There are no immediate breaking changes, but Dependency Injector
will no longer be tested on Python 3.4 and any bugs will not be fixed.
- Announce the date of dropping Python 3.5 support (Jan 1st 2022).
- Fix ``Dependency.is_defined`` attribute to always return boolean value.
- Fix ``envs_required=False`` behavior in ``Configuration.from_*()`` methods
to give a priority to the explicitly provided value.

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ import json
import sys
import importlib
import inspect
import warnings
try:
import asyncio
@ -32,6 +33,14 @@ else:
def unwire(*args, **kwargs):
raise NotImplementedError('Wiring requires Python 3.6 or above')
if sys.version_info[:2] == (3, 5):
warnings.warn(
"Dependency Injector will drop support of Python 3.5 after Jan 1st of 2022. "
"This does not mean that there will be any immediate breaking changes, "
"but tests will no longer be executed on Python 3.5, and bugs will not be addressed.",
category=DeprecationWarning,
)
class WiringConfiguration:
"""Container wiring configuration."""

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,14 @@ else: # pragma: no cover
copy.deepcopy(obj.im_self, memo),
obj.im_class)
if sys.version_info[:2] == (3, 5):
warnings.warn(
"Dependency Injector will drop support of Python 3.5 after Jan 1st of 2022. "
"This does not mean that there will be any immediate breaking changes, "
"but tests will no longer be executed on Python 3.5, and bugs will not be addressed.",
category=DeprecationWarning,
)
config_env_marker_pattern = re.compile(
r'\${(?P<name>[^}^{:]+)(?P<separator>:?)(?P<default>.*?)}',
)

View File

@ -6,6 +6,7 @@ import inspect
import importlib
import importlib.machinery
import pkgutil
import warnings
import sys
from types import ModuleType
from typing import (
@ -58,6 +59,14 @@ except ImportError:
from . import providers
if sys.version_info[:2] == (3, 5):
warnings.warn(
"Dependency Injector will drop support of Python 3.5 after Jan 1st of 2022. "
"This does not mean that there will be any immediate breaking changes, "
"but tests will no longer be executed on Python 3.5, and bugs will not be addressed.",
category=DeprecationWarning,
)
__all__ = (
'wire',
'unwire',