是否有考虑添加async的支持?
Thank you for suggesting this feature. If you're interested in contributing, we'd warmly welcome a Pull Request with the implementation
Thank you for suggesting this feature. If you're interested in contributing, we'd warmly welcome a Pull Request with the implementation
看了下源码,目前代码没有引入任何第三方库,使用的是python自带的http库。没有python自带的http库支持async,加入该特性会引入第三方的库。 另外新的async/await的语法在python 2.7上会报错,如果加入,就不可能支持python 2.7。 感觉原库的设计太多跟线程相关,使用线程池来实现较简单,可以在每个方法上加个转异步的装饰器就可以。但是感觉没有必要,用户自己转就可以,但毕竟不是原生的异步,感觉不太优雅
是的,之前有考虑过对gevent、async这些库做适配支持,但确实对老的python版本不兼容,我们需要考虑之前用户的实际情况。另外nacos-python-sdk最近也在对2.x grpc协议适配过程中,到时候会升一个大版本,需不需要对老的python版本进行支持也欢迎社区给出建议~
https://github.com/nacos-group/nacos-sdk-python/issues/175 欢迎投票
试试看这个版本 https://github.com/nacos-group/nacos-sdk-python?tab=readme-ov-file#nacos-sdk-python-v2