FS#78537 - [python-flask-babelex] FTBFS: test failure

Attached to Project: Community Packages
Opened by Eric Long (hack3ric) - Wednesday, 17 May 2023, 15:30 GMT
Last edited by Muflone (muflone) - Sunday, 17 September 2023, 17:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



The package fails in check() due to mismatching date formats

______________________ DateFormattingTestCase.test_basics ______________________

self = <tests.DateFormattingTestCase testMethod=test_basics>

def test_basics(self):
app = flask.Flask(__name__)
b = babel.Babel(app)
d = datetime(2010, 4, 12, 13, 46)

with app.test_request_context():
> assert babel.format_datetime(d) == 'Apr 12, 2010, 1:46:00 PM'
E AssertionError: assert 'Apr 12, 2010...46:00\u202fPM' == 'Apr 12, 2010, 1:46:00 PM'
E - Apr 12, 2010, 1:46:00 PM
E ? ^
E + Apr 12, 2010, 1:46:00 PM
E ? ^

tests/tests.py:25: AssertionError

Attached is a patch that updates the predicate and fixes FTBFS.
This task depends upon

Closed by  Muflone (muflone)
Sunday, 17 September 2023, 17:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 0.9.4-7
Comment by loqs (loqs) - Saturday, 02 September 2023, 17:57 GMT
Long term could the package be dropped? Upstream has archived the project with the commit [1]. There are two reverse dependencies of python-flask-babelex, python-flask-security which is unmaintained (so could also be dropped and has no reverse dependencies) and suggests migrating to python-flask-security [2] which is the second reverse dependency and can use python-flask-babel which now contains the functionality provided by python-flask-babelex.
python-flask-security-too currently fails to build due an issue with sphinx and SOURCE_DATE_EPOCH fixing, check fails probably due to updates to other python packages (may be fixed in new unpackaged upstream release).

[1] https://github.com/mrjoes/flask-babelex/commit/e395444ff7207e2585217a34ffdf0c5627f7b89b
[2] https://github.com/mattupstate/flask-security/commit/674b18103fa8734aca71bbd084ea01e3709817ef
[3] https://github.com/Flask-Middleware/flask-security/commit/11086903477e45b730decbacce42a5af87aba04f