-
Notifications
You must be signed in to change notification settings - Fork 87
Unable to import pinject #7
Comments
Pinject is only compatible with Python 2.7, unfortunately (see #2). At least, that's what the developer told me. I'm thinking of making a fork to support Python 3. Would you be interested? |
@seanfisk It says 'all' under Platform on PyPi, so that got me confused. I'll be glad to help if I could but unfortunately I'm pretty new to python. Other than that it would be great if it worked under 3.x branch :) |
@dmitrybelyakov Agreed; that is confusing. Working on pinject has been on my todo list, and I should get some time to do it soon. Watch the repo and I'll make a post when I do. It's too bad this appears unmaintained ATM, but this project is too cool to die. Also: Your profile pic is awesome. |
@seanfisk Thanks, will do :) |
- Add Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
Still getting this issue:
at pinject/third_party/decorator.py", line 156 |
@AlexKovalevych, what is your Python version? Are you using the patched revision? |
@trein its 3.4.2. no, i don't think so, i've installed the master branch |
@AlexKovalevych so the master branch does not have support for Python 3. I submitted a fix for this, but it hasn't been merged yet. If you want, you can cherry-pick it: trein@fd091eb |
@trein understood, weird its not being merged yet, thank you for response |
+1 Is there anyone here? Please merge the PRs to fix the issues, esp: Python 3 Support. Thanks! |
@zixia heya! i don't think there is, but apparently it is quite easy to implement a di solution yourself - took me about 2 hours to write my own injector/container with tests and all. |
Thanks! I'll go to take a look. It seems you did a great job! However, I'm a newbie of Python, I'm familiar with DI & Angular but I'd like to use an out-of-box DI solution in python. I love this pinject because it's decorator free! 👍 |
- Add Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
- Add Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
- Use Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
- Use Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
- Use Six package, a simple utilities for wrapping over differences between Python 2 and Python 3 - Encapsulate compatibility methods in 'support.py' module - Introduce unit tests for 'support.py' module
Hello,
I decided to give pinject a try, but unfortunately it does not import. Here's what I do: install pinject with
pip install pinject
and then interactivelyimport pinject
.It seem to fail on line 156 of
third_party/decorator.py
. I'm on python 3.4 so maybe that's the reason although looking at code I can see blocks dealing with python >3.2Is that a bug?
The text was updated successfully, but these errors were encountered: