Skip to content

Commit 4b5a1e1

Browse files
authored
Fix error with cannot inherit frozen dataclass from a non-frozen one. Make Event class more strict by set frozen true (#258)
1 parent 9dea328 commit 4b5a1e1

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

CHANGELOG.md

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

7+
## [15.2.1] - 2023-02-16
8+
### Changed
9+
- winter.messaging: set frozen=true for Event class
10+
711
## [15.2.0] - 2023-02-15
812
### Added
913
- winter.web.throttling: function allows to reset the accumulated throttling state for a specific user and scope

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "winter"
3-
version = "15.2.0"
3+
version = "15.2.1"
44
homepage = "https://github.com/WinterFramework/winter"
55
description = "Web Framework inspired by Spring Framework"
66
authors = ["Alexander Egorov <[email protected]>"]

tests/messaging/events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
from winter.messaging import Event
44

55

6-
@dataclass
6+
@dataclass(frozen=True)
77
class Event1(Event):
88
x: int
99

1010

11-
@dataclass
11+
@dataclass(frozen=True)
1212
class Event2(Event):
1313
x: int
1414

1515

16-
@dataclass
16+
@dataclass(frozen=True)
1717
class Event3(Event):
1818
x: int

winter/messaging/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dataclasses import dataclass
22

33

4-
@dataclass
4+
@dataclass(frozen=True)
55
class Event:
66
pass

0 commit comments

Comments
 (0)