Bug 2359497 - python-deprecated fails to build with Python 3.14: test_should_raise_type_error: AttributeError: 'int' object has no attribute 'split'
Summary: python-deprecated fails to build with Python 3.14: test_should_raise_type_err...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-deprecated
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matej Focko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-04-14 13:10 UTC by Karolina Surma
Modified: 2025-04-23 08:28 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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