Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fa2eb2

Browse files
committed
log.warn -> log.warning in application.py
1 parent 74860b8 commit 5fa2eb2

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

IPython/core/application.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,15 @@ def load_config_file(self, suppress_errors=True):
289289
except ConfigFileNotFound:
290290
# Only warn if the default config file was NOT being used.
291291
if config_file_name in self.config_file_specified:
292-
msg = self.log.warn
292+
msg = self.log.warning
293293
else:
294294
msg = self.log.debug
295295
msg("Config file not found, skipping: %s", config_file_name)
296296
except Exception:
297297
# For testing purposes.
298298
if not suppress_errors:
299299
raise
300-
self.log.warn("Error loading config file: %s" %
300+
self.log.warning("Error loading config file: %s" %
301301
self.config_file_name, exc_info=True)
302302

303303
def init_profile_dir(self):
@@ -364,7 +364,7 @@ def init_config_files(self):
364364

365365
cfg = self.config_file_name
366366
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]"%(
368368
cfg, src, self.profile_dir.location, self.overwrite)
369369
)
370370
self.profile_dir.copy_config_file(cfg, path=path, overwrite=self.overwrite)
@@ -379,7 +379,7 @@ def init_config_files(self):
379379
cfg = os.path.basename(fullpath)
380380
if self.profile_dir.copy_config_file(cfg, path=path, overwrite=False):
381381
# 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"%(
383383
cfg, self.profile, self.profile_dir.location)
384384
)
385385

@@ -389,7 +389,7 @@ def stage_default_config_file(self):
389389
s = self.generate_config_file()
390390
fname = os.path.join(self.profile_dir.location, self.config_file_name)
391391
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))
393393
with open(fname, 'w') as f:
394394
f.write(s)
395395

@@ -407,4 +407,3 @@ def initialize(self, argv=None):
407407
self.load_config_file()
408408
# enforce cl-opts override configfile opts:
409409
self.update_config(cl_config)
410-

0 commit comments

Comments
 (0)