Mercurial > hg
annotate mercurial/thirdparty/zope/interface/common/interfaces.py @ 41936:a791623458ef
copies: remove dependency on scmutil by directly using match.exact()
I want to add a dependency from scmutil.copies(), so I need to remove
this dependency first.
Differential Revision: https://phab.mercurial-scm.org/D6118
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 11 Mar 2019 09:20:26 -0700 |
parents | 68ee61822182 |
children |
rev | line source |
---|---|
37176
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 ############################################################################## |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 # |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 # Copyright (c) 2003 Zope Foundation and Contributors. |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 # All Rights Reserved. |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 # |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 # This software is subject to the provisions of the Zope Public License, |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 # FOR A PARTICULAR PURPOSE. |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 # |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 ############################################################################## |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 """Interfaces for standard python exceptions |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 """ |
37178
68ee61822182
thirdparty: port zope.interface to relative imports
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37176
diff
changeset
|
16 |
68ee61822182
thirdparty: port zope.interface to relative imports
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37176
diff
changeset
|
17 from __future__ import absolute_import |
68ee61822182
thirdparty: port zope.interface to relative imports
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37176
diff
changeset
|
18 |
68ee61822182
thirdparty: port zope.interface to relative imports
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37176
diff
changeset
|
19 from .. import Interface |
68ee61822182
thirdparty: port zope.interface to relative imports
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37176
diff
changeset
|
20 from .. import classImplements |
37176
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 class IException(Interface): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 class IStandardError(IException): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 class IWarning(IException): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 class ISyntaxError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 class ILookupError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 class IValueError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 class IRuntimeError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 class IArithmeticError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 class IAssertionError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 class IAttributeError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 class IDeprecationWarning(IWarning): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 class IEOFError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 class IEnvironmentError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 class IFloatingPointError(IArithmeticError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 class IIOError(IEnvironmentError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 class IImportError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 class IIndentationError(ISyntaxError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 class IIndexError(ILookupError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 class IKeyError(ILookupError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 class IKeyboardInterrupt(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 class IMemoryError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 class INameError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 class INotImplementedError(IRuntimeError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 class IOSError(IEnvironmentError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 class IOverflowError(IArithmeticError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 class IOverflowWarning(IWarning): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 class IReferenceError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 class IRuntimeWarning(IWarning): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 class IStopIteration(IException): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 class ISyntaxWarning(IWarning): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 class ISystemError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 class ISystemExit(IException): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 class ITabError(IIndentationError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 class ITypeError(IStandardError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 class IUnboundLocalError(INameError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 class IUnicodeError(IValueError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 class IUserWarning(IWarning): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 class IZeroDivisionError(IArithmeticError): pass |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
61 classImplements(ArithmeticError, IArithmeticError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 classImplements(AssertionError, IAssertionError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
63 classImplements(AttributeError, IAttributeError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 classImplements(DeprecationWarning, IDeprecationWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 classImplements(EnvironmentError, IEnvironmentError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 classImplements(EOFError, IEOFError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 classImplements(Exception, IException) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 classImplements(FloatingPointError, IFloatingPointError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 classImplements(ImportError, IImportError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 classImplements(IndentationError, IIndentationError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 classImplements(IndexError, IIndexError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 classImplements(IOError, IIOError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 classImplements(KeyboardInterrupt, IKeyboardInterrupt) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 classImplements(KeyError, IKeyError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 classImplements(LookupError, ILookupError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 classImplements(MemoryError, IMemoryError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 classImplements(NameError, INameError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 classImplements(NotImplementedError, INotImplementedError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 classImplements(OSError, IOSError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
80 classImplements(OverflowError, IOverflowError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 try: |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 classImplements(OverflowWarning, IOverflowWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 except NameError: #pragma NO COVER |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 pass # OverflowWarning was removed in Python 2.5 |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 classImplements(ReferenceError, IReferenceError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
86 classImplements(RuntimeError, IRuntimeError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
87 classImplements(RuntimeWarning, IRuntimeWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
88 try: |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
89 classImplements(StandardError, IStandardError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
90 except NameError: #pragma NO COVER |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
91 pass # StandardError does not exist in Python 3 |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
92 classImplements(StopIteration, IStopIteration) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 classImplements(SyntaxError, ISyntaxError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 classImplements(SyntaxWarning, ISyntaxWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 classImplements(SystemError, ISystemError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 classImplements(SystemExit, ISystemExit) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 classImplements(TabError, ITabError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 classImplements(TypeError, ITypeError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 classImplements(UnboundLocalError, IUnboundLocalError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 classImplements(UnicodeError, IUnicodeError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 classImplements(UserWarning, IUserWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 classImplements(ValueError, IValueError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 classImplements(Warning, IWarning) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
104 classImplements(ZeroDivisionError, IZeroDivisionError) |
943d77fc07a3
thirdparty: vendor zope.interface 4.4.3
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
105 |