diff options
| author | Athos Ribeiro <athoscr@fedoraproject.org> | 2020-08-04 10:31:11 +0200 |
|---|---|---|
| committer | Athos Ribeiro <athoscr@fedoraproject.org> | 2020-08-04 10:46:28 +0200 |
| commit | 44ca8aa51c39bea0c68444389d6ec215bcf98d02 (patch) | |
| tree | 3b256ca68273445ae56e8b3dac9e16af163b0e54 | |
| parent | 5e60dc50e540a942aeb558aabe7d92ab7eb13d4b (diff) | |
| download | python-setuptools-git-44ca8aa51c39bea0c68444389d6ec215bcf98d02.tar.gz | |
Improve safe_version documentation
| -rw-r--r-- | changelog.d/2300.doc.rst | 1 | ||||
| -rw-r--r-- | docs/pkg_resources.txt | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/changelog.d/2300.doc.rst b/changelog.d/2300.doc.rst new file mode 100644 index 00000000..3b06cc5f --- /dev/null +++ b/changelog.d/2300.doc.rst @@ -0,0 +1 @@ +Improve the ``safe_version`` function documentation diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index f2e554f4..7d0d8da9 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -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 |
