[Python-Dev] Handling deprecations in the face of PEP 384
Eric Snow
ericsnowcurrently at gmail.com
Sun Apr 22 02:54:55 CEST 2012
On Sat, Apr 21, 2012 at 4:17 PM, Brett Cannon <brett at python.org> wrote:
> On Sat, Apr 21, 2012 at 12:10, Barry Warsaw <barry at python.org> wrote:
>> Strictly speaking, I do think you need to deprecate the APIs. I like
>> Nick's
>> suggestion to make them C wrappers which just call back into Python.
>
>
> That was my plan, but the amount of code it will take to wrap them is making
> me not care. =) For PyImport_GetMagicTag() I would need to expose a new
> attribute on sys or somewhere which specifies the VM name. For
> PyImport_GetMagicNumber() I have to do a bunch of bit twiddling to convert a
> bytes object into a long which I am just flat-out not in the mood to figure
> out how to do. And all of this will lead to the same amount of C code as
> there currently is for what is already implemented, so I just don't care
> anymore. =)
I thought I already (mostly) worked it all out in that patch on
issue13959. I felt really good about the approach for the magic tag
and magic bytes.
Once find_module() and reload() are done in imp.py, I'm hoping to
follow up on a few things. That includes the unresolved mailing list
thread about sys.implementation (or whatever it was), which will help
with the magic tag. Anyway, I don't want to curtail the gutting of
import.c quite yet (as he hears cries of "bring out your dead!").
-eric
p.s. I understand your sentiment here, considering that mothers are
often exhausted by childbirth and the importlib bootstrap was a big
baby. You were in labor for, what, 6 years. <wink> [There's an
analogy that could keep on giving. :) ]
More information about the Python-Dev
mailing list