Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 654: Add missing Python-Version header #2755

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

CAM-Gerlach
Copy link
Member

PEP 654 was implemented in Python 3.11 but is missing a Python-Version header, which resulted in it not showing up in my search for 3.11 PEPs while helping with the What's New. This adds it.

@gvanrossum
Copy link
Member

Something for the pep linter?

@CAM-Gerlach
Copy link
Member Author

We could require Python-Version on Standards Track PEPs that don't have Packaging in Topic, at least for PEPs that are Accepted or Final, though that gets to be rather specific (and is perhaps best done once we have an actual unified header parser and port the linting rules to Python, per #2587).

Using the PEP API, it looks like this was the only somewhat-recent one that meets that criteria; the next earliest was PEP 523, though there are a fair number of older ones which would need to be cleaned up anyway:

Full list
In [22]: df.loc[(df["python_version"].isna()) & ((df["status"] == "Accepted") | (df["status"] == "Final")) & (df["typ
    ...: e"] == "Standards Track") & (df["topic"] != "packaging") ]
Out[22]:
                                                  title  ...                                url

229                     Using Distutils to Build Python  ...  https://peps.python.org/pep-0229/

305                                        CSV File API  ...  https://peps.python.org/pep-0305/

307                   Extensions to the pickle protocol  ...  https://peps.python.org/pep-0307/

308                             Conditional Expressions  ...  https://peps.python.org/pep-0308/

311   Simplified Global Interpreter Lock Acquisition...  ...  https://peps.python.org/pep-0311/

341                 Unifying try-except and try-finally  ...  https://peps.python.org/pep-0341/

352                  Required Superclass for Exceptions  ...  https://peps.python.org/pep-0352/

353                     Using ssize_t as the index type  ...  https://peps.python.org/pep-0353/

397                         Python launcher for Windows  ...  https://peps.python.org/pep-0397/

409                       Suppressing exception context  ...  https://peps.python.org/pep-0409/

414             Explicit Unicode Literal for Python 3.3  ...  https://peps.python.org/pep-0414/

421                           Adding sys.implementation  ...  https://peps.python.org/pep-0421/

436                             The Argument Clinic DSL  ...  https://peps.python.org/pep-0436/

441            Improving Python ZIP Application Support  ...  https://peps.python.org/pep-0441/

443                   Single-dispatch generic functions  ...  https://peps.python.org/pep-0443/

476   Enabling certificate verification by default f...  ...  https://peps.python.org/pep-0476/

523            Adding a frame evaluation API to CPython  ...  https://peps.python.org/pep-0523/

654                        Exception Groups and except*  ...  https://peps.python.org/pep-0654/

3106      Revamping dict.keys(), .values() and .items()  ...  https://peps.python.org/pep-3106/

3119                  Introducing Abstract Base Classes  ...  https://peps.python.org/pep-3119/

3138               String representation in Python 3000  ...  https://peps.python.org/pep-3138/

3141                       A Type Hierarchy for Numbers  ...  https://peps.python.org/pep-3141/

3156  Asynchronous IO Support Rebooted: the "asyncio...  ...  https://peps.python.org/pep-3156/

[23 rows x 14 columns]

A related issue is the target Python versions of draft PEPs; it looks like a fair number are still nominally targeted for Python 3.11, and a couple to even earlier versions:

Full list
In [28]: df.loc[(df["python_version"].notna()) & (df["python_version"] != "3.12") & (df["status"] == "Draft"), ["titl
    ...: e", "url", "python_version"]]
Out[28]:
                                                title                                url python_version

467       Minor API improvements for binary sequences  https://peps.python.org/pep-0467/           3.11

554               Multiple Interpreters in the Stdlib  https://peps.python.org/pep-0554/           3.10

558                    Defined semantics for locals()  https://peps.python.org/pep-0558/           3.11

603            Adding a frozenmap type to collections  https://peps.python.org/pep-0603/            3.9

619                      Python 3.10 Release Schedule  https://peps.python.org/pep-0619/           3.10

620        Hide implementation details from the C API  https://peps.python.org/pep-0620/           3.10

664                      Python 3.11 Release Schedule  https://peps.python.org/pep-0664/           3.11

671  Syntax for late-bound function argument defaults  https://peps.python.org/pep-0671/           3.11

674                 Disallow using macros as l-values  https://peps.python.org/pep-0674/           3.11

679            Allow parentheses in assert statements  https://peps.python.org/pep-0679/           3.11

684                             A Per-Interpreter GIL  https://peps.python.org/pep-0684/           3.11

689                               Unstable C API tier  https://peps.python.org/pep-0689/           3.11

We'd need to clean up the existing examples of each first, of course, and make sure there aren't any likely edge cases.

@CAM-Gerlach
Copy link
Member Author

FYI, opened #2756 to update the Python-Versions (and/or the PEP status) on draft PEPs with outdated ones

@CAM-Gerlach
Copy link
Member Author

And opened #2757 to add Python-Version headers to those Accepted/Final Standards Track PEPs missing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants