[New-bugs-announce] [issue3861] distutils CCompiler._compile doesn't require lang keyword argument

Mike Auty report at bugs.python.org
Sun Sep 14 03:25:12 CEST 2008

New submission from Mike Auty <mike.auty at gmail.com>:

I'm testing out Python-2.6b3 and attempted to build wxpython- 
It creates a subclassed CCompiler (MyUnixCCompiler), which overrides the
_compile function, with the following signature:

_compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)

This is the same function signature found in distutils/ccompiler.py
(line 705).  However, it gets called further up in
distutils/ccompiler.py (at line 699) with a lang keyword argument. 
Since **kwargs or similar isn't included in the signature, it raises an

The best solution seems like removing the lang=lang keyword argument on
line 669, but it's not clear why this was added or what consumers use
this new addition.  Changing the signature would be an interface break
and require old code to be updated, but might allow for a **kwargs entry
that would allow for future additions.

Please let me know if you need any further information...  5:)

components: Distutils
messages: 73203
nosy: mike.auty at gmail.com
severity: normal
status: open
title: distutils CCompiler._compile doesn't require lang keyword argument
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list