Author ncoghlan
Recipients Dormouse759, encukou, ncoghlan, terry.reedy
Date 2017-05-20.07:22:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495264963.93.0.772985814313.issue30403@psf.upfronthosting.co.za>
In-reply-to
Content
As a high level overview of the general idea: we'd like it to be almost entirely transparent to the end user as to whether a particular module is implemented as normal Python source code, a precompiled bytecode/wordcode file, or a precompiled Cython extension module (or equivalent).

At the moment, this is pretty close to being true for source code vs precompiled bytecode/wordcode when it comes to both imports and execution as a script. The main missing piece there is to implement source code maps for generating more informative tracebacks given only the precompiled form (perhaps by borrowing JavaScript's "source map" concept)

For extension modules, the original multi-phase initialisation PEP got this pretty close to being true for the import case - things like reload() can now work much the same way they do for pure Python and pyc files if a module author (or module generation tool) cares to make it so.

However, we don't yet support the use of extension modules as scripts, neither for direct execution, nor via the `-m` switch, so it's impossible for a tool like Cython to handle that transparently - if a module exposes functionality via -m, then migrating it directly to Cython will break than behaviour.
History
Date User Action Args
2017-05-20 07:22:43ncoghlansetrecipients: + ncoghlan, terry.reedy, encukou, Dormouse759
2017-05-20 07:22:43ncoghlansetmessageid: <1495264963.93.0.772985814313.issue30403@psf.upfronthosting.co.za>
2017-05-20 07:22:43ncoghlanlinkissue30403 messages
2017-05-20 07:22:43ncoghlancreate