Skip to content

Commit d8410cb

Browse files
committed
Additional cleanups
1 parent 1517309 commit d8410cb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source/discussions/versioning.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ Version information for all :term:`distribution packages <Distribution Package>`
180180
that are locally available in the current environment can be obtained at runtime
181181
using the standard library's :func:`importlib.metadata.version` function::
182182

183-
>>> importlib.metadata.version("pip")
184-
'23.3.2'
183+
>>> importlib.metadata.version("cryptography")
184+
'41.0.7'
185185

186186
Many projects also choose to version their top level
187187
:term:`import packages <Import Package>` by providing a package level
@@ -199,12 +199,13 @@ Package publishers wishing to ensure their reported distribution package and
199199
import package versions are consistent with each other can review the
200200
:ref:`single-source-version` discussion for potential approaches to doing so.
201201

202-
However, as import packages and modules are not *required* to publish runtime
202+
As import packages and modules are not *required* to publish runtime
203203
version information in this way (see the rejected proposal in
204204
:pep:`PEP 396 <396>`), the ``__version__`` attribute should either only be
205-
queried with interfaces that are known to provide it, or else the querying
206-
code should be designed to handle the case where the attribute is missing
207-
[#fallback-to-dist-version]_.
205+
queried with interfaces that are known to provide it (such as a project
206+
querying its own version or the version of one of its direct dependencies),
207+
or else the querying code should be designed to handle the case where the
208+
attribute is missing [#fallback-to-dist-version]_.
208209

209210
Some projects may need to publish version information for external APIs
210211
that don't meet the requirements for Python distribution package

0 commit comments

Comments
 (0)