本期主持 laike9m laixintao Adam Wen Manjusaka 勘误: Python 3 中列表解析已经不会泄露变量了,详见 https://portingguide.readthedocs.io/en/latest/comprehensions.html Keyword only argument 是在 Python 3.0 中正式加入的,详见 PEP3102 有听众反馈说,Celery 劫持 root logger 是因为在实际业务中可以依赖很多第三方库,有些设计有问题的库里面打印了大量日志,会造成日志很乱,这样就不容易找到 Celery 自己的日志,所以就直接禁掉了。供大家参考。 本期提要 00:00:35 嘉宾介绍 00:03:15 开发中踩过的坑 00:04:20 Requests UA 带来的 Github 误封问题 00:08:06 单元测试遇到的坑 00:11:53 非法 Cookies 引发的坑 00:19:38 一个不合法的 HTTP Header 00:25:01 glibc 引发的内存泄漏 00:30:20 werkzeug 的 bug 复现 PR 00:32:42 关于一些不好的库,文档,feature 的吐槽 00:33:13 Python 的 LEGB 问题 00:43:06 一些不好的库与文档, 生产环境不推荐的一些做法 00:52:20 函数参数的种类 00:57:11 Celery, asyncio, os 的一些槽点 01:12:14 一些疑难问题排查的技巧与工具 01:12:30 Py-Spy, 一个 Python 进程取样分析工具 01:17:13 构造最小可复现样例 01:18:30 Debug 技巧 01:23:40 用 PDB 来 Debug 01:26:25: pyrasite, attached 到 Python 进程的 REPL 01:29:25 休息,提升 Debug 效率的方法 01:30:50 能复现的 Bug 情况都是幸福的 01:38:05 库与文章的推荐 播客中提到的内容 Github REST API v3 Mock Python Cookie 标准库实现 Tornado 4.0 Cookies Parse 实现 RFC 7230 Section 5.4 Host Fix memory leak in Rule function builder Short description of the scoping rules? lxml Kafka Python Golang Functional options for friendly APIs Beautiful Regular expression Denial of Service - ReDoS tox Netty Request Demo linux环境内存分配原理 Buildout Google Python Style Guide 理解Python的UnboundLocalError(Python的作用域) PEP 3102 -- Keyword-Only Arguments PEP 0570 -- Positional-Only Arguments Digg's v4 launch: an optimism born of necessity. let me google that for you celery BPO-36054 BPO-29406 asyncio uvloop Py-Spy: A sampling profiler for Python programs. Sentry PDB pyrasite FreezeGun: Let your Python tests travel through time Hidden features of Python pingtop Awesome Python Click What the f*ck Python Gevent PySnooper Curious Course on Coroutines and Concurrency