mindflayer / python-mocket

a socket mock framework - for all kinds of socket animals, web-clients included
BSD 3-Clause "New" or "Revised" License
284 stars 43 forks source link

Enabled async mocketize #115

Closed WisdomPill closed 4 years ago

WisdomPill commented 4 years ago

Solves #114

There is a weird warning that is not dependent from aiohttp

/Users/anas/.pyenv/versions/3.8.2/lib/python3.8/asyncio/selector_events.py:730: ResourceWarning: unclosed <socket.socket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>
  self._protocol = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Any ideas on how to solve?

Is it a blocking issue?

WisdomPill commented 4 years ago

I removed tests27 when python major version is 3.

I still get errors from flake on async def. I do not know if to include asyncio (bad practice imho) or to move the async code outside

mindflayer commented 4 years ago

Hi @WisdomPill, I opened a PR for fixing a couple of things you solved with a different approach I don't particularly like. For instance, tests27are tests which had Python 2.7 as minor version since I used to support version 2.6 but gevent was not supporting it. As soon as I'll make it work, I will work at the rest of your changes.

mindflayer commented 4 years ago

I've just merged your changes. Thank you very much for your contribution.

WisdomPill commented 4 years ago

Your welcome!