Bug 2033557

Summary: python-javabridge fails to build with Python 3.11: AttributeError: 'TestJutil' object has no attribute 'assertEquals'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-javabridgeAssignee: Raphael Groner <projects.rg>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: hugovk+redhatbugzilla, mhroncok, projects.rg, thrnciar
Target Milestone: ---Keywords: FutureFeature, MoveUpstream, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-javabridge-1.0.19-7.20211221git61942d2.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-23 18:53:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016048    

Description Tomáš Hrnčiar 2021-12-17 09:13:17 UTC
python-javabridge fails to build with Python 3.11.0a3.

======================================================================
ERROR: test_11_01_make_run_dictionary (javabridge.tests.test_jutil.TestJutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_jutil.py", line 623, in test_11_01_make_run_dictionary
    self.assertEquals(d["foo"], "bar")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJutil' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_field (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 98, in test_01_02_field
    self.assertEquals(field, (1 << 15)-1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_03_static_call (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 102, in test_02_03_static_call
    self.assertEquals(c.toString(123), "123")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_04_static_call_varargs (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 110, in test_02_04_static_call_varargs
    self.assertEquals(c.format("Hello, %s.", "world"),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_get_len (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_iterate (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_get_index (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_04_set_index (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_int (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 57, in test_01_01_int
    self.assertEquals(int(self.i), 3)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_float (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 60, in test_01_02_float
    self.assertEquals(float(self.i),3.0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_str (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 63, in test_01_03_str
    self.assertEquals(str(self.i), '3')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_05_return_value (javabridge.tests.test_wrappers.TestJProxy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 166, in test_01_05_return_value
    self.assertEquals(J.JWrapper(proxy.o).call(), "foo")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJProxy' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_init (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 18, in test_01_01_init
    self.assertEquals(jobj, obj.o)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_call_noargs (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 23, in test_01_02_call_noargs
    self.assertEquals(obj.toLowerCase(), "hello, world.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_call_args (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 29, in test_01_03_call_args
    self.assertEquals(result, "Goodbye cruel world.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_01_get_field (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 44, in test_02_01_get_field
    self.assertEquals(obj.x, 1.5)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_02_set_field (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 50, in test_02_02_set_field
    self.assertEquals(obj.x, 2.5)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

----------------------------------------------------------------------
Ran 168 tests in 0.754s

FAILED (errors=17)

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/03058873-python-javabridge/

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

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 Raphael Groner 2021-12-20 05:09:15 UTC
Filed to upstream. Well, there's still enough time to wait for official patch.

In assumption assertEquals method got renamed to assertEqual (without letter s).
https://github.com/LeeKamentsky/python-javabridge/issues/197

Comment 2 Hugo van Kemenade 2022-01-13 12:06:37 UTC
This has been fixed in commit https://github.com/LeeKamentsky/python-javabridge/commit/61942d217dd2edbd0733a99710493e4a993a9e63.

Comment 3 Raphael Groner 2023-01-20 12:15:47 UTC
Upstream provides a fix, see issue #197. Should we do a review to bring back this package into repository?

Comment 4 Miro Hrončok 2023-01-20 12:27:06 UTC
That really is up to you.

Comment 5 Ben Cotton 2023-02-07 14:52:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.