Skip to content

Commit ee55453

Browse files
v2.0.1 🥐
1 parent 57223e2 commit ee55453

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.1] - 2023-03-14 :croissant:
9+
- Removes the strict requirement for resolved classes to have `__init__`
10+
methods defined, to add support for `Protocol`s that do not define an
11+
`__init__` method (thus using `*args`, `**kwargs`,
12+
[akhundMurad](https://github.com/akhundMurad)'s contribution.
13+
- Corrects a code smell, replacing an `i` counter with `enumerate`,
14+
[GLEF1X](https://github.com/GLEF1X)'s contribution.
15+
816
## [2.0.0] - 2023-01-07 :star:
917
- Introduces a `ContainerProtocol` to improve interoperability between
1018
libraries and alternative implementations of DI containers. The protocol is

rodi/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.0"
1+
__version__ = "2.0.1"

tests/test_services.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Iterable,
88
List,
99
Mapping,
10-
Protocol,
1110
Sequence,
1211
Tuple,
1312
Type,
@@ -86,6 +85,13 @@
8685
T_1 = TypeVar("T_1")
8786

8887

88+
try:
89+
from typing import Protocol
90+
except ImportError: # pragma: no cover
91+
# support for Python 3.7
92+
from typing_extensions import Protocol
93+
94+
8995
class LoggedVar(Generic[T_1]):
9096
def __init__(self, value: T_1, name: str) -> None:
9197
self.name = name

0 commit comments

Comments
 (0)