Bug 2175196 - python-signedjson fails to build with Python 3.12: AttributeError: 'DecodeTestCase' object has no attribute 'assertEquals'
Summary: python-signedjson fails to build with Python 3.12: AttributeError: 'DecodeTes...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-signedjson
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ali Erdinc Koroglu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12 2220036
TreeView+ depends on / blocked
 
Reported: 2023-03-03 14:11 UTC by Tomáš Hrnčiar
Modified: 2023-07-28 15:22 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-28 15:22:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-03-03 14:11:03 UTC
python-signedjson fails to build with Python 3.12.0a5.

======================================================================
ERROR: test_decode (tests.test_key.DecodeTestCase.test_decode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_key.py", line 38, in test_decode
    self.assertEquals(decoded_key.alg, "ed25519")
    ^^^^^^^^^^^^^^^^^
AttributeError: 'DecodeTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_decode_verify_key (tests.test_key.DecodeTestCase.test_decode_verify_key)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_key.py", line 57, in test_decode_verify_key
    self.assertEquals(decoded_key.alg, "ed25519")
    ^^^^^^^^^^^^^^^^^
AttributeError: 'DecodeTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_read_keys (tests.test_key.DecodeTestCase.test_read_keys)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_key.py", line 75, in test_read_keys
    self.assertEquals(len(keys), 1)
    ^^^^^^^^^^^^^^^^^
AttributeError: 'DecodeTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_read_old_keys (tests.test_key.DecodeTestCase.test_read_old_keys)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_key.py", line 80, in test_read_old_keys
    self.assertEquals(len(keys), 1)
    ^^^^^^^^^^^^^^^^^
AttributeError: 'DecodeTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_generate_key (tests.test_key.GenerateTestCase.test_generate_key)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_key.py", line 22, in test_generate_key
    self.assertEquals(my_key.alg, "ed25519")
    ^^^^^^^^^^^^^^^^^
AttributeError: 'GenerateTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_sign_minimal (tests.test_known_key.KnownKeyTestCase.test_sign_minimal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_known_key.py", line 44, in test_sign_minimal
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^
AttributeError: 'KnownKeyTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

======================================================================
ERROR: test_sign_with_data (tests.test_known_key.KnownKeyTestCase.test_sign_with_data)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/signedjson-1.1.1/tests/test_known_key.py", line 57, in test_sign_with_data
    self.assertEquals(
    ^^^^^^^^^^^^^^^^^
AttributeError: 'KnownKeyTestCase' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

----------------------------------------------------------------------
Ran 23 tests in 0.036s

FAILED (errors=7)

Removed many old deprecated unittest features:

    - A number of TestCase method aliases:

    | Deprecated alias      |  Method Name           | Deprecated in |
    +-----------------------|------------------------|---------------+
    | failUnless            | assertTrue()           |      3.1      |
    | failIf                | assertFalse()          |      3.1      |
    | failUnlessEqual       | assertEqual()          |      3.1      |
    | failIfEqual           | assertNotEqual()       |      3.1      |
    | failUnlessAlmostEqual | assertAlmostEqual()    |      3.1      |
    | failIfAlmostEqual     | assertNotAlmostEqual() |      3.1      |
    | failUnlessRaises      | assertRaises()         |      3.1      |
    | assert_               | assertTrue()           |      3.2      |
    | assertEquals          | assertEqual()          |      3.2      |
    | assertNotEquals       | assertNotEqual()       |      3.2      |
    | assertAlmostEquals    | assertAlmostEqual()    |      3.2      |
    | assertNotAlmostEquals | assertNotAlmostEqual() |      3.2      |
    | assertRegexpMatches   | assertRegex()          |      3.2      |
    | assertRaisesRegexp    | assertRaisesRegex()    |      3.2      |
    | assertNotRegexpMatches| assertNotRegex()       |      3.5      |
    +-----------------------|------------------------|---------------+

    You can use https://github.com/isidentical/teyit to automatically modernise your unit tests.

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

    - Undocumented 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/issue?@action=redirect&bpo=45162



https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05577095-python-signedjson/

For all our attempts to build python-signedjson with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-signedjson/

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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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.


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