summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-01 03:11:29 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-01 03:11:29 (GMT)
commit95fc53f2b378e603dadb3629597b053c13e45965 (patch)
treef37a8730f28839cac28c6ffded0a6bf057af6a22 /Doc/library
parentab3bea6815a236af940b7d25a0d295e6bbf20c5b (diff)
downloadcpython-95fc53f2b378e603dadb3629597b053c13e45965.zip
cpython-95fc53f2b378e603dadb3629597b053c13e45965.tar.gz
cpython-95fc53f2b378e603dadb3629597b053c13e45965.tar.bz2
Clean up packaging.util: add __all__, remove some unused functions.
This huge module is the heir of six distutils modules, and contains a number of miscellaneous functions. I have attempted to help readers of the source code with an annoted __all__. Removed or deprecated functions have been removed from the documentation; I’m working on another patch to document the remaining public functions. For the curious: The unzip_file and untar_file were used by (or intended to be used by) “pysetup install path/to/archive.tar.gz”, but the code presently used shutil.unpack_archive and an helper function, so I just deleted them. They’re still in the repository if we need them in the future. The find_packages function is not used anymore but I want to discuss module and package auto-discovery (in “pysetup create”) again before removing it. subst_vars now lives in sysconfig; rfc822_escape is inlined in packaging.metadata. Other functions are for internal use only, or deprecated; I have left them out of __all__ and sprinkled TODO notes for future cleanups.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/packaging.util.rst37
1 files changed, 0 insertions, 37 deletions
diff --git a/Doc/library/packaging.util.rst b/Doc/library/packaging.util.rst
index b95d5b5..019f3e9 100644
--- a/Doc/library/packaging.util.rst
+++ b/Doc/library/packaging.util.rst
@@ -90,34 +90,6 @@ This module contains various helpers for the other modules.
Search the path for a given executable name.
-.. function:: subst_vars(s, local_vars)
-
- Perform shell/Perl-style variable substitution on *s*. Every occurrence of
- ``$`` followed by a name is considered a variable, and variable is
- substituted by the value found in the *local_vars* dictionary, or in
- ``os.environ`` if it's not in *local_vars*. *os.environ* is first
- checked/augmented to guarantee that it contains certain values: see
- :func:`check_environ`. Raise :exc:`ValueError` for any variables not found
- in either *local_vars* or ``os.environ``.
-
- Note that this is not a fully-fledged string interpolation function. A valid
- ``$variable`` can consist only of upper and lower case letters, numbers and
- an underscore. No { } or ( ) style quoting is available.
-
-
-.. function:: split_quoted(s)
-
- Split a string up according to Unix shell-like rules for quotes and
- backslashes. In short: words are delimited by spaces, as long as those spaces
- are not escaped by a backslash, or inside a quoted string. Single and double
- quotes are equivalent, and the quote characters can be backslash-escaped.
- The backslash is stripped from any two-character escape sequence, leaving
- only the escaped character. The quote characters are stripped from any
- quoted string. Returns a list of words.
-
- .. TODO Should probably be moved into the standard library.
-
-
.. function:: execute(func, args[, msg=None, verbose=0, dry_run=0])
Perform some action that affects the outside world (for instance, writing to
@@ -175,12 +147,3 @@ This module contains various helpers for the other modules.
figure out to use direct compilation or not (see the source for details).
The *direct* flag is used by the script generated in indirect mode; unless
you know what you're doing, leave it set to ``None``.
-
-
-.. function:: rfc822_escape(header)
-
- Return a version of *header* escaped for inclusion in an :rfc:`822` header, by
- ensuring there are 8 spaces space after each newline. Note that it does no
- other modification of the string.
-
- .. TODO this _can_ be replaced