[Distutils] PEP 517 again

xoviat xoviat at gmail.com
Fri Aug 25 15:04:52 EDT 2017


I agree with Nick that exceptions are the way to do things in Python and
with Donald that in general, Python's use of exceptions has caused
problems. But I don't think that this forum is the correct place to discuss
Python conventions, and so I would ordinarily say that we should just
accept that there will be problems and use the NotImplementedError,
assuming that "solution" doesn't cause a firestorm that delays acceptance
for a significant period of time. The reasoning behind this is that Python
has in general adopted this approach (Nick is right that they would have
used NotImplementedError for binary operations except for performance
issues) even with its problems.

However, another solution was dismissed without much thought: using the
"UnsupportedOperation" exception. We could for now simply require an extra
two lines in all backends:

class DistutilsUnsupportedOperation(RuntimeError):
    pass

and then put UnsupportedOperation in the "distutils" library in 3.7, with
an eventual move to that. It's not pretty but there have been plenty of
hacks for backwards compatibility so far (it's rare to see a project
without some sort of compat.py file).

2017-08-25 13:34 GMT-05:00 Donald Stufft <donald at stufft.io>:

> The thing being bubbled up is a backend accidentally calling an API that
> has yet to be implemented (an error that should be reported) being bubbled
> up and erroneously handled as the backend reporting it doesn't support
> making a sdist (not an error, son no traceback).
>
> Sent from my iPhone
>
> > On Aug 25, 2017, at 2:23 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> >
> > There's little or no opportunity here for letting exceptions bubble up
> > to the user, or passing complex data back to the frontend. Ultimately,
> > it's pretty much immaterial which form of reporting is used.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170825/06af8e48/attachment-0001.html>


More information about the Distutils-SIG mailing list