Author pitrou
Recipients brett.cannon, eric.snow, ncoghlan, pitrou, python-dev, scoder, superluser
Date 2017-05-28.19:25:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <ba3793c0-bc1f-3551-9f28-4006d69bb937@free.fr>
In-reply-to <1495999097.98.0.679293212692.issue25791@psf.upfronthosting.co.za>
Content
multidict is a package, the Cython module is multidict._multidict.

Cython translated "import sys" into this:

  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)

And __Pyx_Import is this:
https://gist.github.com/pitrou/9a0d94aba3495ce3eb8630d4797d67bb

Note that __Pyx_MODULE_NAME is defined thusly:
#define __Pyx_MODULE_NAME "multidict._multidict"

So perhaps Cython is indeed attempting a PyImport_ImportModuleLevelObject()
call with a level of 1 for "import sys" before falling back on a level of -1...

Why I don't know.

(also since __Pyx_MODULE_NAME seems known, Cython could actually define __package__)
History
Date User Action Args
2017-05-28 19:25:15pitrousetrecipients: + pitrou, brett.cannon, ncoghlan, scoder, python-dev, eric.snow, superluser
2017-05-28 19:25:15pitroulinkissue25791 messages
2017-05-28 19:25:15pitroucreate