Changeset - 1f8eaa4c1dff
default
1
2
1
Grafted from: deb7c57f11be
lib: move locale.py to locales.py to avoid shadowing of standard module
"Fix" spurious problem, seen for example as:
$ python kallithea/lib/annotate.py
Traceback (most recent call last):
File ".../lib64/python3.8/site-packages/mercurial/encoding.py", line 107, in <module>
encoding = locale.getpreferredencoding().encode('ascii') or b'ascii'
AttributeError: module 'locale' has no attribute 'getpreferredencoding'
That happened when something in some other module tried to import stdlib locale
... but somehow would pick up the kallithea locale module and things would
fail.
Stay out of that kind of trouble by using a name that doesn't collide.
"Fix" spurious problem, seen for example as:
$ python kallithea/lib/annotate.py
Traceback (most recent call last):
File ".../lib64/python3.8/site-packages/mercurial/encoding.py", line 107, in <module>
encoding = locale.getpreferredencoding().encode('ascii') or b'ascii'
AttributeError: module 'locale' has no attribute 'getpreferredencoding'
That happened when something in some other module tried to import stdlib locale
... but somehow would pick up the kallithea locale module and things would
fail.
Stay out of that kind of trouble by using a name that doesn't collide.
3 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)