Skip to content

Commit

Permalink
Fixed logging deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
OCopping committed Apr 25, 2024
1 parent bc5bd66 commit ec7dfd5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/setuptools_dso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def cmdclass_setdefault(name, klass, error=True):
if error:
raise AssertionError("cmdclass[%s] must be subclass of %s" % (cmdclass[name], klass))
else:
log.warn("cmdclass[%s] must be subclass of %s, setuptools-dso functionality may be lost",
log.warning("cmdclass[%s] must be subclass of %s, setuptools-dso functionality may be lost",
cmdclass[name], klass)
cmdclass_setdefault('bdist_egg', bdist_egg)
cmdclass_setdefault('build_dso', build_dso)
Expand Down
4 changes: 2 additions & 2 deletions src/setuptools_dso/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# self.include_dirs list, growing without bound.
# With MSVC this eventually fails.
def _patch_fix_compile_args(realfn, output_dir, macros, include_dirs, *args, **kws):
log.warn('_patch_fix_compile_args include_dirs=%r', include_dirs)
log.warning('_patch_fix_compile_args include_dirs=%r', include_dirs)
# turn include_dirs=None into include_dirs=[]
return realfn(output_dir, macros, include_dirs or [], *args, **kws)

Expand Down Expand Up @@ -83,7 +83,7 @@ def new_compiler(**kws):

# setuptools 63.4.3 adds compiler.__class__.include_dirs
if hasattr(compiler.__class__, 'include_dirs') and hasattr(compiler, '_fix_compile_args'):
log.warn('Patch _fix_compile_args() to avoid modification to compiler.include_dirs')
log.warning('Patch _fix_compile_args() to avoid modification to compiler.include_dirs')
compiler._fix_compile_args = partial(_patch_fix_compile_args, compiler._fix_compile_args)

if compiler.compiler_type=='msvc': # either msvccompiler or msvc9compiler
Expand Down
2 changes: 1 addition & 1 deletion src/setuptools_dso/dsocmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def system_concurrency():
try:
return _system_concurrency()
except Exception as e: # fail softly with a pessimistic estimate
log.warn('Warning: Unable to estimate system concurrency, default to sequential build: %r'%e)
log.warning('Warning: Unable to estimate system concurrency, default to sequential build: %r'%e)
return 1

def massage_dir_list(bdirs, indirs):
Expand Down
4 changes: 2 additions & 2 deletions src/setuptools_dso/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ def __init__(self, TC):
self.compiler_version = tuple(int(p) for p in (FV[:2], FV[2:4], FV[4:]))

else:
log.warn("Warning: unable to classify compiler")
log.warning("Warning: unable to classify compiler")

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

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

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

Expand Down

0 comments on commit ec7dfd5

Please sign in to comment.