Bug 2026334 - python-idstools fails to build with Python 3.11: AttributeError: 'ClassificationMapTestCase' object has no attribute 'assertEquals'
Summary: python-idstools fails to build with Python 3.11: AttributeError: 'Classificat...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-idstools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: marcindulak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-24 11:57 UTC by Tomáš Hrnčiar
Modified: 2021-12-25 19:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-12-25 19:53:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-24 11:57:48 UTC
python-idstools fails to build with Python 3.11.0a2.

======================================================================
ERROR: test_load_from_file (test_classificationmap.ClassificationMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_classificationmap.py", line 13, in test_load_from_file
    self.assertEquals(None, m.get(0))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ClassificationMapTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_add_option (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 127, in test_add_option
    self.assertEquals("This is a test description.", rule["msg"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_disable_rule (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 59, in test_disable_rule
    self.assertEquals(rule.raw, """alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"some message";)""")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_multiline_rule (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 115, in test_multiline_rule
    self.assertEquals(len(rules), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse1 (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 51, in test_parse1
    self.assertEquals(rule.flowbits[0], "isset,somebit")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_decoder_rule (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 107, in test_parse_decoder_rule
    self.assertEquals(rule["direction"], None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_file (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 99, in test_parse_file
    self.assertEquals(2, len(rules))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_fileobj (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 89, in test_parse_fileobj
    self.assertEquals(2, len(rules))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_message_with_colon (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 184, in test_parse_message_with_colon
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_message_with_semicolon (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 170, in test_parse_message_with_semicolon
    self.assertEquals(rule.msg, "TEST RULE\; and some")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_nomsg (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 120, in test_parse_nomsg
    self.assertEquals("", rule["msg"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_rule_comments_and_spaces (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 72, in test_parse_rule_comments_and_spaces
    self.assertEquals(rule.raw, """alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"some message";)""")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_parse_rule_double_commented (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 66, in test_parse_rule_double_commented
    self.assertEquals(rule.raw, """alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"some message";)""")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_remove_option (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 135, in test_remove_option
    self.assertEquals("", rule["msg"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_scratch (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 149, in test_scratch
    self.assertEquals(rule_string, str(rule))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_toggle_rule (test_rule.RuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rule.py", line 79, in test_toggle_rule
    self.assertEquals(str(rule), """alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"some message";)""")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuleTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_disabled_rule (test_rulecat.DropRuleFilterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 277, in test_disabled_rule
    self.assertEquals("drop", rule1.action)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DropRuleFilterTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
root: DEBUG: Parsing ID matcher: 2020757
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_enabled_rule (test_rulecat.DropRuleFilterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 265, in test_enabled_rule
    self.assertEquals("drop", rule1.action)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DropRuleFilterTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
root: DEBUG: Parsing ID matcher: 2020757
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_match (test_rulecat.FilenameMatcherTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 250, in test_match
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'FilenameMatcherTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
root: DEBUG: Parsing ID matcher: trojan.rules
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_match (test_rulecat.GroupMatcherTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 239, in test_match
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'GroupMatcherTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
root: DEBUG: Parsing ID matcher: group: */malware.rules
root: DEBUG: Parsing group matcher: group: */malware.rules
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_extract_regex (test_rulecat.ThresholdProcessorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 124, in test_extract_regex
    self.assertEquals("java", processor.extract_regex(line))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ThresholdProcessorTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_replace (test_rulecat.ThresholdProcessorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_rulecat.py", line 146, in test_replace
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'ThresholdProcessorTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_load_generator_map (test_signaturemap.SignatureMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_signaturemap.py", line 14, in test_load_generator_map
    self.assertEquals(1, sig["gid"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SignatureMapTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_load_signature_map (test_signaturemap.SignatureMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_signaturemap.py", line 34, in test_load_signature_map
    self.assertEquals(1, sig["gid"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SignatureMapTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_load_signature_v2_map (test_signaturemap.SignatureMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_signaturemap.py", line 58, in test_load_signature_v2_map
    self.assertEquals(1, sig["gid"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SignatureMapTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_interleaved (test_unified2.AggregatorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 233, in test_interleaved
    self.assertEquals(len(records), 17)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AggregatorTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: Iteration test.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 270, in test_iteration
    self.assertEquals(len(list(reader)), 2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FileEventReaderTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
idstools.unified2: WARNING: idstools.unified2.FileEventReader has been deprecated
idstools.unified2: WARNING: idstools.unified2.Aggregator has been deprecated
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_multi_file_iteration (test_unified2.FileRecordReaderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 171, in test_multi_file_iteration
    self.assertEquals(34, len(records))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FileRecordReaderTest' object has no attribute 'assertEquals'

======================================================================
ERROR: test_single_file_iteration (test_unified2.FileRecordReaderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 164, in test_single_file_iteration
    self.assertEquals(17, len(records))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FileRecordReaderTest' object has no attribute 'assertEquals'

======================================================================
ERROR: Test that when bookmarking is used, a second invocation of
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 475, in test_bookmarking
    self.assertEquals(bookmark_filename, "unified2.log.0000")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SpoolEventReaderTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured stdout << ---------------------
('unified2.log.0000', 38950)

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
idstools.unified2: WARNING: idstools.unified2.SpoolEventReader has been deprecated
idstools.unified2: WARNING: idstools.unified2.Aggregator has been deprecated
idstools.unified2: DEBUG: Opened /tmp/idstools-test.4sl_lcg3/unified2.log.0000.
idstools.unified2: DEBUG: Closed /tmp/idstools-test.4sl_lcg3/unified2.log.0000.
idstools.unified2: DEBUG: Opened /tmp/idstools-test.4sl_lcg3/unified2.log.0001.
idstools.unified2: INFO: Closed file /tmp/idstools-test.4sl_lcg3/unified2.log.0000, opened file /tmp/idstools-test.4sl_lcg3/unified2.log.0001
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_iteration (test_unified2.SpoolRecordReaderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 388, in test_iteration
    self.assertEquals(len(list(reader)), 17)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SpoolRecordReaderTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_open_at_bookmark (test_unified2.SpoolRecordReaderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 407, in test_open_at_bookmark
    self.assertEquals(len(list(reader)), 17)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SpoolRecordReaderTestCase' object has no attribute 'assertEquals'
-------------------- >> begin captured logging << --------------------
idstools.unified2: DEBUG: Opened /tmp/idstools-test.q2bd5q00/unified2.log.0003.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_open_next (test_unified2.SpoolRecordReaderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 299, in test_open_next
    self.assertEquals(None, reader.open_next())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SpoolRecordReaderTestCase' object has no attribute 'assertEquals'

======================================================================
ERROR: test_iteration (test_unified2.TestRecordReader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 148, in test_iteration
    self.assertEquals(len(records), 17)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestRecordReader' object has no attribute 'assertEquals'

======================================================================
ERROR: test_short_read_of_body (test_unified2.TestRecordReader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 126, in test_short_read_of_body
    self.assertEquals(len(buf), 12)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestRecordReader' object has no attribute 'assertEquals'

======================================================================
ERROR: test_short_read_of_header (test_unified2.TestRecordReader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_unified2.py", line 114, in test_short_read_of_header
    self.assertEquals(len(buf), 6)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestRecordReader' object has no attribute 'assertEquals'

======================================================================
ERROR: test_hexdigest (test_util.Md5TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/py-idstools-0.6.4/tests/test_util.py", line 39, in test_hexdigest
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Md5TestCase' object has no attribute 'assertEquals'

----------------------------------------------------------------------
Ran 78 tests in 3.111s

FAILED (SKIP=2, errors=37)

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/02984983-python-idstools/

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

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 marcindulak 2021-11-24 22:55:02 UTC
Reported upstream https://github.com/jasonish/py-idstools/issues/89


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