Bug 2433806 - python-flask-babel fails to build in Copr: AssertionError: assert 'ja' == 'de'
Summary: python-flask-babel fails to build in Copr: AssertionError: assert 'ja' == 'de'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-flask-babel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-01-28 13:19 UTC by Karolina Surma
Modified: 2026-01-31 10:37 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-01-31 10:37:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github python-babel flask-babel pull 242 0 None open Fix list-translations() ordering in tests 2026-01-29 11:51:26 UTC

Description Karolina Surma 2026-01-28 13:19:44 UTC
python-flask-babel fails to build with Python 3.15.0a5.

____________________________ test_list_translations ____________________________

    def test_list_translations():
        app = flask.Flask(__name__)
        b = babel.Babel(app, default_locale="de_DE")
    
        with app.app_context():
            translations = b.list_translations()
            assert len(translations) == 3
>           assert str(translations[0]) == "de"
E           AssertionError: assert 'ja' == 'de'
E             
E             - de
E             + ja

tests/test_gettext.py:96: AssertionError
_________________ test_list_translations_default_locale_exists _________________

    def test_list_translations_default_locale_exists():
        app = flask.Flask(__name__)
        b = babel.Babel(app, default_locale="de")
    
        with app.app_context():
            translations = b.list_translations()
            assert len(translations) == 2
>           assert str(translations[0]) == "de"
E           AssertionError: assert 'ja' == 'de'
E             
E             - de
E             + ja

tests/test_gettext.py:108: AssertionError
__________________________ test_multiple_directories ___________________________

    def test_multiple_directories():
        """
        Ensure we can load translations from multiple directories.
    
        This also ensures that directories without any translation files
        are not taken into account.
        """
        b = babel.Babel()
        app = flask.Flask(__name__)
    
        app.config.update(
            {
                "BABEL_TRANSLATION_DIRECTORIES": ";".join(
                    ("translations", "renamed_translations")
                ),
                "BABEL_DEFAULT_LOCALE": "de_DE",
            }
        )
    
        b.init_app(app)
    
        with app.test_request_context():
            translations = b.list_translations()
    
            assert len(translations) == 4
>           assert str(translations[0]) == "de"
E           AssertionError: assert 'ja' == 'de'
E             
E             - de
E             + ja

tests/test_integration.py:44: AssertionError

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10050239-python-flask-babel/

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

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

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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 Tomáš Hrnčiar 2026-01-29 08:18:11 UTC
I don't think this is related to Python 3.15, I've seen a similar error when I was impact checking the latest poetry, but it never manifested in mock nor in Koschei. I believe the package just does not like COPR.

Comment 2 Sandro Mani 2026-01-31 10:37:27 UTC
I've added the proposed upstream patch to python-flask-babel-4.1.0-3.fc44


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