Bug 2460120 - python-astroquery fails to build with Python 3.15: AttributeError: 'SourceFileLoader' object has no attribute 'load_module'. Did you mean '.exec_module' instead of '.load_module'?
Summary: python-astroquery fails to build with Python 3.15: AttributeError: 'SourceFil...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-astroquery
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2485761 (view as bug list)
Depends On:
Blocks: PYTHON3.15 F45FTBFS F45FailsToInstall 2485707
TreeView+ depends on / blocked
 
Reported: 2026-04-21 14:39 UTC by Karolina Surma
Modified: 2026-07-24 17:57 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-07-24 17:57:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-04-21 14:39:32 UTC
python-astroquery fails to build with Python 3.15.0a8.

+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-astroquery-0.4.11-build/pyproject-wheeldir --output /builddir/build/BUILD/python-astroquery-0.4.11-build/python-astroquery-0.4.11-2.fc45.x86_64-pyproject-buildrequires
Handling setuptools from build-system.requires
Requirement satisfied: setuptools
   (installed: setuptools 80.10.2)
Handling wheel from build-system.requires
Requirement satisfied: wheel
   (installed: wheel 0.46.3)
/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/ah_bootstrap.py:53: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/setup_helpers.py:81: SetuptoolsDeprecationWarning: Deprecated API usage.
!!

        ********************************************************************************
        As setuptools moves its configuration towards `pyproject.toml`,
        `setuptools.config.read_configuration` became deprecated.

        For the time being, you can use the `setuptools.config.setupcfg` module
        to access a backward compatible API, but this module is provisional
        and might be removed in the future.

        To read project metadata, consider using
        ``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
        For simple scenarios, you can also try parsing the file directly
        with the help of ``configparser``.
        ********************************************************************************

!!
  conf = read_configuration('setup.cfg')
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 744, in main
    generate_requires(
    ~~~~~~~~~~~~~~~~~^
        include_runtime=args.runtime,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
        config_settings=parse_config_settings_args(args.config_settings),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 626, in generate_requires
    generate_build_requirements(backend, requirements)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 313, in generate_build_requirements
    new_reqs = get_requires(requirements.config_settings)
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
    self.run_setup()
    ~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 317, in run_setup
    exec(code, locals())
    ~~~~^^^^^^^^^^^^^^^^
  File "<string>", line 24, in <module>
  File "/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/setup_helpers.py", line 86, in setup
    cmdclass = register_commands()
  File "/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/setup_helpers.py", line 237, in register_commands
    add_command_hooks(registered_commands, srcdir=srcdir)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/setup_helpers.py", line 270, in add_command_hooks
    for setuppkg in iter_setup_packages(srcdir, packages):
                    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/setup_helpers.py", line 501, in iter_setup_packages
    module = import_file(setup_package,
                         name=packagename + '.setup_package')
  File "/builddir/build/BUILD/python-astroquery-0.4.11-build/astroquery-0.4.11/astropy_helpers/astropy_helpers/utils.py", line 220, in import_file
    mod = loader.load_module()
          ^^^^^^^^^^^^^^^^^^
AttributeError: 'SourceFileLoader' object has no attribute 'load_module'. Did you mean '.exec_module' instead of '.load_module'?

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10344937-python-astroquery/

For all our attempts to build python-astroquery with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-astroquery/

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.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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 Karolina Surma 2026-06-06 18:21:19 UTC
*** Bug 2485761 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Fails To Install 2026-06-14 08:31:23 UTC
Hello,

Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py
If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 4 Fedora Fails To Install 2026-07-24 17:57:36 UTC
Hello,

Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py
If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues

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

Thanks for taking care of it!


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