Bug 2036438

Summary: python3-sphinxcontrib-zopeext-0.3.0-1.fc35 stops dnf automatic updates because of transaction error
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: python-sphinxcontrib-zopeextAssignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 35CC: loganjerry, mail, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-sphinxcontrib-zopeext-0.3.2-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-20 14:51:31 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:

Description Edgar Hoch 2022-01-01 17:14:51 UTC
Description of problem:
The release of package python3-sphinxcontrib-zopeext-0.3.0-1.fc35 to repo updates breaks dnf automatic updates on Fedora 35 because it causes a transaction error if python3-sphinxcontrib-asyncio and python3-sphinxcontrib-zopeext was installed.

Please provide an updated package which will install without error. Or remove python3-sphinxcontrib-zopeext-0.3.0-1.fc35 from repo updates.



Version-Release number of selected component (if applicable):
python3-sphinxcontrib-zopeext-0.3.0-1.fc35

How reproducible:
Always

Steps to Reproduce:
1. Use a Fedora 35 system with installed packages python3-sphinxcontrib-zopeext-0.2.4-6.fc35 and python3-sphinxcontrib-asyncio-0.3.0-1.fc35
2. Run dnf upgrade


Actual results:

Fehler: Transaktionstest fehlerhaft:
  Datei /usr/lib/python3.10/site-packages/sphinxcontrib/__init__.py aus der Installation von python3-sphinxcontrib-zopeext-0.3.0-1.fc35.noarch kollidiert mit der Datei aus dem Paket python3-sphinxcontrib-asyncio-0.3.0-1.fc35.noarch
  Datei /usr/lib/python3.10/site-packages/sphinxcontrib/__pycache__/__init__.cpython-310.opt-1.pyc aus der Installation von python3-sphinxcontrib-zopeext-0.3.0-1.fc35.noarch kollidiert mit der Datei aus dem Paket python3-sphinxcontrib-asyncio-0.3.0-1.fc35.noarch
  Datei /usr/lib/python3.10/site-packages/sphinxcontrib/__pycache__/__init__.cpython-310.pyc aus der Installation von python3-sphinxcontrib-zopeext-0.3.0-1.fc35.noarch kollidiert mit der Datei aus dem Paket python3-sphinxcontrib-asyncio-0.3.0-1.fc35.noarch


Expected results:
No error

Comment 1 Jerry James 2022-01-01 17:47:58 UTC
The issue is that both packages want to install /usr/lib/python3.10/site-packages/sphinxcontrib/__init__.py.  The python-sphinxcontrib-asyncio version reads:

```
__import__('pkg_resources').declare_namespace(__name__)
```

The python-sphinxcontrib-zopeext version reads:

```
# -*- coding: utf-8 -*-
"""
    sphinxcontrib
    ~~~~~~~~~~~~~

    This package is a namespace package that contains all extensions
    distributed in the ``sphinx-contrib`` distribution.

    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

__import__('pkg_resources').declare_namespace(__name__)
```

That is, they are the same as far as code goes, but the zopeext version adds a documentation string and a coding cookie.

I'm not sure what the right thing to do is.  There is no parent sphinxcontrib package, which is where this file should really live.  Maybe we should artificially create one, and have all of the various python-sphinxcontrib-* packages require it?

I am adding the python-sphinxcontrib-asyncio maintainer and Miro to CC, in hopes that one of them might have some advice.

Comment 2 Jerry James 2022-01-05 16:41:24 UTC
Elliott Sales de Andrade has this to say on fedora-devel-list:

I think these packages are wrong upstream. The `sphinxcontrib` directory is provided by python3-sphinx, and it specifically doesn't have `__init__.py` there. Those extensions should not be adding one, so as to keep the implicit namespace package nature of that directory: https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages

By the contents of the files, it appears they are trying to force it to be a pkg_resources-style namespace package: https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#pkg-resources-style-namespace-packages

But since Sphinx didn't do that in the first place, there's no guarantee that other packages will contain `__init__.py` (and indeed most do not).

Comment 4 Fedora Update System 2022-01-05 17:23:34 UTC
FEDORA-2022-08e3944d2d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-08e3944d2d

Comment 5 Fedora Update System 2022-01-06 01:53:42 UTC
FEDORA-2022-08e3944d2d has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-08e3944d2d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-08e3944d2d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-01-07 02:49:38 UTC
FEDORA-2022-08e3944d2d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-08e3944d2d

Comment 7 Fedora Update System 2022-01-08 01:40:42 UTC
FEDORA-2022-08e3944d2d has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-08e3944d2d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-08e3944d2d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-01-20 14:51:31 UTC
FEDORA-2022-08e3944d2d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.