This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: distutils CCompiler._compile doesn't require lang keyword argument
Type: behavior Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, ikelos
Priority: normal Keywords:

Created on 2008-09-14 01:25 by ikelos, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg73203 - (view) Author: Mike Auty (ikelos) Date: 2008-09-14 01:25
I'm testing out Python-2.6b3 and attempted to build wxpython-2.8.8.1. 
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
exception.

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:)
msg73218 - (view) Author: Mike Auty (ikelos) Date: 2008-09-14 12:47
Sorry, scratch that, it turned out to be a patch added by a local
packager.  I don't seem to be able to close my own bug, but for anyone
who's triaging this, please mark this as CLOSED/INVALID or similar. 
Sorry for the inconvenience...
msg73219 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-14 12:49
Your problem seems very similar to http://bugs.gentoo.org/219238
but it seems that the Gentoo installation uses a patched version of 
python. there is no "lang" parameter at all in the official version...

Do you use a patched version of python?
msg73220 - (view) Author: Mike Auty (ikelos) Date: 2008-09-14 13:16
You're absolutely right, it was a Gentoo patching issue.  Thanks very
much for the link to the bug, I would never have found it myself!  5:)

I'm off to go try and convince them it's a bad idea to patch interfaces...
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48111
2008-09-14 13:16:46ikelossetmessages: + msg73220
2008-09-14 12:49:34amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
2008-09-14 12:49:02amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg73219
2008-09-14 12:47:25ikelossetmessages: + msg73218
2008-09-14 01:25:11ikeloscreate