Skip to content

Commit caed4ec

Browse files
author
unknown
committed
Fixed logging deprecation warning
1 parent bc5bd66 commit caed4ec

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/setuptools_dso/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def cmdclass_setdefault(name, klass, error=True):
4242
if error:
4343
raise AssertionError("cmdclass[%s] must be subclass of %s" % (cmdclass[name], klass))
4444
else:
45-
log.warn("cmdclass[%s] must be subclass of %s, setuptools-dso functionality may be lost",
45+
log.warning("cmdclass[%s] must be subclass of %s, setuptools-dso functionality may be lost",
4646
cmdclass[name], klass)
4747
cmdclass_setdefault('bdist_egg', bdist_egg)
4848
cmdclass_setdefault('build_dso', build_dso)

src/setuptools_dso/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# self.include_dirs list, growing without bound.
3636
# With MSVC this eventually fails.
3737
def _patch_fix_compile_args(realfn, output_dir, macros, include_dirs, *args, **kws):
38-
log.warn('_patch_fix_compile_args include_dirs=%r', include_dirs)
38+
log.warning('_patch_fix_compile_args include_dirs=%r', include_dirs)
3939
# turn include_dirs=None into include_dirs=[]
4040
return realfn(output_dir, macros, include_dirs or [], *args, **kws)
4141

@@ -83,7 +83,7 @@ def new_compiler(**kws):
8383

8484
# setuptools 63.4.3 adds compiler.__class__.include_dirs
8585
if hasattr(compiler.__class__, 'include_dirs') and hasattr(compiler, '_fix_compile_args'):
86-
log.warn('Patch _fix_compile_args() to avoid modification to compiler.include_dirs')
86+
log.warning('Patch _fix_compile_args() to avoid modification to compiler.include_dirs')
8787
compiler._fix_compile_args = partial(_patch_fix_compile_args, compiler._fix_compile_args)
8888

8989
if compiler.compiler_type=='msvc': # either msvccompiler or msvc9compiler

src/setuptools_dso/dsocmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def system_concurrency():
121121
try:
122122
return _system_concurrency()
123123
except Exception as e: # fail softly with a pessimistic estimate
124-
log.warn('Warning: Unable to estimate system concurrency, default to sequential build: %r'%e)
124+
log.warning('Warning: Unable to estimate system concurrency, default to sequential build: %r'%e)
125125
return 1
126126

127127
def massage_dir_list(bdirs, indirs):

src/setuptools_dso/probe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ def __init__(self, TC):
459459
self.compiler_version = tuple(int(p) for p in (FV[:2], FV[2:4], FV[4:]))
460460

461461
else:
462-
log.warn("Warning: unable to classify compiler")
462+
log.warning("Warning: unable to classify compiler")
463463

464464
for attr, info in self.__info.items():
465465
for macro, val in info:
466466
if D.get(macro) is not None:
467467
setattr(self, attr, val)
468468

469469
if getattr(self, attr) is None:
470-
log.warn("Warning: unable to classify "+attr)
470+
log.warning("Warning: unable to classify "+attr)
471471

472472
self.address_width = 8*TC.sizeof('void*')
473473

0 commit comments

Comments
 (0)