Giter Site home page Giter Site logo

Comments (6)

dims avatar dims commented on June 30, 2024 1

@freeekanayaka : we could pose this debate if there's some actual proof of concept for what you are saying. can you please show us something that works? (at least subject to criteria from @mbohlool here (#114 (comment)) even if it is just python 3.x.

from python.

mbohlool avatar mbohlool commented on June 30, 2024 1

Please do let us know when you did those experiments. I am interested in seeing some kind of proof of concept. I think we need to continue support python 2. but that does not mean we can't have a separate async support for python 3. I will close this ticket, but please open it again any time you have more information.

from python.

mbohlool avatar mbohlool commented on June 30, 2024

This client is evolved from swager-codegen's generated client that uses urllib. It supports asynchronous calls but it creates a new thread. I am not familiar with asyncio much but from a glance, it is async in single thread that is nice. If it is possible to implement all functionalities required in rest.py and api_client.py using an asynchronous library, I have no objection. As long as the interface stays the same. I simply do not have time to research/do it in near future though.

from python.

mbohlool avatar mbohlool commented on June 30, 2024

Oh, look like asyncio introduced in python 3.4. We need to support both 2.7 and 3.X.

from python.

freeekanayaka avatar freeekanayaka commented on June 30, 2024

Yes, asyncio is Python 3 only. For Python 2 and 3 the equivalent technology would be Python Twisted, but it feels a stretch.

Personally I would value the possibility to write asynchronous code more than Python 2 compatibility (for the Python-written controllers/operators use case), but YMMV. So feel free to close the issue.

from python.

freeekanayaka avatar freeekanayaka commented on June 30, 2024

@dims I'm afraid for now I won't be able to provide that. I might start to experiment with Python-written controllers/operators in the near term, and when the time comes I'll probably write an asynchronous client, since I'm convinced it's the best model for such code (it's really and event-driven watch loop). If Python 2 support is a requirement for this particular client, it's probably best to stick with what you have and close this ticket, which was mainly me asking if you had considered asyncio as alternate option. Thanks!

from python.

Related Issues (20)

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.