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

Merging #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Merging #1

wants to merge 6 commits into from

Conversation

ogre2007
Copy link

@ogre2007 ogre2007 commented Mar 18, 2018

Hello! Did some work on merging r2pipe/python and r2pipe/python-async (now it's merged in r2/python, but r2pipe/python-async is still there without any changes).

There are still some issues with async code - it's throwing ignored exceptions when "Open" class is destroyed (as I think). Need some help to fix it.
Exception ignored in: <bound method BaseSubprocessTransport.__del__ of <_UnixSubprocessTransport closed pid=4931 running stdin=<_UnixWritePipeTransport closed fd=7 closed> stdout=<_UnixReadPipeTransport closing fd=9 open»>

May be related python/asyncio#473

In short: async code moved to r2pipe sync module.

Now there is no "open" class in __init__.py.

It's functionality moved to  OpenBase class in open_base.py and modified.
Now, instead of using a one class for both of the python version subsets, we import "open" class from the open_sync.py for < 3.0 version, and class with same name from open_async.py for >= 3.0  versions.

Those classes are derived from the OpenBase class.  Howewer, they have differences.
"open" class in open_sync.py -- its just some code, removed from original "open" god object in the old __init__.py script.
"open" class in open_async.py -- code, that were used in open_p3.py in r2pipe-async module.

TODO: try to use it; find bugs
…rning result from coroutines. Code is working, but still throwing some Ignored exceptions
@XVilka
Copy link
Owner

XVilka commented Mar 19, 2018

Please send the PR to https://github.com/radare/radare2-r2pipe instead.

import socket
import urllib
from io import TextIOWrapper
from subprocess import Popen, PIPE

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why so much empty space?

# -*- coding: utf-8 -*-
"""open_sync.py
This script use code from old __init__.py open object

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much empty space again

XVilka pushed a commit that referenced this pull request May 25, 2020
small update open_sync.py (remove utf-8 decodes)
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

Successfully merging this pull request may close these issues.

2 participants