Bug 2019310 - python-bsddb3 fails to build with Python 3.11: ImportError: cannot import name '_TextTestResult' from 'unittest' (/usr/lib64/python3.11/unittest/__init__.py)
Summary: python-bsddb3 fails to build with Python 3.11: ImportError: cannot import na...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bsddb3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2039890
Blocks: F36FTBFS PYTHON3.11 F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-11-02 07:45 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:55 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:55:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-02 07:45:36 UTC
python-bsddb3 fails to build with Python 3.11.0a1.

Traceback (most recent call last):
  File "/builddir/build/BUILD/bsddb3-6.2.9/test3.py", line 153, in <module>
    from unittest.runner import _TextTestResult
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name '_TextTestResult' from 'unittest.runner' (/usr/lib64/python3.11/unittest/runner.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/bsddb3-6.2.9/test.py", line 42, in <module>
    import test3 as test
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/bsddb3-6.2.9/test3.py", line 155, in <module>
    from unittest import _TextTestResult
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name '_TextTestResult' from 'unittest' (/usr/lib64/python3.11/unittest/__init__.py)

Removed many old deprecated unittest features:
    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/02909796-python-bsddb3/

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

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 already included in Fedora 35. 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 Jan Staněk 2021-11-02 11:38:29 UTC
The upstream now considers the bsddb3 package to be legacy, replaced with berkeleydb package (not yet in Fedora) – see https://www.jcea.es/programacion/pybsddb.htm for details.

I can try to package the new package for Fedora and start the package replacement process; however, I'm no longer interacting with BerkeleyDB in my line of work, and I was essentially maintaining the python-bsddb3 package only because of "inertia" and because it was usually not too much of a trouble. So, I would not be opposed to someone from the python team or the libdb maintainer taking this over :)

Comment 2 Miro Hrončok 2021-11-02 11:47:02 UTC
> I would not be opposed to someone from the python team [...] taking this over :)

The Python team is not interested in maintaining random Python packages.

The following packages require python3-bsddb3:

exaile (runtime and buildtime)
gramps (runtime)
python-zarr (buildtime only)


I suggest talking to the maintainers of those packages and/or orphaning python-bsddb3.

Comment 3 Jan Staněk 2021-11-02 11:50:58 UTC
(In reply to Miro Hrončok from comment #2)
> The Python team is not interested in maintaining random Python packages.

Reasonable, acknowledged.

> I suggest talking to the maintainers of those packages and/or orphaning
> python-bsddb3.

I reached to the maintainer of libdb, let's see where this goes.

Comment 4 Filip Januš 2021-11-02 12:08:45 UTC
Since Libdb has no upstream support and was marked as deprecated I would recommend orphaning it.

Comment 5 Jan Staněk 2021-11-23 13:13:59 UTC
The package was now orphaned.

Comment 6 Gwyn Ciesla 2022-01-12 16:00:37 UTC
https://gramps-project.org/bugs/view.php?id=12305

Comment 7 Gwyn Ciesla 2022-01-12 20:32:13 UTC
python-berkeleydb is now in f36+

Comment 8 Ben Cotton 2022-02-08 21:12:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.


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