Bug 2359497

Summary: python-deprecated fails to build with Python 3.14: test_should_raise_type_error: AttributeError: 'int' object has no attribute 'split'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-deprecatedAssignee: Matej Focko <mfocko>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mfocko, mhroncok, phracek, ttomecek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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    

Description Karolina Surma 2025-04-14 13:10:48 UTC
python-deprecated fails to build with Python 3.14.0a7.

_________________________ test_should_raise_type_error _________________________

    def test_should_raise_type_error():
        try:
>           @deprecated.sphinx.deprecated(version="4.5.6", reason=5)

tests/test_sphinx.py:312: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
deprecated/classic.py:299: in deprecated
    return adapter(wrapped)
deprecated/sphinx.py:116: in __call__
    reason = textwrap.dedent(self.reason).strip()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

text = 5

    def dedent(text):
        """Remove any common leading whitespace from every line in `text`.
    
        This can be used to make triple-quoted strings line up with the left
        edge of the display, while still presenting them in the source code
        in indented form.
    
        Note that tabs and spaces are both treated as whitespace, but they
        are not equal: the lines "  hello" and "\\thello" are
        considered to have no common leading whitespace.
    
        Entirely blank lines are normalized to a newline character.
        """
        if not text:
            return text
    
>       lines = text.split('\n')
E       AttributeError: 'int' object has no attribute 'split'

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/fedora-rawhide-x86_64/08899270-python-deprecated/

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

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/

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 Miro Hrončok 2025-04-14 13:18:55 UTC
The exception raised from textwrap.dedent(<int>) has changed:

https://github.com/python/cpython/issues/107369#issuecomment-2801687856

Comment 2 Miro Hrončok 2025-04-14 13:19:35 UTC
I belive this should be fixed in Python, but let's see what upstream says.

Comment 4 Matej Focko 2025-04-23 08:28:29 UTC
The fix ( https://github.com/python/cpython/pull/132666 ) is merged, but there's still an older build in the Copr repo, so it doesn't make sense to retry the build IMO.