@@ -180,8 +180,8 @@ Version information for all :term:`distribution packages <Distribution Package>`
180180that are locally available in the current environment can be obtained at runtime
181181using 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
186186Many 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
199199import 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
203203version 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
209210Some projects may need to publish version information for external APIs
210211that don't meet the requirements for Python distribution package
0 commit comments