diff --git a/peps/pep-0396.rst b/peps/pep-0396.rst index bc022971f..dd2c7bc31 100644 --- a/peps/pep-0396.rst +++ b/peps/pep-0396.rst @@ -1,15 +1,21 @@ PEP: 396 Title: Module Version Numbers -Version: $Revision: 65628 $ -Last-Modified: $Date: 2008-08-10 09:59:20 -0400 (Sun, 10 Aug 2008) $ Author: Barry Warsaw -Status: Rejected +Status: Withdrawn Type: Informational Topic: Packaging -Content-Type: text/x-rst Created: 16-Mar-2011 Post-History: 05-Apr-2011 +.. withdrawn:: + + Refer to :ref:`packaging:runtime-version-access` and + :ref:`packaging:single-source-version` in the Python + Packaging User Guide for up to date recommendations on + accessing package version information at runtime, + and on defining runtime ``__version__`` attributes which are + automatically kept consistent with package distribution metadata + Abstract ======== @@ -25,14 +31,28 @@ Conformance with this PEP is optional, however other Python tools (such as ``distutils2`` [1]_) may be adapted to use the conventions defined here. -PEP Rejection -============= + +PEP Rejection/Withdrawal +======================== This PEP was formally rejected on 2021-04-14. The packaging ecosystem has changed significantly in the intervening years since this PEP was first written, and APIs such as ``importlib.metadata.version()`` [11]_ provide for a much better experience. +This rejection was reclassified as a withdrawal on 2024-10-21, +as the previous state was being misinterpreted [12]_ as suggesting +that *no* modules should be defining ``__version__`` attributes, +which definitely isn't the case. + +Modules are still free to define ``__version__`` if they choose to. +However, choosing *not* to do so won't interfere with looking up +the version information for installed distribution packages, so an +Informational PEP isn't the right tool to document community +conventions around the use of module ``__version__`` attributes +(they're better covered as part of the Python Packaging User Guide). + + User Stories ============ @@ -287,6 +307,9 @@ References .. [11] importlib.metadata (https://docs.python.org/3/library/importlib.metadata.html#distribution-versions) +.. [12] Misinterpreting the significance of this PEP's rejection + (https://discuss.python.org/t/please-make-package-version-go-away/58501) + Copyright =========