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

Get support for new 3.5 Python coroutines #75

Merged
merged 3 commits into from Oct 20, 2017

Conversation

Projects
None yet
5 participants
@pfreixes
Contributor

pfreixes commented Oct 7, 2016

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.

Get support for new 3.5 Python coroutines
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)

This comment has been minimized.

@thehesiod

thehesiod Dec 16, 2016

this file is missing import functools

@thehesiod

thehesiod Dec 16, 2016

this file is missing import functools

This comment has been minimized.

@pfreixes

pfreixes Dec 17, 2016

Contributor

thanks, fixed.

@pfreixes

pfreixes Dec 17, 2016

Contributor

thanks, fixed.

@azag0

This comment has been minimized.

Show comment
Hide comment
@azag0

azag0 Jun 9, 2017

Btw, this can be simply rebased on top of the current master and seems to work in Python 3.6.1.

azag0 commented Jun 9, 2017

Btw, this can be simply rebased on top of the current master and seems to work in Python 3.6.1.

@pfreixes

This comment has been minimized.

Show comment
Hide comment
@pfreixes

pfreixes Jun 9, 2017

Contributor

@rkern ping ....

Contributor

pfreixes commented Jun 9, 2017

@rkern ping ....

@azag0

This comment has been minimized.

Show comment
Hide comment
@azag0

azag0 Jun 9, 2017

Hm, ok, in Python 3.6, it works when pip-installed in devel mode, but otherwise it crashes with

ModuleNotFoundError: No module named 'line_profiler_py35'

azag0 commented Jun 9, 2017

Hm, ok, in Python 3.6, it works when pip-installed in devel mode, but otherwise it crashes with

ModuleNotFoundError: No module named 'line_profiler_py35'
@pfreixes

This comment has been minimized.

Show comment
Hide comment
@pfreixes

pfreixes Jun 9, 2017

Contributor

@azag0 should be fixed with the last commit

Contributor

pfreixes commented Jun 9, 2017

@azag0 should be fixed with the last commit

@azag0

This comment has been minimized.

Show comment
Hide comment
@azag0

azag0 Jun 10, 2017

Yep, works now.

azag0 commented Jun 10, 2017

Yep, works now.

@pfreixes

This comment has been minimized.

Show comment
Hide comment
@pfreixes

pfreixes Jun 12, 2017

Contributor

@caethan @Nodd @kmike ... this MR was here for more than half year, looks like people might be interested. any thoughts/comments?

Contributor

pfreixes commented Jun 12, 2017

@caethan @Nodd @kmike ... this MR was here for more than half year, looks like people might be interested. any thoughts/comments?

@xavieryao xavieryao referenced this pull request Oct 8, 2017

Closed

Profiling async functions #103

@Daenyth

Daenyth approved these changes Oct 8, 2017

@caethan

This comment has been minimized.

Show comment
Hide comment
@caethan

caethan Oct 9, 2017

Collaborator

Will try to take a look at it this week.

Collaborator

caethan commented Oct 9, 2017

Will try to take a look at it this week.

@pfreixes

This comment has been minimized.

Show comment
Hide comment
@pfreixes

pfreixes Oct 19, 2017

Contributor

@caethan any news about that?

Contributor

pfreixes commented Oct 19, 2017

@caethan any news about that?

@caethan

This comment has been minimized.

Show comment
Hide comment
@caethan

caethan Oct 20, 2017

Collaborator

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.

Collaborator

caethan commented Oct 20, 2017

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.

@caethan caethan merged commit e20658e into rkern:master Oct 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment