MolSSI / QCEngine

Quantum chemistry program executor and IO standardizer (QCSchema).
https://molssi.github.io/QCEngine/
BSD 3-Clause "New" or "Revised" License
162 stars 78 forks source link

AttributeError: module 'configparser' has no attribute 'SafeConfigParser' when building on Fedora rawhide #406

Closed topazus closed 11 months ago

topazus commented 1 year ago

Describe the bug

Recently, I try to build python-qcengine on Fedora 39 with Python3.12. The following error appeared:

+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/qcengine-0.26.0/pyproject-wheeldir --output /builddir/build/BUILD/python-qcengine-0.26.0-1.fc39.noarch-pyproject-buildrequires
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
   (installed: setuptools 67.7.2)
Handling wheel from default build backend
Requirement satisfied: wheel
   (installed: wheel 0.40.0)
/builddir/build/BUILD/qcengine-0.26.0/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
  LONG_VERSION_PY['git'] = '''
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 555, in main
    generate_requires(
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 451, in generate_requires
    generate_build_requirements(backend, requirements)
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 274, in generate_build_requirements
    new_reqs = get_requires(config_settings=requirements.config_settings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 488, in run_setup
    self).run_setup(setup_script=setup_script)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 338, in run_setup
    exec(code, locals())
  File "<string>", line 27, in <module>
  File "/builddir/build/BUILD/qcengine-0.26.0/versioneer.py", line 1480, in get_version
    return get_versions()["version"]
           ^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/qcengine-0.26.0/versioneer.py", line 1412, in get_versions
    cfg = get_config_from_root(root)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/qcengine-0.26.0/versioneer.py", line 342, in get_config_from_root
    parser = configparser.SafeConfigParser()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.3m19Re (%generate_buildrequires)
    Bad exit status from /var/tmp/rpm-tmp.3m19Re (%generate_buildrequires)

build task: https://koji.fedoraproject.org/koji/taskinfo?taskID=103223460 build log: https://kojipkgs.fedoraproject.org//work/tasks/3460/103223460/build.log

topazus commented 1 year ago

I think the versioneer needs to be updated to solve this problem.

loriab commented 11 months ago

Today's v0.27.0 release should fix this problem. Please reopen if it doesn't, or open a new issue if/when py312 presents new obstacles. Thanks for trying out on py312!