The python-rpm-macros rpms
Find a file
Miro Hrončok d430201e60 CI tests fix for Python 3.13
We should not unimport pathlib when we use pathlib.
This was always fragile. Choose a module we don't use:

The failure:

    ______________________ test_modules_from_files_are_found _______________________

    tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_modules_from_files_are_fo0')

        def test_modules_from_files_are_found(tmp_path):
            test_file_1 = tmp_path / 'this_is_a_file_in_tmp_path_1.txt'
            test_file_2 = tmp_path / 'this_is_a_file_in_tmp_path_2.txt'
            test_file_3 = tmp_path / 'this_is_a_file_in_tmp_path_3.txt'

            test_file_1.write_text('math\nwave\n')
            test_file_2.write_text('csv\npathlib\n')
            test_file_3.write_text('logging\ncsv\n')

            # Make sure the tested modules are not already in sys.modules
            for m in ('math', 'wave', 'csv', 'pathlib', 'logging'):
                sys.modules.pop(m, None)

    >       modules_main(['-f', str(test_file_1), '-f', str(test_file_2), '-f', str(test_file_3), ])

    test_import_all_modules.py:170:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    /usr/lib/rpm/redhat/import_all_modules.py:167: in main
        import_modules(modules)
    /usr/lib/rpm/redhat/import_all_modules.py💯 in import_modules
        importlib.import_module(module)
    /usr/lib64/python3.13/importlib/__init__.py:88: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    <frozen importlib._bootstrap>:1387: in _gcd_import
        ???
    <frozen importlib._bootstrap>:1360: in _find_and_load
        ???
    <frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
        ???
    <frozen importlib._bootstrap>:935: in _load_unlocked
        ???
    <frozen importlib._bootstrap_external>:1022: in exec_module
        ???
    <frozen importlib._bootstrap>:488: in _call_with_frames_removed
        ???
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

        """Object-oriented filesystem paths.

        This module provides classes to represent abstract paths and concrete
        paths with operations that have semantics appropriate for different
        operating systems.
        """

        from ._abc import *
        from ._local import *

    >   __all__ = (_abc.__all__ +
                   _local.__all__)
    E   NameError: name '_abc' is not defined. Did you forget to import '_abc'?

    /usr/lib64/python3.13/pathlib/__init__.py:11: NameError
    ----------------------------- Captured stderr call -----------------------------
    Check import: math
    Check import: wave
    Check import: csv
    Check import: pathlib
2024-06-25 12:34:11 +02:00
tests CI tests fix for Python 3.13 2024-06-25 12:34:11 +02:00
.gitignore Initial setup of the repo 2016-01-12 23:33:17 +00:00
brp-fix-pyc-reproducibility brp-fix-pyc-reproducibility: use more strict shell style 2024-03-28 11:58:53 +01:00
brp-python-bytecompile Bytecompilation: Compile Python files in parallel, according to %_smp_mflags 2022-12-21 12:18:48 +01:00
brp-python-hardlink Include brp-python-hardlink in python-srpm-macros since it is no longer in RPM 4.17+ 2021-06-30 18:13:53 +02:00
clamp_source_mtime.py Add Python 2.7 support to clamp_source_mtime.py 2022-12-21 12:18:48 +01:00
compileall2.py Update bundled compileall2 to version 0.8.0 2024-03-22 11:01:55 +01:00
import_all_modules.py %py(3)_check_import: Process .pth files in site(arch|lib) 2021-11-02 16:05:11 +01:00
macros.pybytecompile Don't assume %_smp_mflags only ever contains -jX, use -j%_smp_build_ncpus directly 2023-03-16 19:45:39 +01:00
macros.python %py3_test_envvars: Only set $PYTEST_XDIST_AUTO_NUM_WORKERS if not already set 2024-01-25 20:28:23 +01:00
macros.python-srpm Update main Python to 3.13 2024-06-06 15:52:49 +02:00
macros.python3 %py3_test_envvars: Only set $PYTEST_XDIST_AUTO_NUM_WORKERS if not already set 2024-01-25 20:28:23 +01:00
pathfix.py Include pathfix.py in this package 2022-10-26 13:22:34 +02:00
python-rpm-macros.spec Update main Python to 3.13 2024-06-06 15:52:49 +02:00
python.lua Add lua helper functions to make it possible to automatically generate Obsoletes tags 2022-01-20 18:57:25 +01:00
rpminspect.yaml Disable certain rpminspect inspections not relevant to this package 2022-01-28 17:10:16 +01:00
sources Initial setup of the repo 2016-01-12 23:33:17 +00:00