Bug 2022394 - python-pyrad fails to build with Python 3.11: AttributeError: 'BiDictTests' object has no attribute 'assertEquals'
Summary: python-pyrad fails to build with Python 3.11: AttributeError: 'BiDictTests' o...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyrad
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-11 14:46 UTC by Tomáš Hrnčiar
Modified: 2022-02-10 14:18 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-02-10 14:17:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7325 0 None None None 2021-11-11 14:50:34 UTC

Description Tomáš Hrnčiar 2021-11-11 14:46:45 UTC
python-pyrad fails to build with Python 3.11.0a2.


======================================================================
ERROR: testItemAccessor (pyrad.tests.testBidict.BiDictTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testBidict.py", line 55, in testItemAccessor
    self.assertEquals(self.bidict["shake"], "vanilla")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BiDictTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testNamedParameters (pyrad.tests.testClient.ConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 45, in testNamedParameters
    self.failUnless(client.server is self.server)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testParameterOrder (pyrad.tests.testClient.ConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 34, in testParameterOrder
    self.failUnless(client.server is self.server)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testSimpleConstruction (pyrad.tests.testClient.ConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 23, in testSimpleConstruction
    self.failUnless(client.server is self.server)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testCreateAcctPacket (pyrad.tests.testClient.OtherTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 175, in testCreateAcctPacket
    self.failUnless(isinstance(packet, AcctPacket))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'OtherTests' object has no attribute 'failUnless'

======================================================================
ERROR: testCreateAuthPacket (pyrad.tests.testClient.OtherTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 168, in testCreateAuthPacket
    self.failUnless(isinstance(packet, AuthPacket))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'OtherTests' object has no attribute 'failUnless'

======================================================================
ERROR: testAuthDelay (pyrad.tests.testClient.SocketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 122, in testAuthDelay
    self.failIf("Acct-Delay-Time" in packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SocketTests' object has no attribute 'failIf'

======================================================================
ERROR: testReopen (pyrad.tests.testClient.SocketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 66, in testReopen
    self.failUnless(sock is self.client._socket)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SocketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testValidReply (pyrad.tests.testClient.SocketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testClient.py", line 151, in testValidReply
    self.failUnless(reply is packet.reply)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SocketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testBeginVendorParsing (pyrad.tests.testDictionary.DictionaryParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 246, in testBeginVendorParsing
    self.assertEquals(self.dict.attrindex['Test-Type'], (42, 1))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictionaryParsingTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testDictFileParseError (pyrad.tests.testDictionary.DictionaryParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/dictionary.py", line 243, in __ParseValue
    adef = self.attributes[attr]
           ~~~~~~~~~~~~~~~^^^^^^
KeyError: 'Not-Defined'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 299, in testDictFileParseError
    tmpdict.ReadDictionary(os.path.join(self.path, 'dictfiletest'))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/dictionary.py", line 361, in ReadDictionary
    self.__ParseValue(state, tokens, False)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/dictionary.py", line 248, in __ParseValue
    raise ParseError('Value defined for unknown attribute ' + attr,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.dictionary.ParseError: dictfiletest(3): Parse error: Value defined for unknown attribute Not-Defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 301, in testDictFileParseError
    self.assertEquals('dictfiletest' in str(e), True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictionaryParsingTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testDictFilePostParse (pyrad.tests.testDictionary.DictionaryParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 293, in testDictFilePostParse
    self.assertEquals(f.File(), '')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictionaryParsingTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testEndVendorParsing (pyrad.tests.testDictionary.DictionaryParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 273, in testEndVendorParsing
    self.assertEquals(self.dict.attrindex['Test-Type'], 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictionaryParsingTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testVendorParsing (pyrad.tests.testDictionary.DictionaryParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testDictionary.py", line 191, in testVendorParsing
    self.assertEquals(self.dict.attrindex['Test-Type'], (42, 1))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictionaryParsingTests' object has no attribute 'assertEquals'

======================================================================
ERROR: testCreateAcctPacket (pyrad.tests.testHost.PacketCreationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testHost.py", line 47, in testCreateAcctPacket
    self.failUnless(isinstance(packet, AcctPacket))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketCreationTests' object has no attribute 'failUnless'

======================================================================
ERROR: testCreateAuthPacket (pyrad.tests.testHost.PacketCreationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testHost.py", line 41, in testCreateAuthPacket
    self.failUnless(isinstance(packet, AuthPacket))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketCreationTests' object has no attribute 'failUnless'

======================================================================
ERROR: testCreatePacket (pyrad.tests.testHost.PacketCreationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testHost.py", line 35, in testCreatePacket
    self.failUnless(isinstance(packet, Packet))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketCreationTests' object has no attribute 'failUnless'

======================================================================
ERROR: testSendPacket (pyrad.tests.testHost.PacketSendTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testHost.py", line 81, in testSendPacket
    self.failUnless(self.fd.data is self.packet.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketSendTest' object has no attribute 'failUnless'

======================================================================
ERROR: testSendReplyPacket (pyrad.tests.testHost.PacketSendTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testHost.py", line 86, in testSendReplyPacket
    self.failUnless(self.fd.data is self.packet.replypacket)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketSendTest' object has no attribute 'failUnless'

======================================================================
ERROR: testBasicConstructor (pyrad.tests.testPacket.AcctPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 26, in testBasicConstructor
    self.failUnless(isinstance(pkt.code, int))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructWithDictionary (pyrad.tests.testPacket.AcctPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 42, in testConstructWithDictionary
    self.failUnless(pkt.dict is self.dict)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructorIgnoredParameters (pyrad.tests.testPacket.AcctPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 47, in testConstructorIgnoredParameters
    self.failIf(getattr(pkt, 'fd', None) is marker)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketConstructionTests' object has no attribute 'failIf'

======================================================================
ERROR: testRequestPacketSetsId (pyrad.tests.testPacket.AcctPacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 413, in testRequestPacketSetsId
    self.failUnless(self.packet.id is not None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testBasicConstructor (pyrad.tests.testPacket.AuthPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 26, in testBasicConstructor
    self.failUnless(isinstance(pkt.code, int))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructWithDictionary (pyrad.tests.testPacket.AuthPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 42, in testConstructWithDictionary
    self.failUnless(pkt.dict is self.dict)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructorIgnoredParameters (pyrad.tests.testPacket.AuthPacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 47, in testConstructorIgnoredParameters
    self.failIf(getattr(pkt, 'fd', None) is marker)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketConstructionTests' object has no attribute 'failIf'

======================================================================
ERROR: testPwCryptSetsAuthenticator (pyrad.tests.testPacket.AuthPacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 354, in testPwCryptSetsAuthenticator
    self.failUnless(self.packet.authenticator is not None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testRequestPacketCreatesAuthenticator (pyrad.tests.testPacket.AuthPacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 337, in testRequestPacketCreatesAuthenticator
    self.failUnless(self.packet.authenticator is not None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testRequestPacketCreatesID (pyrad.tests.testPacket.AuthPacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 342, in testRequestPacketCreatesID
    self.failUnless(self.packet.id is not None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testBasicConstructor (pyrad.tests.testPacket.PacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 26, in testBasicConstructor
    self.failUnless(isinstance(pkt.code, int))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructWithDictionary (pyrad.tests.testPacket.PacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 42, in testConstructWithDictionary
    self.failUnless(pkt.dict is self.dict)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketConstructionTests' object has no attribute 'failUnless'

======================================================================
ERROR: testConstructorIgnoredParameters (pyrad.tests.testPacket.PacketConstructionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 47, in testConstructorIgnoredParameters
    self.failIf(getattr(pkt, 'fd', None) is marker)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketConstructionTests' object has no attribute 'failIf'

======================================================================
ERROR: testCreateAuthenticator (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 133, in testCreateAuthenticator
    self.failUnless(isinstance(a, six.binary_type))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testDecodePacketWithBadAttribute (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 260, in testDecodePacketWithBadAttribute
    self.packet.DecodePacket(
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 345, in DecodePacket
    raise PacketError(
    ^^^^^^^^^^^^^^^^^^
pyrad.packet.PacketError: Attribute length is too small (1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 263, in testDecodePacketWithBadAttribute
    self.failUnless('too small' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testDecodePacketWithEmptyPacket (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 327, in DecodePacket
    struct.unpack('!BBH16s', packet[0:20])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 20 bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 220, in testDecodePacketWithEmptyPacket
    self.packet.DecodePacket(six.b(''))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 329, in DecodePacket
    raise PacketError('Packet header is corrupt')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.packet.PacketError: Packet header is corrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 222, in testDecodePacketWithEmptyPacket
    self.failUnless('header is corrupt' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testDecodePacketWithInvalidLength (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 228, in testDecodePacketWithInvalidLength
    self.packet.DecodePacket(six.b('\x00\x00\x00\x001234567890123456'))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 331, in DecodePacket
    raise PacketError('Packet has invalid length')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.packet.PacketError: Packet has invalid length

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 230, in testDecodePacketWithInvalidLength
    self.failUnless('invalid length' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testDecodePacketWithPartialAttributes (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 340, in DecodePacket
    (key, attrlen) = struct.unpack('!BB', packet[0:2])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 244, in testDecodePacketWithPartialAttributes
    self.packet.DecodePacket(
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 342, in DecodePacket
    raise PacketError('Attribute header is corrupt')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.packet.PacketError: Attribute header is corrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 247, in testDecodePacketWithPartialAttributes
    self.failUnless('header is corrupt' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testDecodePacketWithTooBigPacket (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 236, in testDecodePacketWithTooBigPacket
    self.packet.DecodePacket(six.b('\x00\x00\x24\x00') + (0x2400 - 4) * six.b('X'))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/packet.py", line 333, in DecodePacket
    raise PacketError('Packet length is too long (%d)' % length)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.packet.PacketError: Packet length is too long (9216)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 238, in testDecodePacketWithTooBigPacket
    self.failUnless('too long' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testGenerateID (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 141, in testGenerateID
    self.failUnless(isinstance(id, int))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testRawAttributeAccess (pyrad.tests.testPacket.PacketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 97, in testRawAttributeAccess
    self.failUnless(self.packet[1] is marker)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testGenerateID (pyrad.tests.testPacket.UtilityTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testPacket.py", line 12, in testGenerateID
    self.failUnless(isinstance(id, int))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'UtilityTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleProxyPacketHandlesWrongPacket (pyrad.tests.testProxy.ProxyPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testProxy.py", line 64, in testHandleProxyPacketHandlesWrongPacket
    self.proxy._HandleProxyPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/proxy.py", line 45, in _HandleProxyPacket
    raise ServerPacketError('Received non-response on proxy socket')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received non-response on proxy socket

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testProxy.py", line 66, in testHandleProxyPacketHandlesWrongPacket
    self.failUnless('non-response' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ProxyPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleProxyPacketUnknownHost (pyrad.tests.testProxy.ProxyPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testProxy.py", line 51, in testHandleProxyPacketUnknownHost
    self.proxy._HandleProxyPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/proxy.py", line 40, in _HandleProxyPacket
    raise ServerPacketError('Received packet from unknown host')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received packet from unknown host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testProxy.py", line 53, in testHandleProxyPacketUnknownHost
    self.failUnless('unknown host' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ProxyPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testProxyFd (pyrad.tests.testProxy.SocketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testProxy.py", line 33, in testProxyFd
    self.failUnless(isinstance(self.proxy._proxyfd, MockSocket))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SocketTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAcctPacket (pyrad.tests.testServer.AcctPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 212, in testHandleAcctPacket
    self.failUnless(self.server.handled is self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAcctPacketUnknownHost (pyrad.tests.testServer.AcctPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 190, in testHandleAcctPacketUnknownHost
    self.server._HandleAcctPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/server.py", line 201, in _HandleAcctPacket
    raise ServerPacketError('Received packet from unknown host')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received packet from unknown host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 192, in testHandleAcctPacketUnknownHost
    self.failUnless('unknown host' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAcctPacketWrongPort (pyrad.tests.testServer.AcctPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 199, in testHandleAcctPacketWrongPort
    self.server._HandleAcctPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/server.py", line 206, in _HandleAcctPacket
    raise ServerPacketError(
    ^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received non-accounting packet on accounting port

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 201, in testHandleAcctPacketWrongPort
    self.failUnless('port' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AcctPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAuthPacket (pyrad.tests.testServer.AuthPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 173, in testHandleAuthPacket
    self.failUnless(self.server.handled is self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAuthPacketUnknownHost (pyrad.tests.testServer.AuthPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 151, in testHandleAuthPacketUnknownHost
    self.server._HandleAuthPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/server.py", line 183, in _HandleAuthPacket
    raise ServerPacketError('Received packet from unknown host')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received packet from unknown host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 153, in testHandleAuthPacketUnknownHost
    self.failUnless('unknown host' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testHandleAuthPacketWrongPort (pyrad.tests.testServer.AuthPacketHandlingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 160, in testHandleAuthPacketWrongPort
    self.server._HandleAuthPacket(self.packet)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/server.py", line 187, in _HandleAuthPacket
    raise ServerPacketError(
    ^^^^^^^^^^^^^^^^^^^^^^^^
pyrad.server.ServerPacketError: Received non-authentication packet on authentication port

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 162, in testHandleAuthPacketWrongPort
    self.failUnless('port' in str(e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AuthPacketHandlingTests' object has no attribute 'failUnless'

======================================================================
ERROR: testCreateReplyPacket (pyrad.tests.testServer.OtherTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 235, in testCreateReplyPacket
    self.failUnless(isinstance(reply, TrivialObject))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'OtherTests' object has no attribute 'failUnless'


RPM build errors:

======================================================================
ERROR: testRunInitializes (pyrad.tests.testServer.ServerRunTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 278, in testRunInitializes
    self.failUnless(isinstance(self.server._fdmap, dict))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ServerRunTests' object has no attribute 'failUnless'

======================================================================
ERROR: testGrabPacket (pyrad.tests.testServer.SocketTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyrad-2.1/pyrad/tests/testServer.py", line 103, in testGrabPacket
    self.failUnless(isinstance(pkt, TrivialObject))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SocketTests' object has no attribute 'failUnless'

----------------------------------------------------------------------
Ran 179 tests in 9.065s

FAILED (errors=53)

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).

    Undocumented and broken TestCase method assertDictContainsSubset (deprecated in Python 3.2).

    Undocumented <unittest.TestLoader.loadTestsFromModule> TestLoader.loadTestsFromModule() parameter use_load_tests (deprecated and ignored since Python 3.2).

    An alias of the TextTestResult class: _TextTestResult (deprecated in Python 3.2).

(Contributed by Serhiy Storchaka in bpo-45162.)

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/02940499-python-pyrad/

For all our attempts to build python-pyrad with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pyrad/

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.

Comment 1 Ben Cotton 2022-02-08 21:28:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Tomáš Hrnčiar 2022-02-10 14:17:51 UTC
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.

Comment 3 Tomáš Hrnčiar 2022-02-10 14:18:24 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.