Bug 2264229 - python-imbalanced-learn fails to build with Python 3.13: Stripped indentation causes test_docstring to fail
Summary: python-imbalanced-learn fails to build with Python 3.13: Stripped indentation...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-imbalanced-learn
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Iztok Fister Jr.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-02-14 17:15 UTC by Karolina Surma
Modified: 2024-04-01 08:09 UTC (History)
5 users (show)

Fixed In Version: python-imbalanced-learn-0.12.2-2.fc41
Clone Of:
Environment:
Last Closed: 2024-04-01 08:09:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github scikit-learn-contrib imbalanced-learn issues 1071 0 None open Python 3.13: Two tests from test_docstring.py are failing 2024-03-27 20:50:16 UTC

Description Karolina Surma 2024-02-14 17:15:18 UTC
python-imbalanced-learn fails to build with Python 3.13.0a3.
=================================== FAILURES ===================================
_ test_docstring_inject[func-A function.\n\n    Parameters\n    ----------\n    xxx\n\n    yyy\n    ] _

obj = <function func at 0x7feefc5c0f40>
obj_docstring = 'A function.\n\n    Parameters\n    ----------\n    xxx\n\n    yyy\n    '

    @pytest.mark.parametrize(
        "obj, obj_docstring", [(func, func_docstring), (cls, cls_docstring)]
    )
    def test_docstring_inject(obj, obj_docstring):
        obj_injected_docstring = Substitution(param_1="xxx", param_2="yyy")(obj)
>       assert obj_injected_docstring.__doc__ == obj_docstring
E       AssertionError: assert 'A function.\...nxxx\n\nyyy\n' == 'A function.\...    yyy\n    '
E           A function.
E           
E         -     Parameters
E         ? ----
E         + Parameters
E         -     ----------
E         ? ----...
E         
E         ...Full output truncated (7 lines hidden), use '-vv' to show

imblearn/utils/tests/test_docstring.py:63: AssertionError
_ test_docstring_inject[cls-A class.\n\n    Parameters\n    ----------\n    xxx\n\n    yyy\n    ] _

obj = <class 'imblearn.utils.tests.test_docstring.cls'>
obj_docstring = 'A class.\n\n    Parameters\n    ----------\n    xxx\n\n    yyy\n    '

    @pytest.mark.parametrize(
        "obj, obj_docstring", [(func, func_docstring), (cls, cls_docstring)]
    )
    def test_docstring_inject(obj, obj_docstring):
        obj_injected_docstring = Substitution(param_1="xxx", param_2="yyy")(obj)
>       assert obj_injected_docstring.__doc__ == obj_docstring
E       AssertionError: assert 'A class.\n\n...nxxx\n\nyyy\n' == 'A class.\n\n...    yyy\n    '
E           A class.
E           
E         -     Parameters
E         ? ----
E         + Parameters
E         -     ----------
E         ? ----...
E         
E         ...Full output truncated (7 lines hidden), use '-vv' to show

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07016127-python-imbalanced-learn/

For all our attempts to build python-imbalanced-learn with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-imbalanced-learn/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Sandro 2024-03-27 20:50:16 UTC
Reported upstream.

Comment 2 Fedora Update System 2024-04-01 08:07:25 UTC
FEDORA-2024-40c770be3d (python-imbalanced-learn-0.12.2-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-40c770be3d

Comment 3 Fedora Update System 2024-04-01 08:09:35 UTC
FEDORA-2024-40c770be3d (python-imbalanced-learn-0.12.2-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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