Coder Social home page Coder Social logo

asyncio-helpers's Introduction

sci-bots

Sci-Bots organization repository

asyncio-helpers's People

Contributors

cfobel avatar

Watchers

 avatar  avatar  avatar

asyncio-helpers's Issues

build(conda): submit to `conda-forge`

Currently, this package is only available through the sci-bots Conda channel.

Since this package may be more generally useful, it should be migrated to the conda-forge channel instead.

bug(cancellable): callback `_cancel()` error

See exception below:

image

Steps to reproduce

Unfortunately, this error occurs intermittently and very infrequently. We haven't figured out a way to reliably reproduce the issue.

However, in at least one instance, this erro has occurred with the following traceback:

2018-09-12 13:32:51.760 [ERROR:trollius]: Exception in callback _cancel() at C:\Users\chris\Documents\GitHub\asyncio-helpers\src\asyncio_helpers\__init__.py:55
handle: <Handle _cancel() at C:\Users\chris\Documents\GitHub\asyncio-helpers\src\asyncio_helpers\__init__.py:55>
Traceback (most recent call last):
  File "C:\Users\chris\Miniconda2-x86\envs\db-dev-copy\lib\site-packages\trollius\events.py", line 136, in _run
    self._callback(*self._args)
  File "C:\Users\chris\Documents\GitHub\asyncio-helpers\src\asyncio_helpers\__init__.py", line 58, in _cancel
    tasks_to_cancel = asyncio.Task.all_tasks(loop=loop).copy()
  File "C:\Users\chris\Miniconda2-x86\envs\db-dev-copy\lib\site-packages\trollius\tasks.py", line 79, in all_tasks
    return set(t for t in cls._all_tasks if t._loop is loop)
  File "C:\Users\chris\Miniconda2-x86\envs\db-dev-copy\lib\site-packages\trollius\tasks.py", line 79, in <genexpr>
    return set(t for t in cls._all_tasks if t._loop is loop)
  File "C:\Users\chris\Miniconda2-x86\envs\db-dev-copy\lib\_weakrefset.py", line 60, in __iter__
    for itemref in self.data:
RuntimeError: Set changed size during iteration

feat(py3): add support for Python 3 `asyncio`

As of v0.2.1, trollius is required. However, in principle, it should also support the asyncio package added to the standard Python library in Python 3.4.

Proposed changes

  • Refactor all code using yield asyncio.From or raise asyncio.Return into separate source files, e.g., with _py2.py suffix.
  • Port all *_py2.py files to corresponding *_py3.py files.
  • Refactor all code calling functions in *_py2.py files to call either the _py2 or _py3 code, depending on the running Python version.
  • Update asyncio-helpers-feedstock recipe to only require trollius for py<34.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.