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 11import enum
22import operator
3- import warnings
43from abc import ABCMeta , abstractmethod
54from collections .abc import Iterable
65
@@ -58,12 +57,6 @@ class PortLike(metaclass=ABCMeta):
5857 :class:`amaranth.hdl.IOPort` is not an instance of :class:`amaranth.lib.io.PortLike`.
5958 """
6059
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-
6760 @property
6861 @abstractmethod
6962 def direction (self ):
@@ -115,8 +108,7 @@ def __invert__(self):
115108 """
116109 raise NotImplementedError # :nocov:
117110
118- # TODO(amaranth-0.6): make abstract
119- # @abstractmethod
111+ @abstractmethod
120112 def __add__ (self , other ):
121113 """Concatenates two library I/O ports of the same type.
122114
Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ def test_and(self):
3030 Direction .Bidir & 3
3131
3232
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-
4133class SingleEndedPortTestCase (FHDLTestCase ):
4234 def test_construct (self ):
4335 io = IOPort (4 )
You can’t perform that action at this time.
0 commit comments