Bug 2232580

Summary: python-hdfs FTBFS with Sphinx 7.1+ in Fedora Rawhide (F40)
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-hdfsAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: neuro-sig, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
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: 2225274    

Description Karolina Surma 2023-08-17 13:15:24 UTC
This is exposed via the failed documentation build, but the issue is in the project code itself.
I'm testing Sphinx 7.1.2 in Copr, I want to include it in Rawhide (F40) soon.

Reproducible: Always

Steps to Reproduce:
Test locally in mock: 
$ mock -r fedora-rawhide-x86_64 --addrepo=https://download.copr.fedorainfracloud.org/results/ksurma/sphinx-7.1.2/fedora-rawhide-x86_64/ --no-clean your.src.rpm
$ mock -r fedora-rawhide-x86_64 --addrepo=https://download.copr.fedorainfracloud.org/results/ksurma/sphinx-7.1.2/fedora-rawhide-x86_64/ shell

Actual Results:  
+ sphinx-build -b latex doc _latex -j2
Running Sphinx v7.1.2

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/builddir/build/BUILD/hdfs-2.7.2/hdfs/config.py", line 24, in <module>
    from importlib import load_source
ImportError: cannot import name 'load_source' from 'importlib' (/usr/lib64/python3.12/importlib/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/sphinx/config.py", line 356, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/hdfs-2.7.2/doc/conf.py", line 64, in <module>
    import hdfs
  File "/builddir/build/BUILD/hdfs-2.7.2/hdfs/__init__.py", line 6, in <module>
    from .config import Config, NullHandler
  File "/builddir/build/BUILD/hdfs-2.7.2/hdfs/config.py", line 27, in <module>
    from imp import load_source
ModuleNotFoundError: No module named 'imp'

Expected Results:  
Successful build

This may already be fixed upstream via: https://github.com/mtth/hdfs/pull/204