Python 3.5 正式发布,标准库禁用 SSLv3
欢迎加入运维网交流群:263444886Python 3.5 正式发布,此版本主要改进如下:
新语法特性
[*] PEP 492, 异步协同和 await 语法
[*] PEP 465, 新矩阵乘法运算符: a @ b.
[*] PEP 448, additional unpacking generalizations.
新库模块
[*] typing: PEP 484 – Type Hints.
[*] zipapp: PEP 441 改进 Python ZIP 应用支持.
新内置特性
[*] bytes % args, bytearray % args: PEP 461 –添加 % 格式化字节和字节数组
[*] b'\xf0\x9f\x90\x8d'.hex(), bytearray(b'\xf0\x9f\x90\x8d').hex(),memoryview(b'\xf0\x9f\x90\x8d').hex(): issue 9951 - 添加 hex 模块
[*] memoryview 支持 tuple indexing (including multi-dimensional).(Contributed by Antoine Pitrou in issue 23632.)
[*] Generators 添加了新 gi_yieldfrom 属性(Contributedby Benno Leslie and Yury Selivanov in issue 24450.)
[*] 新 RecursionError 异常 (Contributed by Georg Brandlin issue 19235.)
CPython 实现改进
[*] 当 LC_TYPE locale 是 POSIX locale (C locale)时,sys.stdin 和 sys.stdout 现在使用 surrogateescape 错误处理器,替换之前的 strict 错误处理器(Contributed by Victor Stinner in issue 19977.)
[*] .pyo 不再使用,用另外一个灵活的模式替换(See PEP 488 overview.)
[*] 内置和扩展模块加载改进(See PEP 489 overview.)
标准库值得关注的改进
[*] collections.OrderedDict 现在使用 C 实现,比之前速度快4 到 100 倍
[*] ssl 模块 支持 Memory BIO
[*] 新 os.scandir() 函数
[*] functools.lru_cache() 大部分使用 C 实现
[*] 新 subprocess.run() 函数
[*] 增强 traceback 模块,提升性能
安全改进
[*] 整个标准库中禁用 SSLv3 (See issue 22638 for more details; this change wasbackported to CPython 3.4 and 2.7.)
[*] HTTP cookie 解析现在更为严格,为了防止潜在的注入攻击 (Contributed by Antoine Pitrouin issue 22796.)
Windows 改进:
[*] Windows 新安装器,替换了之前的 MSI
[*] Windows 构建现在使用 Microsoft Visual C++ 14.0,扩展模块也是一样
更多内容请看新特性介绍页面和发行说明。
下载:https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
页:
[1]