Show More
@@ -164,21 +164,3 b' def exception_colors():' | |||
|
164 | 164 | ex_colors.add_scheme(ex_colors['Linux'].copy('Neutral')) |
|
165 | 165 | |
|
166 | 166 | return ex_colors |
|
167 | ||
|
168 | class Deprec(object): | |
|
169 | ||
|
170 | def __init__(self, wrapped_obj): | |
|
171 | self.wrapped=wrapped_obj | |
|
172 | ||
|
173 | def __getattr__(self, name): | |
|
174 | val = getattr(self.wrapped, name) | |
|
175 | warnings.warn("Using ExceptionColors global is deprecated and will be removed in IPython 6.0", | |
|
176 | DeprecationWarning, stacklevel=2) | |
|
177 | # using getattr after warnings break ipydoctest in weird way for 3.5 | |
|
178 | return val | |
|
179 | ||
|
180 | # For backwards compatibility, keep around a single global object. Note that | |
|
181 | # this should NOT be used, the factory function should be used instead, since | |
|
182 | # these objects are stateful and it's very easy to get strange bugs if any code | |
|
183 | # modifies the module-level object's state. | |
|
184 | ExceptionColors = Deprec(exception_colors()) |
General Comments 0
You need to be logged in to leave comments.
Login now