File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ DEPENDENCY / BASELINE CHANGES:
1111- Restore compatibility with pygame 1.9.4 that had a broken
1212 `blits` function. Thanks to onpon4 for reporting the issue
1313 (Closes: #293) (nthykier)
14+ - Add guard to prevent crashing when `locale.getdefaultencoding`
15+ is removed in python3.15.
1416
1517USER-VISIBLE CHANGES:
1618- New feature: Quicksaves - save on `F5` (replacing "reload theme")
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ def _get_main_localedir():
5757
5858try :
5959 language = locale .getdefaultlocale ()[0 ] or default_language
60- except RuntimeError :
60+ except (RuntimeError , AttributeError ):
61+ # locale.getdefaultlocale is slated for removal in 3.15.
62+ # With the attribute error, we should at least not crash when the time comes.
6163 language = default_language
6264
6365
@@ -73,7 +75,7 @@ def set_language(lang=None, force=False):
7375 if lang in langs :
7476 language = lang
7577 else :
76- # Let's try to be smart: if base language exists for another for another
78+ # Let's try to be smart: if base language exists for another
7779 # country, use it. So es_ES => es_AR, pt_PT => pt_BR, etc
7880 code = lang .split ("_" )[0 ]
7981 languages = [l for l in langs if code == l .split ("_" )[0 ]]
You can’t perform that action at this time.
0 commit comments