Closed miettal closed 3 years ago
Me too.
Steps to reproduce:
$ virtualenv -p python2.7 env
$ . env/bin/activate
$ pip install parsedatetime==2.6
$ python
Python 2.7.17 (default, Jan 19 2020, 19:54:54)
[GCC 9.2.1 20200110] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import parsedatetime.pdt_locales.icu as i
>>> i
<module 'parsedatetime.pdt_locales.icu' from '/home/tonyg/q/env/local/lib/python2.7/site-packages/parsedatetime/pdt_locales/icu.pyc'>
>>> i.pyicu
<module 'parsedatetime.pdt_locales.icu' from '/home/tonyg/q/env/local/lib/python2.7/site-packages/parsedatetime/pdt_locales/icu.pyc'>
>>>
This shows that icu.py
's variable pyicu
resolves in fact to icu.py
itself, rather than the real ICU library.
Running the same steps but using parsedatetime==2.5
yields None
for i.pyicu
.
Simpler reproduction: pipenv --python 2.7 run python setup.py test
from a git checkout.
in this file, a importing was failed in my environment. https://github.com/bear/parsedatetime/commits/master/parsedatetime/pdt_locales/icu.py
because in this context icu = icu.py caused by this commit. https://github.com/bear/parsedatetime/commit/18837504778c0dd41ae412bdf86eb81b1be7cdd7