diff --git a/CHANGELOG.md b/CHANGELOG.md index d7301c4..4221fde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.1] - 2023-03-14 :croissant: +- Removes the strict requirement for resolved classes to have `__init__` + methods defined, to add support for `Protocol`s that do not define an + `__init__` method (thus using `*args`, `**kwargs`, + [akhundMurad](https://github.com/akhundMurad)'s contribution. +- Corrects a code smell, replacing an `i` counter with `enumerate`, + [GLEF1X](https://github.com/GLEF1X)'s contribution. + ## [2.0.0] - 2023-01-07 :star: - Introduces a `ContainerProtocol` to improve interoperability between libraries and alternative implementations of DI containers. The protocol is diff --git a/rodi/__about__.py b/rodi/__about__.py index 8c0d5d5..159d48b 100644 --- a/rodi/__about__.py +++ b/rodi/__about__.py @@ -1 +1 @@ -__version__ = "2.0.0" +__version__ = "2.0.1" diff --git a/tests/test_services.py b/tests/test_services.py index 10ec4ca..0b2401b 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -7,7 +7,6 @@ Iterable, List, Mapping, - Protocol, Sequence, Tuple, Type, @@ -86,6 +85,13 @@ T_1 = TypeVar("T_1") +try: + from typing import Protocol +except ImportError: # pragma: no cover + # support for Python 3.7 + from typing_extensions import Protocol + + class LoggedVar(Generic[T_1]): def __init__(self, value: T_1, name: str) -> None: self.name = name