news.volyx.in

Intent to approve PEP 703: making the GIL optional (discuss.python.org)

478 points by pablogsal · 1125 days ago · 499 comments on HN

Article summary

The Python Steering Council intends to accept PEP 703, which makes the Global Interpreter Lock (GIL) optional in CPython. The council plans to introduce the no-GIL build as an experimental mode in Python 3.13, with the goal of eventually making it the default build mode. The transition will be done in stages, with careful consideration for backward compatibility and community support. The council aims to avoid a repeat of the Python 3 transition scenario, which was marked by a significant break in compatibility with Python 2.

Main themes

  • GIL removal
  • Python performance
  • backward compatibility
  • concurrency and threading
  • community support
  • transition strategy

What commenters say

  • The removal of the GIL will improve Python's performance and make it more competitive with other languages.
  • The transition to a no-GIL build mode may be difficult and could lead to a repeat of the Python 3 transition scenario.
  • The Python community should prioritize proper threading and concurrency practices to avoid common pitfalls.
  • The decision to remove the GIL is a missed opportunity for Python to develop a unique and sane multithreading model.
  • The Rust programming language provides a good example of how to handle threading safely, but its approach may not be directly applicable to Python.
  • The no-GIL build mode will require significant changes to existing C extensions and may lead to compatibility issues.
  • The Python Steering Council's approach to the transition is too cautious and may lead to a prolonged period of uncertainty.
  • The removal of the GIL will make Python less beginner-friendly due to the increased complexity of threading and concurrency.