annotate Lib/distutils/errors.py @ 87690:66c1c9f32567 default tip

Add use_weakref option to functools.lru_cache The use_weakref option makes lru_cache create weak references to the function arguments when creating the cache key, which prevents them from staying in the memory forever even after all other references to them are gone. This is a proof of concept for http://bugs.python.org/issue19859
author Radomir Dopieralski <devel@sheep.art.pl>
date Tue, 03 Dec 2013 16:02:48 +0100
parents 7d69d04522e3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
1 """distutils.errors
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
2
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
3 Provides exceptions used by the Distutils modules. Note that Distutils
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
4 modules may raise standard exceptions; in particular, SystemExit is
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
5 usually raised for errors that are obviously the end-user's fault
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
6 (eg. bad command-line arguments).
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
7
26207
ffec67409140 Fix docstring typo; remove 'created' line
Andrew M. Kuchling <amk@amk.ca>
parents: 13750
diff changeset
8 This module is safe to use in "from ... import *" mode; it only exports
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
9 symbols whose names start with "Distutils" and end with "Error"."""
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
10
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
11 class DistutilsError (Exception):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
12 """The root of all Distutils evil."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
13 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
14
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
15 class DistutilsModuleError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
16 """Unable to load an expected module, or to find an expected class
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
17 within some module (in particular, command modules and classes)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
18 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
19
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
20 class DistutilsClassError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
21 """Some command class (or possibly distribution class, if anyone
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
22 feels a need to subclass Distribution) is found not to be holding
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
23 up its end of the bargain, ie. implementing some part of the
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
24 "command "interface."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
25 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
26
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
27 class DistutilsGetoptError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
28 """The option table provided to 'fancy_getopt()' is bogus."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
29 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
30
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
31 class DistutilsArgError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
32 """Raised by fancy_getopt in response to getopt.error -- ie. an
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
33 error in the command line usage."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
34 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
35
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
36 class DistutilsFileError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
37 """Any problems in the filesystem: expected file not found, etc.
81039
7d69d04522e3 Replace IOError with OSError (#16715)
Andrew Svetlov <andrew.svetlov@gmail.com>
parents: 71540
diff changeset
38 Typically this is for problems that we detect before OSError
7d69d04522e3 Replace IOError with OSError (#16715)
Andrew Svetlov <andrew.svetlov@gmail.com>
parents: 71540
diff changeset
39 could be raised."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
40 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
41
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
42 class DistutilsOptionError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
43 """Syntactic/semantic errors in command options, such as use of
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
44 mutually conflicting options, or inconsistent options,
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
45 badly-spelled values, etc. No distinction is made between option
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
46 values originating in the setup script, the command line, config
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
47 files, or what-have-you -- but if we *know* something originated in
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
48 the setup script, we'll raise DistutilsSetupError instead."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
49 pass
10435
324450ea5450 First checkin of real Distutils code.
Greg Ward <gward@python.net>
parents:
diff changeset
50
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
51 class DistutilsSetupError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
52 """For errors that can be definitely blamed on the setup script,
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
53 such as invalid keyword arguments to 'setup()'."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
54 pass
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
55
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
56 class DistutilsPlatformError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
57 """We don't know how to do something on the current platform (but
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
58 we do know how to do it on some platform) -- eg. trying to compile
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
59 C files on a platform not supported by a CCompiler subclass."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
60 pass
11115
dcc09228a3d2 Don't pollute importer's namespace with type objects from types modules.
Greg Ward <gward@python.net>
parents: 10435
diff changeset
61
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
62 class DistutilsExecError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
63 """Any problems executing an external program (such as the C
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
64 compiler, when compiling C files)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
65 pass
11193
89961b6813ac Added DistutilsExecError, DistutilsValueError.
Greg Ward <gward@python.net>
parents: 11115
diff changeset
66
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
67 class DistutilsInternalError (DistutilsError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
68 """Internal inconsistencies or impossibilities (obviously, this
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
69 should never be seen if the code is working!)."""
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
70 pass
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
71
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
72 class DistutilsTemplateError (DistutilsError):
13750
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
73 """Syntax error in a file list template."""
dfdb911cbec2 Added DistutilsTemplateError.
Greg Ward <gward@python.net>
parents: 13012
diff changeset
74
56741
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
75 class DistutilsByteCompileError(DistutilsError):
a3cb812d80f9 Merged revisions 75704 via svnmerge from
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 43026
diff changeset
76 """Byte compile error."""
12157
be2f003d47cc Added DistutilsInternalError.
Greg Ward <gward@python.net>
parents: 11897
diff changeset
77
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
78 # Exception classes used by the CCompiler implementation classes
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
79 class CCompilerError (Exception):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
80 """Some compile/link operation failed."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
81
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
82 class PreprocessError (CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
83 """Failure to preprocess one or more C/C++ files."""
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
84
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
85 class CompileError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
86 """Failure to compile one or more C/C++ source files."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
87
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
88 class LibError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
89 """Failure to create a static library from one or more C/C++ object
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
90 files."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
91
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
92 class LinkError (CCompilerError):
12791
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
93 """Failure to link one or more C/C++ object files into an executable
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
94 or shared library file."""
937f9859c9de Moved the CCompiler exceptions here, to avoid having to import ccompiler.py
Greg Ward <gward@python.net>
parents: 12408
diff changeset
95
63136
29a3eda89995 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Tarek Ziadé <ziade.tarek@gmail.com>
parents: 56933
diff changeset
96 class UnknownFileError (CCompilerError):
13012
9076efac8420 Added PreprocessError and UnknownFileError (both used by CCompiler).
Greg Ward <gward@python.net>
parents: 12791
diff changeset
97 """Attempt to process an unknown file type."""