Closed maiksprenger closed 10 years ago
I personally don't use Python 3 but I guess I have to take the plunge some time, it might as well be with this. I will add support for Python 3 and some other misc stuff (like making enabling/disabling the panel actually do something) near the end of this month.
I'm a newcomer to Python but I managed to get it working in Python 3 with very little tinkering but I'm not sure if the values are accurate. Here's what I did to get it to actually run:
I changed these 2 values from None
to 0
.
So that snippet now looks like:
results.timings.setdefault(key, {})[name_self] = {
'count': 0,
'min': 0,
'max': 0,
'total': 0,
'avg': 0,
'is_base': False,
'queries': 0,
'query_duration': 0
}
I don't want to send a pull request because I didn't run it past any tests. All I know is that it no longer throws an error using Python 3.3.2 and it seems to have timing values for the templates.
@orf, is this the proper fix?
I think so @AntelopeSalad, thanks! I will add this soon :)
@maikhoepfel I have pushed a new release out (0.6), it should support Python 3 + enabling/disabling of the panel. Let me know if you run into any problems with it.
@orf Thanks a bunch! Will add it again once we do our next speed runs :)
I just investigated Python 3 compatibility in Oscar (https://github.com/tangentlabs/django-oscar/issues/780). The template timings panel unfortunately currently fails when trying to open any URLs with the development server.
Stacktrace
Any plans to support it?