Show More
@@ -289,7 +289,7 b' class BaseIPythonApplication(Application):' | |||||
289 | except ConfigFileNotFound: |
|
289 | except ConfigFileNotFound: | |
290 | # Only warn if the default config file was NOT being used. |
|
290 | # Only warn if the default config file was NOT being used. | |
291 | if config_file_name in self.config_file_specified: |
|
291 | if config_file_name in self.config_file_specified: | |
292 | msg = self.log.warn |
|
292 | msg = self.log.warning | |
293 | else: |
|
293 | else: | |
294 | msg = self.log.debug |
|
294 | msg = self.log.debug | |
295 | msg("Config file not found, skipping: %s", config_file_name) |
|
295 | msg("Config file not found, skipping: %s", config_file_name) | |
@@ -297,7 +297,7 b' class BaseIPythonApplication(Application):' | |||||
297 | # For testing purposes. |
|
297 | # For testing purposes. | |
298 | if not suppress_errors: |
|
298 | if not suppress_errors: | |
299 | raise |
|
299 | raise | |
300 | self.log.warn("Error loading config file: %s" % |
|
300 | self.log.warning("Error loading config file: %s" % | |
301 | self.config_file_name, exc_info=True) |
|
301 | self.config_file_name, exc_info=True) | |
302 |
|
302 | |||
303 | def init_profile_dir(self): |
|
303 | def init_profile_dir(self): | |
@@ -364,7 +364,7 b' class BaseIPythonApplication(Application):' | |||||
364 |
|
364 | |||
365 | cfg = self.config_file_name |
|
365 | cfg = self.config_file_name | |
366 | if path and os.path.exists(os.path.join(path, cfg)): |
|
366 | if path and os.path.exists(os.path.join(path, cfg)): | |
367 | self.log.warn("Staging %r from %s into %r [overwrite=%s]"%( |
|
367 | self.log.warning("Staging %r from %s into %r [overwrite=%s]"%( | |
368 | cfg, src, self.profile_dir.location, self.overwrite) |
|
368 | cfg, src, self.profile_dir.location, self.overwrite) | |
369 | ) |
|
369 | ) | |
370 | self.profile_dir.copy_config_file(cfg, path=path, overwrite=self.overwrite) |
|
370 | self.profile_dir.copy_config_file(cfg, path=path, overwrite=self.overwrite) | |
@@ -379,7 +379,7 b' class BaseIPythonApplication(Application):' | |||||
379 | cfg = os.path.basename(fullpath) |
|
379 | cfg = os.path.basename(fullpath) | |
380 | if self.profile_dir.copy_config_file(cfg, path=path, overwrite=False): |
|
380 | if self.profile_dir.copy_config_file(cfg, path=path, overwrite=False): | |
381 | # file was copied |
|
381 | # file was copied | |
382 | self.log.warn("Staging bundled %s from %s into %r"%( |
|
382 | self.log.warning("Staging bundled %s from %s into %r"%( | |
383 | cfg, self.profile, self.profile_dir.location) |
|
383 | cfg, self.profile, self.profile_dir.location) | |
384 | ) |
|
384 | ) | |
385 |
|
385 | |||
@@ -389,7 +389,7 b' class BaseIPythonApplication(Application):' | |||||
389 | s = self.generate_config_file() |
|
389 | s = self.generate_config_file() | |
390 | fname = os.path.join(self.profile_dir.location, self.config_file_name) |
|
390 | fname = os.path.join(self.profile_dir.location, self.config_file_name) | |
391 | if self.overwrite or not os.path.exists(fname): |
|
391 | if self.overwrite or not os.path.exists(fname): | |
392 | self.log.warn("Generating default config file: %r"%(fname)) |
|
392 | self.log.warning("Generating default config file: %r"%(fname)) | |
393 | with open(fname, 'w') as f: |
|
393 | with open(fname, 'w') as f: | |
394 | f.write(s) |
|
394 | f.write(s) | |
395 |
|
395 | |||
@@ -407,4 +407,3 b' class BaseIPythonApplication(Application):' | |||||
407 | self.load_config_file() |
|
407 | self.load_config_file() | |
408 | # enforce cl-opts override configfile opts: |
|
408 | # enforce cl-opts override configfile opts: | |
409 | self.update_config(cl_config) |
|
409 | self.update_config(cl_config) | |
410 |
|
@@ -252,7 +252,7 b' class ProfileCreate(BaseIPythonApplication):' | |||||
252 | except ImportError: |
|
252 | except ImportError: | |
253 | self.log.info("Couldn't import %s, config file will be excluded", name) |
|
253 | self.log.info("Couldn't import %s, config file will be excluded", name) | |
254 | except Exception: |
|
254 | except Exception: | |
255 | self.log.warn('Unexpected error importing %s', name, exc_info=True) |
|
255 | self.log.warning('Unexpected error importing %s', name, exc_info=True) | |
256 | return app |
|
256 | return app | |
257 |
|
257 | |||
258 | def init_config_files(self): |
|
258 | def init_config_files(self): |
@@ -87,7 +87,7 b' class ProfileDir(LoggingConfigurable):' | |||||
87 | try: |
|
87 | try: | |
88 | os.chmod(path, mode) |
|
88 | os.chmod(path, mode) | |
89 | except OSError: |
|
89 | except OSError: | |
90 | self.log.warn( |
|
90 | self.log.warning( | |
91 | "Could not set permissions on %s", |
|
91 | "Could not set permissions on %s", | |
92 | path |
|
92 | path | |
93 | ) |
|
93 | ) |
@@ -231,11 +231,11 b' class InteractiveShellApp(Configurable):' | |||||
231 | try: |
|
231 | try: | |
232 | r = enable(key) |
|
232 | r = enable(key) | |
233 | except ImportError: |
|
233 | except ImportError: | |
234 | self.log.warn("Eventloop or matplotlib integration failed. Is matplotlib installed?") |
|
234 | self.log.warning("Eventloop or matplotlib integration failed. Is matplotlib installed?") | |
235 | self.shell.showtraceback() |
|
235 | self.shell.showtraceback() | |
236 | return |
|
236 | return | |
237 | except Exception: |
|
237 | except Exception: | |
238 | self.log.warn("GUI event loop or pylab initialization failed") |
|
238 | self.log.warning("GUI event loop or pylab initialization failed") | |
239 | self.shell.showtraceback() |
|
239 | self.shell.showtraceback() | |
240 | return |
|
240 | return | |
241 |
|
241 | |||
@@ -273,11 +273,11 b' class InteractiveShellApp(Configurable):' | |||||
273 | ext=ext, |
|
273 | ext=ext, | |
274 | location=self.profile_dir.location |
|
274 | location=self.profile_dir.location | |
275 | )) |
|
275 | )) | |
276 | self.log.warn(msg, exc_info=True) |
|
276 | self.log.warning(msg, exc_info=True) | |
277 | except: |
|
277 | except: | |
278 | if self.reraise_ipython_extension_failures: |
|
278 | if self.reraise_ipython_extension_failures: | |
279 | raise |
|
279 | raise | |
280 | self.log.warn("Unknown error in loading extensions:", exc_info=True) |
|
280 | self.log.warning("Unknown error in loading extensions:", exc_info=True) | |
281 |
|
281 | |||
282 | def init_code(self): |
|
282 | def init_code(self): | |
283 | """run the pre-flight code, specified via exec_lines""" |
|
283 | """run the pre-flight code, specified via exec_lines""" | |
@@ -310,18 +310,18 b' class InteractiveShellApp(Configurable):' | |||||
310 | line) |
|
310 | line) | |
311 | self.shell.run_cell(line, store_history=False) |
|
311 | self.shell.run_cell(line, store_history=False) | |
312 | except: |
|
312 | except: | |
313 | self.log.warn("Error in executing line in user " |
|
313 | self.log.warning("Error in executing line in user " | |
314 | "namespace: %s" % line) |
|
314 | "namespace: %s" % line) | |
315 | self.shell.showtraceback() |
|
315 | self.shell.showtraceback() | |
316 | except: |
|
316 | except: | |
317 | self.log.warn("Unknown error in handling IPythonApp.exec_lines:") |
|
317 | self.log.warning("Unknown error in handling IPythonApp.exec_lines:") | |
318 | self.shell.showtraceback() |
|
318 | self.shell.showtraceback() | |
319 |
|
319 | |||
320 | def _exec_file(self, fname, shell_futures=False): |
|
320 | def _exec_file(self, fname, shell_futures=False): | |
321 | try: |
|
321 | try: | |
322 | full_filename = filefind(fname, [u'.', self.ipython_dir]) |
|
322 | full_filename = filefind(fname, [u'.', self.ipython_dir]) | |
323 | except IOError as e: |
|
323 | except IOError as e: | |
324 | self.log.warn("File not found: %r"%fname) |
|
324 | self.log.warning("File not found: %r"%fname) | |
325 | return |
|
325 | return | |
326 | # Make sure that the running script gets a proper sys.argv as if it |
|
326 | # Make sure that the running script gets a proper sys.argv as if it | |
327 | # were run from a system shell. |
|
327 | # were run from a system shell. | |
@@ -362,7 +362,7 b' class InteractiveShellApp(Configurable):' | |||||
362 | try: |
|
362 | try: | |
363 | self._exec_file(python_startup) |
|
363 | self._exec_file(python_startup) | |
364 | except: |
|
364 | except: | |
365 | self.log.warn("Unknown error in handling PYTHONSTARTUP file %s:", python_startup) |
|
365 | self.log.warning("Unknown error in handling PYTHONSTARTUP file %s:", python_startup) | |
366 | self.shell.showtraceback() |
|
366 | self.shell.showtraceback() | |
367 | finally: |
|
367 | finally: | |
368 | # Many PYTHONSTARTUP files set up the readline completions, |
|
368 | # Many PYTHONSTARTUP files set up the readline completions, | |
@@ -381,7 +381,7 b' class InteractiveShellApp(Configurable):' | |||||
381 | for fname in sorted(startup_files): |
|
381 | for fname in sorted(startup_files): | |
382 | self._exec_file(fname) |
|
382 | self._exec_file(fname) | |
383 | except: |
|
383 | except: | |
384 | self.log.warn("Unknown error in handling startup files:") |
|
384 | self.log.warning("Unknown error in handling startup files:") | |
385 | self.shell.showtraceback() |
|
385 | self.shell.showtraceback() | |
386 |
|
386 | |||
387 | def _run_exec_files(self): |
|
387 | def _run_exec_files(self): | |
@@ -394,7 +394,7 b' class InteractiveShellApp(Configurable):' | |||||
394 | for fname in self.exec_files: |
|
394 | for fname in self.exec_files: | |
395 | self._exec_file(fname) |
|
395 | self._exec_file(fname) | |
396 | except: |
|
396 | except: | |
397 | self.log.warn("Unknown error in handling IPythonApp.exec_files:") |
|
397 | self.log.warning("Unknown error in handling IPythonApp.exec_files:") | |
398 | self.shell.showtraceback() |
|
398 | self.shell.showtraceback() | |
399 |
|
399 | |||
400 | def _run_cmd_line_code(self): |
|
400 | def _run_cmd_line_code(self): | |
@@ -406,7 +406,7 b' class InteractiveShellApp(Configurable):' | |||||
406 | line) |
|
406 | line) | |
407 | self.shell.run_cell(line, store_history=False) |
|
407 | self.shell.run_cell(line, store_history=False) | |
408 | except: |
|
408 | except: | |
409 | self.log.warn("Error in executing line in user namespace: %s" % |
|
409 | self.log.warning("Error in executing line in user namespace: %s" % | |
410 | line) |
|
410 | line) | |
411 | self.shell.showtraceback() |
|
411 | self.shell.showtraceback() | |
412 |
|
412 |
General Comments 0
You need to be logged in to leave comments.
Login now