Slide 1

Slide 1 text

PEP Talk b y M a r i a t t a North Bay Python 2023 https://fosstodon.org/@mariatta

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

PEP != Style Guide Documentation North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

What needs a PEP? What doesn’t need a PEP? North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

PEP Lifecycle Submit the PEP for Steering Council’s review North Bay Python 2023 PEP Talk by Mariatta https://fosstodon.org/@mariatta

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

“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

Slide 30

Slide 30 text

“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

Slide 31

Slide 31 text

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