-
Notifications
You must be signed in to change notification settings - Fork 4
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
AttributeError: type object 'PrettyPrinter' has no attribute '_format_dict_items' #2
Comments
Thanks for mentioning. I made it throw a runtime error for now. Let me know if this is not desired :) see: 1ffbe71 |
I would love this in our Python 3.4 project and given that Python 3.4 is end of life in March 2019 (and I don't think redhat is going to upgrade before that :'( ) i'm willing to spend some time to get this working. How would you feel about including a backport of pprint in this package? It would give all 3.x users the ability to run this project. Downsides of course would be having to maintain the backport and it would probably be a good idea to include 3.4 in the travis test matrix. If you think this is a good idea I can work on a pull-request. |
I think it would be very nice to support 3.x. I feel obligated to warn you that it can be very challenging (and frustrating) to make the printer work. Can I ask why you need it for 3.4? I imagined that it would only be run once for a given endpoint, which you could do with a different version? |
All our projects run on 3.4 for now, we do local development in Docker containers (besides all the other advantages Docker has, all modern Linux distro's are at least on 3.5 :) ). So in theory upgrading to 3.5 is pretty easy but that would mean rebuilding our containers everytime we need pprint and I would rather avoid that. Running a higher Python version locally than in production is also not something I feel very comfortable with. I would really love to upgrade to Python 3.6 and I have been advocating for this for a while but that's going to take a while! I'll try if I can make a pull-request this weekend so I can check how much work it is :) |
Best of luck! There's certainly good arguments to be made for 3.6. Maybe your team needs speed and a nice async api^^ I still don't understand why you'd need |
Note to self (or anyone interested in working on |
When running with Python 3.4
Looking at https://github.com/python/cpython/blob/3.4/Lib/pprint.py you can see that this was introduced in 3.5: https://github.com/python/cpython/blob/3.5/Lib/pprint.py.
Might be worth mentioning that only Python 3.5 and higher are supported!
The text was updated successfully, but these errors were encountered: