[Distutils] How to handle launcher script importability?

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Aug 21 17:30:03 CEST 2013


Donald Stufft <donald <at> stufft.io> writes:

> I think you're using a completely different definition of "reference
> implementation" than I've ever seen used. A reference implementation

Quite possibly, but I feel justified in this case ... I'll say why below.

> by definition cannot contain customizations or additions or extensions
> from the spec. The entire *point* of a reference implementation is to
> act as programatic reference to the spec. Something being the reference
> implementation does not speak to the quality of the implementation and
> as such it may not be the *best* implementation.

The packaging PEPs don't do down to programmatic detail in their 
specification. In the stricter definition of "reference implementation" (RI) 
you're talking about, a spec comes with a reference implementation but also a 
test suite (provided by the spec author) which conforming 
implementations must pass. While this is de rigueur in the Java world, it's 
not common in the Python world. Without such a test conformance suite, I 
think it's reasonable to use the looser definition of RI that I did.

> An example is the wsgiref from the standard library. Very few projects
> actively use wsgiref for much at all if they use it at all. However it's
> existence means that web servers like gunicorn, mod_wsgi etc can simply
> test against it instead of needing to test against every implementation
> of WSGI.

While you can certainly use wsgiref for interoperability testing (much as I 
use wheel's wheel implementation for interoperability testing with distlib) I 
don't think WSGI implementations run a suite of tests provided in wsgiref 
before claiming conformance. I'm happy to be corrected 
if I'm wrong about that :-)

In my experience of implementing PEPs (282, 391, 397, 405) all 
implementations have had test suites, but none have had the tests implemented 
by any central authority. In discussions the relevant implementations have 
been referred to as RIs and that's the way I'm using it now.

> Which implementation is used (and ultimately possibly enshrined in the
> standard library) is decided through merit. Which implementation is
> used as the reference implementation is typically decided by the standards
> body (in this case, distutils-sig or Nick or whoever). 

If Nick or whoever is planning to write a test suite which all 
implementations must pass, great. But that would (I suppose) mean tying 
things down to a specific Python interface at the module, class and function 
level - not something I've seen imposed externally before. But in 
the absence of such, I don't see any problem with my interpretation of RI, 
since the stricter interpretation only makes sense in the presence of 
accompanying tests generated by the spec originators.

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list