Skip to content

Commit

Permalink
Merge pull request #2300 from athos-ribeiro/safe_verion-docs
Browse files Browse the repository at this point in the history
Improve safe_version documentation
  • Loading branch information
jaraco committed Aug 12, 2020
2 parents 6224065 + 44ca8aa commit f62a833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/2300.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve the ``safe_version`` function documentation
12 changes: 6 additions & 6 deletions docs/pkg_resources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1596,12 +1596,12 @@ Parsing Utilities
See ``to_filename()``.

``safe_version(version)``
This will return the normalized form of any PEP 440 version, if the version
string is not PEP 440 compatible than it is similar to ``safe_name()``
except that spaces in the input become dots, and dots are allowed to exist
in the output. As with ``safe_name()``, if you are generating a filename
from this you should replace any "-" characters in the output with
underscores.
This will return the normalized form of any PEP 440 version. If the version
string is not PEP 440 compatible, this function behaves similar to
``safe_name()`` except that spaces in the input become dots, and dots are
allowed to exist in the output. As with ``safe_name()``, if you are
generating a filename from this you should replace any "-" characters in
the output with underscores.

``safe_extra(extra)``
Return a "safe" form of an extra's name, suitable for use in a requirement
Expand Down

0 comments on commit f62a833

Please sign in to comment.