python-alarmdecoder fails to build with Python 3.11.0a1. =================================== FAILURES =================================== _____________________ TestAlarmDecoder.test_config_message _____________________ self = <test_ad2.TestAlarmDecoder testMethod=test_config_message> def test_config_message(self): msg = self._decoder._handle_message(b'!CONFIG>MODE=A&CONFIGBITS=ff04&ADDRESS=18&LRR=N&COM=N&EXP=NNNNN&REL=NNNN&MASK=ffffffff&DEDUPLICATE=N') > self.assertEquals(self._decoder.mode, ADEMCO) E AttributeError: 'TestAlarmDecoder' object has no attribute 'assertEquals' test/test_ad2.py:232: AttributeError _________________ TestAlarmDecoder.test_zone_fault_and_restore _________________ self = <test_ad2.TestAlarmDecoder testMethod=test_zone_fault_and_restore> def test_zone_fault_and_restore(self): self._decoder._on_read(self, data=b'[00010001000000000A--],003,[f70000051003000008020000000000],"FAULT 03 "') > self.assertEquals(self._zone_faulted, 3) E AttributeError: 'TestAlarmDecoder' object has no attribute 'assertEquals' test/test_ad2.py:357: AttributeError _______________________ TestSerialDevice.test_read_line ________________________ self = <test_devices.TestSerialDevice testMethod=test_read_line> def test_read_line(self): side_effect = list("testing\r\n") if sys.version_info > (3,): side_effect = [chr(x).encode('utf-8') for x in b"testing\r\n"] with patch.object(self._device._device, 'read', side_effect=side_effect): with patch('serial.Serial.fileno', return_value=1): with patch.object(select, 'select', return_value=[[1], [], []]): ret = None try: ret = self._device.read_line() except StopIteration: pass > self.assertEquals(ret, "testing") E AttributeError: 'TestSerialDevice' object has no attribute 'assertEquals' test/test_devices.py:112: AttributeError _______________________ TestSocketDevice.test_read_line ________________________ self = <test_devices.TestSocketDevice testMethod=test_read_line> def test_read_line(self): side_effect = list("testing\r\n") if sys.version_info > (3,): side_effect = [chr(x).encode('utf-8') for x in b"testing\r\n"] with patch('socket.socket.fileno', return_value=1): with patch.object(select, 'select', return_value=[[1], [], []]): with patch.object(self._device._device, 'recv', side_effect=side_effect): ret = None try: ret = self._device.read_line() except StopIteration: pass > self.assertEquals(ret, "testing") E AttributeError: 'TestSocketDevice' object has no attribute 'assertEquals' test/test_devices.py:207: AttributeError __________________ TestMessages.test_lrr_event_code_override ___________________ self = <test_messages.TestMessages testMethod=test_lrr_event_code_override> def test_lrr_event_code_override(self): msg = LRRMessage('!LRR:001,1,CID_3400,01') > self.assertEquals(msg.event_code, LRR_CID_EVENT.OPENCLOSE_BY_USER) # 400 -> 401 E AttributeError: 'TestMessages' object has no attribute 'assertEquals' test/test_messages.py:88: AttributeError ____________________ TestMessages.test_lrr_message_parse_v2 ____________________ self = <test_messages.TestMessages testMethod=test_lrr_message_parse_v2> def test_lrr_message_parse_v2(self): msg = LRRMessage('!LRR:001,1,CID_3401,ff') self.assertIsInstance(msg, LRRMessage) > self.assertEquals(msg.event_data, '001') E AttributeError: 'TestMessages' object has no attribute 'assertEquals' test/test_messages.py:78: AttributeError =========================== short test summary info ============================ FAILED test/test_ad2.py::TestAlarmDecoder::test_config_message - AttributeErr... FAILED test/test_ad2.py::TestAlarmDecoder::test_zone_fault_and_restore - Attr... FAILED test/test_devices.py::TestSerialDevice::test_read_line - AttributeErro... FAILED test/test_devices.py::TestSocketDevice::test_read_line - AttributeErro... FAILED test/test_messages.py::TestMessages::test_lrr_event_code_override - At... FAILED test/test_messages.py::TestMessages::test_lrr_message_parse_v2 - Attri... ================== 6 failed, 62 passed, 2 deselected in 0.45s ================== Removed many old deprecated unittest features: TestCase method aliases failUnlessEqual, failIfEqual, failUnless, failIf, failUnlessRaises, failUnlessAlmostEqual, failIfAlmostEqual (deprecated in Python 3.1), assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals, assertRegexpMatches, assertRaisesRegexp (deprecated in Python 3.2), and assertNotRegexpMatches (deprecated in Python 3.5). https://bugs.python.org/issue45162 https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02909730-python-alarmdecoder/ For all our attempts to build python-alarmdecoder with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-alarmdecoder/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
Removal of unittest aliases was reverted in Python 3.11 and will be part of Python 3.12, so the above failure is not present anymore, thus I am closing this bugzilla. However, this will be needed next year though so I encourage you to communicate with the upstream about it.