rkern / line_profiler

(OLD REPO) Line-by-line profiling for Python - Current repo ->
https://github.com/pyutils/line_profiler
Other
3.6k stars 256 forks source link

Support Python 3.7 Generator (PEP 479) #153

Open Hanaasagi opened 5 years ago

Hanaasagi commented 5 years ago

resolves #152

PEP 479 is enabled for all code in Python 3.7, meaning that StopIteration exceptions raised directly or indirectly in coroutines and generators are transformed into RuntimeError exceptions.

Hanaasagi commented 5 years ago

Travis-CI failed because setuptools has dropped Python 3.3 since v40.0.0. See https://setuptools.readthedocs.io/en/latest/history.html#v40-0-0

cclauss commented 5 years ago

@Hanaasagi Could you please try adding the .travis.yml file from #147 so we can see if the tests pass on Python 3.7?

cclauss commented 5 years ago

MAGIC!! Well done.

Hanaasagi commented 5 years ago

It failed again.

3.3 is not installed; attempting download
Downloading archive: https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/16.04/x86_64/python-3.3.tar.bz2
0.12s
$ curl -sSf -o python-3.3.tar.bz2 ${archive_url}
curl: (22) The requested URL returned error: 404 Not Found
Unable to download 3.3 archive. The archive may not exist. Please consider a different **version.**
Hanaasagi commented 5 years ago

emm, It' seems my fault.

cclauss commented 5 years ago

Please drop both Python 3.3 and 3.4 because they are end of life.

It is not your fault. Travis CI no longer provides access to Python 3.3.

Hanaasagi commented 5 years ago

It works.

Zannick commented 4 years ago

Should it also handle StopIteration on the first iterate? e.g.

93: try:
94:     item = next(g)
+   except StopIteration:
+       return
95: finally:
96:     ...

This is necessary in line_profiler.py for me, should probably also handle kernprof.py.

Hanaasagi commented 4 years ago

Looks good.

cclauss commented 4 years ago

@caethan Can we please get these changes merged so that the current Python is supported?

Erotemic commented 4 years ago

Still waiting on this.

cclauss commented 4 years ago

@rkern Would you be willing to make @Hanaasagi a maintainer of this repo so we can get this landed?

johanneswilm commented 4 years ago

@rkern It would be really good to get this moving if possible.

Erotemic commented 4 years ago

@rkern This library has been failing to install on 3.7 for 6 months now. This PR fixes it, and has been ready for many months. Are you still maintaining this repo? Is there some timeline for merging and pushing up a new release? Do you need someone to take over this project?

jberends commented 4 years ago

this package seems dead to me.. Looking for alternatives as we speak.

timabbott commented 4 years ago

This package is quite good at what it does. I think given the lack of response from the maintainers, I think one can assume they're busy with other aspects of life, and it makes sense for someone to setup a maintained friendly fork. Normally I'd volunteer, but I don't have time to pick up another project right now.

Mogost commented 4 years ago

I would nominate @Hanaasagi for this role. Since he is quite active and it is his PR that we all need so much.

Erotemic commented 4 years ago

I'll second @Hanaasagi but if they are unable, I'll volunteer. Perhaps it makes sense to setup a GitHub organization to maintain this project and have multiple people in this thread as maintainers of the repo. We could also probably ask pypi to transfer ownership of the line_profiler namespace to this group.

EDIT: I created a github organization called pyutils and I've forked this repo: https://github.com/pyutils/line_profiler. I've invited @Hanaasagi to be a member of the organization. If anyone else from this thread would like to be involved let me know and I'll send an invite. I think maintaining this repo will be much easier as a team effort than if a single person picked it up.

EDIT2:

I've merged this PR into the master branch of the fork: https://github.com/pyutils/line_profiler

I'm also creating a PR there to streamline the publishing to pypi process

I've created a pypi user to publish the package with: https://pypi.org/user/pyutils/

I've also requested the transfer of ownership here: https://github.com/pypa/pypi-support/issues/103

Hanaasagi commented 4 years ago

Thanks for the invitation. I have joined the organization.