Bug 2275074 - python-flask fails to build with Python 3.13: test_no_escaping: AssertionError: b'&lt;p&gt;Hello World!' != b'<p>Hello World!'
Summary: python-flask fails to build with Python 3.13: test_no_escaping: AssertionErro...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-flask
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: František Zatloukal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-04-15 08:37 UTC by Karolina Surma
Modified: 2024-05-30 09:06 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-30 09:06:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-04-15 08:37:25 UTC
python-flask fails to build with Python 3.13.0a6.

=================================== FAILURES ===================================
_______________________________ test_no_escaping _______________________________

app = <Flask 'flask_test'>, client = <FlaskClient <Flask 'flask_test'>>

    def test_no_escaping(app, client):
        text = "<p>Hello World!"
    
        @app.route("/")
        def index():
            return flask.render_template(
                "non_escaping_template.txt", text=text, html=Markup(text)
            )
    
        lines = client.get("/").data.splitlines()
>       assert lines == [
            b"<p>Hello World!",
            b"<p>Hello World!",
            b"<p>Hello World!",
            b"<p>Hello World!",
            b"&lt;p&gt;Hello World!",
            b"<p>Hello World!",
            b"<p>Hello World!",
            b"<p>Hello World!",
        ]
E       AssertionError: assert [b'<p>Hello W... World!', ...] == [b'<p>Hello W... World!', ...]
E         At index 6 diff: b'&lt;p&gt;Hello World!' != b'<p>Hello World!'
E         Use -v to get more diff

tests/test_templating.py:101: AssertionError
=========================== short test summary info ============================
FAILED tests/test_templating.py::test_no_escaping - AssertionError: assert [b...
=================== 1 failed, 481 passed, 2 skipped in 1.43s ===================

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/07302868-python-flask/

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

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 František Zatloukal 2024-05-30 09:06:10 UTC
It seems the flask builds are passing just fine with python 3.13 as per: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-flask/

It probably got resolved by a newer 3.13 snapshot and/or update of some library required for flask tests.

Closing, feel free to reopen if the issue occurs again.


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