Skip to content

Commit ba10f96

Browse files
committed
fix issue ebroecker#547
DeprecationWarning: The usage of `cmp` is deprecated and will be removed on or after 2021-06-01. Please use `eq` and `order` instead. @attr.s(cmp=False) Signed-off-by: An Nguyen <[email protected]>
1 parent 16a6878 commit ba10f96

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

appveyor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ environment:
1111
- TOXENV: py36
1212
- TOXENV: py37
1313
- TOXENV: py38
14+
- TOXENV: py39
1415
- TOXENV: pypy3
1516

1617
matrix:

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
attrs>=18.1.0
1+
attrs>=19.2.0
22
click
33
enum34; python_version < '3.4'
44
future

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
Programming Language :: Python :: 3.5
5656
Programming Language :: Python :: 3.6
5757
Programming Language :: Python :: 3.7
58+
Programming Language :: Python :: 3.8
59+
Programming Language :: Python :: 3.9
5860
"""
5961

6062
from setuptools import find_packages, setup
@@ -77,7 +79,7 @@
7779
license = "BSD",
7880
platforms = ["any"],
7981
install_requires = [
80-
"attrs>=18.1.0",
82+
"attrs>=19.2.0",
8183
"click",
8284
"enum34; python_version < '3.4'",
8385
"future",

src/canmatrix/canmatrix.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def normalize_value_table(table): # type: (typing.Mapping) -> typing.MutableMap
121121
return {int(k): v for k, v in table.items()}
122122

123123

124-
@attr.s(cmp=False)
124+
@attr.s(eq=False)
125125
class Signal(object):
126126
"""
127127
Represents a Signal in CAN Matrix.
@@ -449,7 +449,7 @@ def __str__(self): # type: () -> str
449449
return self.name
450450

451451

452-
@attr.s(cmp=False)
452+
@attr.s(eq=False)
453453
class SignalGroup(object):
454454
"""
455455
Represents signal-group, containing multiple Signals.
@@ -746,7 +746,7 @@ def __eq__(self, other):
746746
)
747747
)
748748

749-
@attr.s(cmp=False)
749+
@attr.s(eq=False)
750750
class Pdu(object):
751751
"""
752752
Represents a PDU.
@@ -814,7 +814,7 @@ def signal_by_name(self, name):
814814
return None
815815

816816

817-
@attr.s(cmp=False)
817+
@attr.s(eq=False)
818818
class Frame(object):
819819
"""
820820
Represents CAN Frame.
@@ -1519,7 +1519,7 @@ class matrix_class(enum.Enum):
15191519
FLEXRAY = 2
15201520
SOMEIP = 3
15211521

1522-
@attr.s(cmp=False)
1522+
@attr.s(eq=False)
15231523
class CanMatrix(object):
15241524
"""
15251525
The Can-Matrix-Object

0 commit comments

Comments
 (0)