Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PEP Talk

PEP Talk

If you use Python, chances are you've heard of PEP 8, the Python style guide.

But do you know what PEPs really are? PEPs are more than just a style guide. A PEP stands for Python Enhancement Proposal. It's a proposal documentation for when you want to change the Python programming language in a big way, for example when you want to change the syntax of Python. Think of the addition of f-strings, the walrus operator, or the ExceptionGroup, those changes all started with a PEP.

Let's have a PEP talk, where you can learn about the PEP process, what needs a PEP and what doesn't, and how you as community members can take part.

Mariatta

July 29, 2023
Tweet

More Decks by Mariatta

Other Decks in Technology

Transcript

  1. PEP Talk b y M a r i a t

    t a North Bay Python 2023 https://fosstodon.org/@mariatta
  2. PEP 8: Style Guide for Python Code North Bay Python

    2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  3. PEP 8: Style Guide for Python Code North Bay Python

    2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  4. PEP 8: Style Guide for Python Code “This document gives

    coding conventions for the Python code comprising the standard library in the main Python distribution.” North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  5. PEP != Style Guide Documentation North Bay Python 2023 PEP

    Talk by Mariatta https://fosstodon.org/@mariatta
  6. PEP != Style Guide Documentation So … what’s a PEP?

    North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  7. PEP 1: PEP Purpose and Guidelines “PEP stands for Python

    Enhancement Proposal. A PEP is a design document providing information to the Python community, or describing a new feature or its processes or environment. The PEP should provide a concise technical specification of the feature and a rationale for the feature.” North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  8. What needs a PEP? What doesn’t need a PEP? North

    Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  9. Making Changes to Python Bugs, crashes, docs issues, feature requests,

    etc File them on GitHub: https://github.com/python/cpython North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  10. Making Changes to Python Changes to the language itself, grammar,

    syntax, adding a new module, new keyword, new operator: PEP required North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  11. Example PEPs PEP 498: Literal String Interpolation (f-strings) PEP 572:

    Assignment Expressions (the “walrus” operator) PEP 654: Exception Group and excepts PEP 492: Coroutines with async and await Typing PEPs: PEP 482, 483, 484, 526, 561, etc Packaging PEPs North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  12. Governance PEPs PEP 13: Python Language Governance PEP 609: PyPA

    Governance PEP 8000: Python Language Governance Proposal Overview PEP 8016: The Steering Council Model PEP 810x: Steering Council elections North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  13. Core Workflow and Infrastructure PEPs PEP 512: Migrating from hg.python.org

    to GitHub PEP 581: Using GitHub Issues for Python PEP 545: Python Documentation Translations PEP 676: PEP Infrastructure Process North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  14. Release PEPs PEP 719: Python 3.13 Release Schedule PEP 693:

    Python 3.12 Release Schedule PEP 664: Python 3.11 Release Schedule … Also at https://devguide.python.org/versions/#versions North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  15. PEP Lifecycle Start with an idea for Python North Bay

    Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  16. PEP Lifecycle Start with an idea for Python North Bay

    Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  17. problem PEP Lifecycle Start with an idea for Python North

    Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  18. PEP Lifecycle Discuss your idea problem with core devs and

    contributors - open an issue on GitHub1 - start a thread on Python Discourse2 - discuss at Python Language Summit at PyCon US North Bay Python 2023 PEP Talk by Mariatta 1: https://github.com/python/cpython 2: https://discuss.python.org/c/core-dev/23 https://fosstodon.org/@mariatta
  19. PEP Lifecycle If it can’t be solved by third party

    library on PyPI, If it requires changes to the language itself You’ll need a PEP (and a PEP sponsor) North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  20. PEP Lifecycle Write the PEP Champion your idea solution to

    your problem Document discussions, questions, pushbacks, reasonings, etc North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  21. PEP Lifecycle Submit the PEP for Steering Council’s review North

    Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  22. PEP Lifecycle PEP accepted? Congrats!!! 🎉 It can be included

    in Python North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  23. PEP Lifecycle PEP is a proposal doc, not feature documentation

    The feature should be documented at docs.python.org North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  24. PEP Lifecycle Could take months, and in some cases: years

    PEP 525 (async generator): 2 months PEP 557 (data classes): 9 months PEP 572 (the walrus): 18 months PEP 517 (build system/Packaging): 2 years Most time are spent in discussions and consensus building North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  25. Your Role PEPs will affect how you use Python (things

    could break) Python core devs have blind spots: Your input matters Bring up your concerns during PEP discussion period North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  26. Case study: PEP 563 (2017) vs PEP 649, Pydantic, FastAPI

    (2021) North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  27. Case study: PEP 563 (2017) vs PEP 649, Pydantic, FastAPI

    (2021) North Bay Python 2023 PEP Talk by Mariatta P.S. PEP 649 was accepted May 2023 https://fosstodon.org/@mariatta
  28. Your Role Keep up to date with PEPs! New PEPs

    are announced on Discourse: discuss.python.org/c/peps Test your code against Python pre-releases: (alpha, beta, release candidate): check the Release Schedule North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  29. “The steering council shall work to: … Seek consensus among

    contributors and the core team…”, PEP 8016 North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  30. “A PEP is a design document providing information to the

    Python community”, PEP 1 North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta
  31. Thank You North Bay Python 2023 P E P Ta

    l k b y M a r i a t t a https://fosstodon.org/@mariatta