Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing is failed #245

Closed
miettal opened this issue Jun 1, 2020 · 2 comments
Closed

importing is failed #245

miettal opened this issue Jun 1, 2020 · 2 comments

Comments

@miettal
Copy link

miettal commented Jun 1, 2020

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.
1883750

@tonyg
Copy link
Contributor

tonyg commented Jun 3, 2020

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.

@tonyg
Copy link
Contributor

tonyg commented Jun 4, 2020

Simpler reproduction: pipenv --python 2.7 run python setup.py test from a git checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants