Jeroen Demeyer <j.deme...@ugent.be> added the comment:

> IMO, debating whether a None return means there's absolutely no chance of 
> there being source is silly - the best the loader can say is that it can't 
> provide source.

I don't think it is silly: if "None" means that the loader cannot provide the 
source, then it makes sense to continue looking for the source. If "None" means 
that there is certainly no source, then it does not make sense to continue 
looking.

> On the other hand, what is Cython source code even doing on sys.path?

It's specifically installed for tracebacks (and other debugging). In a way, 
it's no different from installing both .py and .pyc files. Nobody questions 
that, even though the .pyc files are sufficient.

> I sort of understand the benefit, but it does seem to be a practice peculiar 
> to one scenario

Sure, it's particular but it's a real existing scenario.

> and I'm not sure the standard library should deal with it.

Depends what you mean with "deal with it". Basically, all that I'm asking for 
is at least one officially supported way to enable finding sources for 
extension modules. There are many possible ways to fix this, that's why I made 
this post to python-ideas.

> I'm struggling to see how a Python programmer would benefit from access to 
> the source code of a compiled extension anyway.

Cython code looks very much like Python. Very likely, a Python programmer would 
understand the Cython code. Anyway, this is besides the point: even if it just 
benefits the author of the Cython code, it's already useful.

> it's not exactly an urgent issue.

I never proposed to make it a release blocker :-)
It's not urgent but it should still be fixed.

> Cython still needs to work around the issue for users of older Pythons.

No. Older versions already work because there is no ExtensionFileLoader. The 
changes in Python 3.x(?) actually broke this. Certainly in Python 2.7, those 
tracebacks work fine.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32797>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to