Bug 2019418 - python-dirq fails to build with Python 3.11: AttributeError: 'TestQueueSimple' object has no attribute 'failIf'
Summary: python-dirq fails to build with Python 3.11: AttributeError: 'TestQueueSimpl...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-dirq
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: lionel.cons
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F36FTBFS PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-02 14:10 UTC by Tomáš Hrnčiar
Modified: 2021-11-09 06:39 UTC (History)
5 users (show)

Fixed In Version: 1.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 06:39:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-02 14:10:34 UTC
python-dirq fails to build with Python 3.11.0a1.

======================================================================
ERROR: test05_add_path (test.testDirQueueSimple.TestQueueSimple)
QueueSimple.add_path()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueSimple.py", line 79, in test05_add_path
    self.failIf(os.path.exists(path))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueSimple' object has no attribute 'failIf'

======================================================================
ERROR: test06_lock_unlock (test.testDirQueueSimple.TestQueueSimple)
QueueSimple.lock()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueSimple.py", line 89, in test06_lock_unlock
    self.failUnless(os.path.exists(elem_full_path + LOCKED_SUFFIX))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueSimple' object has no attribute 'failUnless'

======================================================================
ERROR: test10_purge_oneDirOneElement (test.testDirQueueSimple.TestQueueSimple)
QueueSimple.purge() one directory & element
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueSimple.py", line 129, in test10_purge_oneDirOneElement
    self.assert_(os.path.exists(elem_path_lock) is True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueSimple' object has no attribute 'assert_'

======================================================================
ERROR: test1_init (test.testDirQueueSet.TestQueueSet)
QueueSet.__init__()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueSet.py", line 31, in test1_init
    self.failUnlessRaises(TypeError, QueueSet, ('a'))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueSet' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test2_addremove (test.testDirQueueSet.TestQueueSet)
QueueSet.add()/remove()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueSet.py", line 55, in test2_addremove
    self.failUnlessRaises(QueueError, qs.add, ([q1]))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueSet' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test03add_path (test.testDirQueueNull.TestQueueNull)
QueueNull.add_path()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueNull.py", line 55, in test03add_path
    self.failIf(os.path.exists(path))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueNull' object has no attribute 'failIf'

======================================================================
ERROR: test1_special_mkdir (test.testDirQueueBase.TestQueueBaseModuleFunctions)
QueueBase._special_mkdir()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueBase.py", line 46, in test1_special_mkdir
    self.failUnlessRaises(OSError, QueueBase._special_mkdir, (test_file))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueBaseModuleFunctions' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test3_file_create (test.testDirQueueBase.TestQueueBaseModuleFunctions)
QueueBase._file_create()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueBase.py", line 65, in test3_file_create
    self.failUnlessRaises(OSError,
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueBaseModuleFunctions' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test4_file_write (test.testDirQueueBase.TestQueueBaseModuleFunctions)
QueueBase._file_write()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueueBase.py", line 83, in test4_file_write
    self.failUnlessRaises(TypeError, QueueBase._file_write, ('', t))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueBaseModuleFunctions' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test1init (test.testDirQueue.TestQueue)
Queue.__init__()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueue.py", line 52, in test1init
    self.failUnlessRaises(
    ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueue' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test2_check_element (test.testDirQueue.TestQueueModuleFunctions)
queue._check_element()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueue.py", line 144, in test2_check_element
    self.failUnlessRaises(queue.QueueError, queue._check_element, (e))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueModuleFunctions' object has no attribute 'failUnlessRaises'

======================================================================
ERROR: test3_string2hash (test.testDirQueue.TestQueueModuleFunctions)
queue._string2hash()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dirq-1.7.1/test/testDirQueue.py", line 160, in test3_string2hash
    self.failUnlessRaises(queue.QueueError,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestQueueModuleFunctions' object has no attribute 'failUnlessRaises'

----------------------------------------------------------------------
Ran 42 tests in 6.586s

FAILED (errors=12)


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/02909938-python-dirq/

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

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 lionel.cons 2021-11-05 13:54:14 UTC
Should be fixed by new 1.8 version (see #2020220).

Comment 2 lionel.cons 2021-11-09 06:39:22 UTC
Indeed fixed in 1.8, see https://copr.fedorainfracloud.org/coprs/g/python/python3.11/build/2936216/.


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