File tree Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change 1
1
import enum
2
2
import operator
3
- import warnings
4
3
from abc import ABCMeta , abstractmethod
5
4
from collections .abc import Iterable
6
5
@@ -58,12 +57,6 @@ class PortLike(metaclass=ABCMeta):
58
57
:class:`amaranth.hdl.IOPort` is not an instance of :class:`amaranth.lib.io.PortLike`.
59
58
"""
60
59
61
- # TODO(amaranth-0.6): remove
62
- def __init_subclass__ (cls ):
63
- if cls .__add__ is PortLike .__add__ :
64
- warnings .warn (f"{ cls .__module__ } .{ cls .__qualname__ } must override the `__add__` method" ,
65
- DeprecationWarning , stacklevel = 2 )
66
-
67
60
@property
68
61
@abstractmethod
69
62
def direction (self ):
@@ -115,8 +108,7 @@ def __invert__(self):
115
108
"""
116
109
raise NotImplementedError # :nocov:
117
110
118
- # TODO(amaranth-0.6): make abstract
119
- # @abstractmethod
111
+ @abstractmethod
120
112
def __add__ (self , other ):
121
113
"""Concatenates two library I/O ports of the same type.
122
114
Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ def test_and(self):
30
30
Direction .Bidir & 3
31
31
32
32
33
- class PortLikeTestCase (FHDLTestCase ):
34
- def test_warn___add__ (self ):
35
- with self .assertWarnsRegex (DeprecationWarning ,
36
- r"WrongPortLike must override the `__add__` method$" ):
37
- class WrongPortLike (PortLike ):
38
- pass
39
-
40
-
41
33
class SingleEndedPortTestCase (FHDLTestCase ):
42
34
def test_construct (self ):
43
35
io = IOPort (4 )
You can’t perform that action at this time.
0 commit comments