Asyncio-cancel-token:Task cancellation pattern for asyncio applications

asyncio-cancel-token的Python项目详细描述


#异步取消标记

[![在https://gitter.im/ethereum/asyncio-cancel-token](https://badges.gitter.im/ethereum/asyncio-cancel-token.svg)](https://gitter.im/ethereum/asyncio-cancel-token?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge加入聊天室) [![生成状态](https://circleci.com/gh/ethereum/asyncio-cancel-token.svg?style=shield)](https://circleci.com/gh/ethereum/asyncio-cancel-token) [![PYPI版本](https://badge.fury.io/py/asyncio-cancel-token.svg)](https://badge.fury.io/py/asyncio-cancel-token) [![python版本](https://img.shields.io/pypi/pyversions/asyncio-cancel-token.svg)](https://pypi.python.org/pypi/asyncio-cancel-token) [![文档生成](https://readthedocs.org/projects/asyncio-cancel-token/badge/?version=latest)](http://asyncio-cancel-token.readthedocs.io/en/latest/?徽章=最新)

异步应用程序的任务取消模式。

阅读[关于readthedocs的文档](https://asyncio-cancel-token.readthedocs.io/)中的更多内容。[查看更改日志](https://asyncio-cancel-token.readthedocs.io/en/latest/releases.html)。

##快速启动

`sh pip install asyncio-cancel-token `

##开发人员设置

如果您想破解Asyncio Cancel令牌,请查看 [以太坊开发战术手册](https://github.com/pipermerriam/ethereum-dev-tactical-manual) 有关我们如何做的信息:

  • 测试
  • 拉取请求
  • 代码样式
  • 文档

###开发环境设置

您可以使用以下命令设置开发环境:

`sh git clone git@github.com:ethereum/asyncio-cancel-token.git cd asyncio-cancel-token virtualenv -p python3 venv . venv/bin/activate pip install -e .[dev] `

###测试设置

在开发过程中,您可能希望在每次保存文件时都运行测试。

更改文件时显示flake8错误:

`sh # Test flake8 when-changed-v-s-r-1 cancel_token/ tests/ -c "clear; flake8 cancel_token tests && echo 'flake8 success' || echo 'error'" `

在一个命令中运行多进程测试,但不使用颜色:

`sh # in the project root: pytest --numprocesses=4--looponfail--maxfail=1 # the same thing, succinctly: pytest -n 4 -f--maxfail=1 `

在一个线程中运行,带有颜色和桌面通知:

`sh cd venv ptw --onfail"notify-send-t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on asyncio-cancel-token failed'" ../tests../cancel_token `

###释放设置

对于类似Debian的系统: ` apt install pandoc `

发布新版本:

`sh make release bump=$$VERSION_PART_TO_BUMP$$ `

####如何增强版本

此回购协议的版本格式为稳定的{major}.{minor}.{patch},并且 {major}.{minor}.{patch}-{stage}.{devnum}表示不稳定(stage可以是alpha或beta)。

要发布第行的下一个版本,请指定要凹凸的部分, 像make release bump=minormake release bump=devnum

如果您是beta版本,则make release bump=stage将切换到稳定版本。

若要在当前版本稳定时发布不稳定版本,请指定 新版本,如make release bump=”–新版本4.0.0-alpha.1 devnum“

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在IntelliJ中导入Gradle项目?   java使用dropwizard在ContainerResponseFilter上注入HttpServletRequest HttpServletRequest   基于Java的简单规则引擎的回退实现   java无法在引号“”中获取字符串值(Android)   直接从java书籍中复制的用户界面代码不希望运行   java如何检查已安装的libevent版本?   javascript如何在CryptoJS中解密文件,由JAVA使用AES加密   如何为自制软件打包Java GUI应用程序   java IntelliJ,在调试模式下运行glassfish,未部署工件   swing重新打开以前关闭的窗口Java   带参数的java测试资源   此URL不支持java HTTP Status 405 HTTP方法GET,即使没有doget()方法   java Heroku应用程序使用s3上传图像   java使两个水平文本视图在一起小于某个宽度时保持左侧,但如果它们大于宽度,则省略左侧视图?   Thymeleaf中的java绑定列表;索引超出范围   java类型JspWriter中的print(boolean)方法不适用于参数   java安卓要么没有足够的内存用于后台任务,要么GC有问题   如何使用证书过期的旧java小程序?   java如何从事件中获取数据到主函数?