[issue9012] Separate compilation of time and datetime modules

Alexander Belopolsky report at bugs.python.org
Mon Dec 13 20:29:41 CET 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

> it sounds like the patch is ready for commit.

there are two pending patches here:

time.diff - a hack that makes _time.c look like a module while it is not.

add_time_to_vc8_build.diff - a patch for VC 8.0 project file.

I don't like time.diff because it fixes the symptom rather than the core problem.  I believe the code that is shared between C modules should be segregated into a true module which would expose its C API via capsule mechanism.  Others suggested that this is an overkill and that capsule mechanism is not suitable for the stdlib.  On the latter argument, I would like to point that unicodedata already uses capsule mechanism to make itself available to Python's builtin str type.

As I mentioned in msg109219, this situation is not unique to time/datetime.  The math and cmath modules similarly use linker tricks to share code in _math.c.

Unassigning because I don't have an informed opinion on add_time_to_vc8_build.diff and cannot move the _time.c issue forward until similar problem is solved for _math.c which I used as the basis for _time.c design.

----------
assignee: belopolsky -> 

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9012>
_______________________________________


More information about the Python-bugs-list mailing list