python-babel / flask-babel

i18n and l10n support for Flask based on Babel and pytz
https://python-babel.github.io/flask-babel/
Other
432 stars 159 forks source link

`locked_cached_property` is deprecated as of Flask>=2.3.0 #229

Closed jkittner closed 9 months ago

jkittner commented 1 year ago

issue: https://github.com/pallets/flask/issues/4993 pr: https://github.com/pallets/flask/pull/4998

This is the only part where this is used. I'm wondering though, whether locking is even needed in this case or if a werkzeug.utils.cached_property is enough?

https://github.com/python-babel/flask-babel/blob/69d3340cd0ff52f3e23a47518285a7e6d8f8c640/flask_babel/__init__.py#L224-L228

happy to send a PR swapping the decorator. But just wanted to be sure whether the lock is actually needed. (tests pass with werkzeug.utils.cached_property)

TkTech commented 1 year ago

This change would be accepted. I don't believe the locking is necessary here and is a legacy of the pre-app-specific configuration.