-
Notifications
You must be signed in to change notification settings - Fork 254
Get support for new 3.5 Python coroutines #75
Conversation
This commit implement the proper stuff to decorate the new coroutine style implemented by Python3.5 and their new statments, making the canonical `profile` decorator compatible. To hide incompatible 3.5 statements between versions. The idea is be able to run all Python versions, since 2.X to 3.5 without break the current behaviour. The Python 3.5 specific code is hidden into private files that will be imported only in 3.5 environments.
""" | ||
Wrap a Python 3.5 coroutine to profile it. | ||
""" | ||
@functools.wraps(func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is missing import functools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed.
Btw, this can be simply rebased on top of the current master and seems to work in Python 3.6.1. |
@rkern ping .... |
Hm, ok, in Python 3.6, it works when pip-installed in devel mode, but otherwise it crashes with
|
@Azag0 should be fixed with the last commit |
Yep, works now. |
Will try to take a look at it this week. |
@caethan any news about that? |
Looks good! Thanks for the patience and sorry for the delay in reviewing it. I'll merge it and see about going through other pull requests to see if anything else should get pulled in for a 2.1 release. |
This commit implement the proper stuff to decorate
the new coroutine style implemented by Python3.5 and their new
statments, making the canonical
profile
decorator compatible.To hide incompatible 3.5 statements between versions. The idea is be able
to run all Python versions, since 2.X to 3.5 without break the current behaviour.
The Python 3.5 specific code is hidden into private files that will be imported only in
3.5 environments.