Skip to content
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

TypeError during exit with Python 3.4.3 #98

Closed
nikolay opened this issue Feb 28, 2015 · 5 comments
Closed

TypeError during exit with Python 3.4.3 #98

nikolay opened this issue Feb 28, 2015 · 5 comments

Comments

@nikolay
Copy link

nikolay commented Feb 28, 2015

$ peru reup
Exception ignored in: <bound method _UnixSelectorEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "/Users/user/Projects/project/.pyenv/versions/3.4.3/lib/python3.4/asyncio/base_events.py", line 361, in __del__
  File "/Users/user/Projects/project/.pyenv/versions/3.4.3/lib/python3.4/asyncio/unix_events.py", line 57, in close
  File "/Users/user/Projects/project/.pyenv/versions/3.4.3/lib/python3.4/asyncio/unix_events.py", line 138, in remove_signal_handler
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

This used to work with Python 3.4.2.

@oconnor663
Copy link
Member

I'm able to repro the same error on Python 3.4.3 when I sync or reup my dotfiles. Only repros when actual fetching happens, which is every time for reup but only with a clear cache for sync. Looks like the commands are succeeding, but something is printing an error as objects are getting finalized. Same thing with the peru tests: they pass but print this error at the end.

@oconnor663 oconnor663 changed the title Issues with Python 3.4.3 TypeError during exit with Python 3.4.3 Feb 28, 2015
@oconnor663
Copy link
Member

This seems to be a bug with Python itself. It repros in this toy program too:

import asyncio
@asyncio.coroutine
def main():
    p = yield from asyncio.create_subprocess_shell('echo hi')
    yield from p.wait()
asyncio.get_event_loop().run_until_complete(main())

I've reported it: http://bugs.python.org/issue23548 I'll keep this issue open until either the Python folks fix it or we find a workaround for peru. As far as I can tell the problem is just cosmetic, luckily.

@nikolay
Copy link
Author

nikolay commented Feb 28, 2015

@oconnor663 Sorry to blame it on Peru. It seems that Python is more buggy than it should be - like the other issue I reported also came out to be a core Python issue. Thanks for investigating this so quickly!

@oconnor663
Copy link
Member

No worries! It's good that you reported it, because we'll at least be able to put a workaround in master before it affects any of the major distros. GvR responded to the issue above and suggested that we make sure to call get_event_loop().close(), which seems to work fine.

@nikolay
Copy link
Author

nikolay commented Mar 6, 2015

@oconnor663 Works perfectly! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants