[Distutils] PEP 517 again

xoviat xoviat at gmail.com
Sat Aug 26 15:25:14 EDT 2017


The current PEP requires that build_sdist return the basename of the sdist.
So forgetting a return statement is not an option unless people really
don't read the PEP.

On Aug 26, 2017 2:18 PM, "Nathaniel Smith" <njs at pobox.com> wrote:

> [removed Guido from CC]
>
> On Aug 26, 2017 02:29, "Paul Moore" <p.f.moore at gmail.com> wrote:
>
> On 26 August 2017 at 03:17, Guido van Rossum <guido at python.org> wrote:
> > In pretty much any other context, if you have an operation that returns
> an
> > regular value or an error value, the error value should be None.
> (Exceptions
> > include e.g. returning a non-negative int or -1 for errors, or True for
> > success and False for errors.)
>
> So, given that build_sdist returns the path of the newly built sdist,
> the correct way to signal "I didn't manage to build a sdist" would be
> to return None.
>
> Now that it's put this way, it seems glaringly obvious to me that this
> is the correct thing to do.
>
>
> Eh... I would really prefer something that's (a) more explicit about what
> specifically went wrong, and (b) harder to return by accident. It's not at
> all obvious that if the list of requirements is 'None' that means 'this
> build supports making sdists in general but cannot make them from this
> source tree but might still be able to make a wheel'. And if you forget to
> put in a return statement, then python returns None for you, which seems
> like it could lead to some super confusing error modes.
>
> -n
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170826/7b1ad3cc/attachment-0001.html>


More information about the Distutils-SIG mailing list