Bug 2034217 - watchman fails to build with Python 3.11: AttributeError: module 'unittest' has no attribute '_TextTestResult'. Did you mean: 'TextTestResult'
Summary: watchman fails to build with Python 3.11: AttributeError: module 'unittest' ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: watchman
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2099187 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2021-12-20 12:22 UTC by Tomáš Hrnčiar
Modified: 2022-07-19 13:47 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-07-19 13:47:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-12-20 12:22:34 UTC
watchman fails to build with Python 3.11.0a3.

Traceback (most recent call last):
  File "/usr/lib64/python3.11/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/runpy.py", line 86, in _run_code
    exec(code, run_globals)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/watchman-2021.05.10.00/redhat-linux-build/tests/integration/test_py/__main__.py", line 198, in <module>
  File "/usr/lib64/python3.11/unittest/__init__.py", line 94, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'unittest' has no attribute '_TextTestResult'. Did you mean: 'TextTestResult'?

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

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

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/03054360-watchman/

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

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:19:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Miro Hrončok 2022-06-20 10:21:08 UTC
*** Bug 2099187 has been marked as a duplicate of this bug. ***

Comment 3 Miro Hrončok 2022-07-19 13:47:16 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


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