Bug 2366488

Summary: python-pydocstyle fails to build with Python 3.14: AssertionError in test_overload_nested_function_valid
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-pydocstyleAssignee: Sandro <gui1ty>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fti-bugs, gui1ty, ksurma, logans, manisandro, mhroncok, tadej.j
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-14 20:53:27 UTC Type: Bug
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: 2322407, 2339432, 2339435, 2371908, 2371967, 2372224    

Description Karolina Surma 2025-05-15 12:17:23 UTC
python-pydocstyle fails to build with Python 3.14.0b1.

___________________ test_overload_nested_function_valid[ini] ___________________

env = <src.tests.test_integration.SandboxEnv object at 0x7f97b8dc8050>

    def test_overload_nested_function_valid(env):
        """Valid case for overload decorated nested functions.
    
        This shouldn't throw any errors.
        """
        with env.open('example.py', 'wt') as example:
            example.write(textwrap.dedent('''\
            from typing import overload
    
            def function_with_nesting():
                """Adding a docstring to a function."""
                @overload
                def overloaded_func(a: int) -> str:
                    ...
    
    
                @overload
                def overloaded_func(a: str) -> str:
                    ...
    
    
                def overloaded_func(a):
                    """Foo bar documentation."""
                    return str(a)
                '''))
        env.write_config(ignore="D100")
        out, err, code = env.invoke()
>       assert code == 0
E       assert 1 == 0

src/tests/test_integration.py:833: AssertionError
__________________ test_overload_nested_function_valid[toml] ___________________

env = <src.tests.test_integration.SandboxEnv object at 0x7f97b8bfecf0>

    def test_overload_nested_function_valid(env):
        """Valid case for overload decorated nested functions.
    
        This shouldn't throw any errors.
        """
        with env.open('example.py', 'wt') as example:
            example.write(textwrap.dedent('''\
            from typing import overload
    
            def function_with_nesting():
                """Adding a docstring to a function."""
                @overload
                def overloaded_func(a: int) -> str:
                    ...
    
    
                @overload
                def overloaded_func(a: str) -> str:
                    ...
    
    
                def overloaded_func(a):
                    """Foo bar documentation."""
                    return str(a)
                '''))
        env.write_config(ignore="D100")
        out, err, code = env.invoke()
>       assert code == 0
E       assert 1 == 0

src/tests/test_integration.py:833: AssertionError

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14-b1/fedora-rawhide-x86_64/09026611-python-pydocstyle/

For all our attempts to build python-pydocstyle with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/package/python-pydocstyle/

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

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 2025-06-11 16:02:26 UTC
*** Bug 2372058 has been marked as a duplicate of this bug. ***