Files
@ 1f8eaa4c1dff
Branch filter:
Location: kallithea/requirements.txt
1f8eaa4c1dff
228 B
text/plain
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.