2022-10-15 –, pyconjp_2
Language: English
3.11 is the latest release of CPython. Scheduled for October 2022, Python 3.11 comes with new language features like exception groups and asyncio task groups. The biggest change in 3.11 compared with 3.10 and below is speed. 3.11 is the fastest version of CPython yet. In this talk, we will showcase benchmarks on Python 3.11’s speed gains and where to expect improvement in your code.
Talk Outline:
- Summary of 3.0 - 3.10 main features
- What did I miss in 3.10? (3 minutes)
- Installing Python 3.11 (the easy way)
- Changes to exceptions and error handing
- Better exception messages and contextual errors
- Exception Groups and how to use them
- Tracing in Exception Groups
- Using
except*
to have filtered exception group handlers - Asyncio Task Groups - a better API for gathering
- Updates to typing
- The Self type
- Variadic generics (and what that means)
- Data class transforms in typing
- New modules in 3.11
- TOMLlib for TOML deserialising
- Performance improvements
- Approaches to improving Python performance
- Latest advice on Profiling Python code
- Python 3.11 Specializing Adaptive Interpreter
- Benchmark data for 3.9, 3.10 and 3.11
- Python 3.12 and Beyond, what can we expect?
- Summary
Anthony Shaw is a Python advocate at Microsoft from Sydney, Australia. Anthony is a contributor to many open-source communities. Running and contributing to several popular open-source tools for DevOps, Security, Automation and Code Quality. Anthony has been recognised for his contribution to open-source, including as Fellow of the Python Software Foundation and member of the Apache Software Foundation. Anthony runs a Python blog and YouTube channel and has recently published a book, "CPython Internals", on the Python compiler.