[Python-Dev] peps: Update PEP 399 to include comments from python-dev.

Tres Seaver tseaver at palladion.com
Wed Apr 13 01:50:34 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/2011 06:31 PM, Antoine Pitrou wrote:
> On Tue, 12 Apr 2011 23:59:53 +0200
> brett.cannon <python-checkins at python.org> wrote:
>> Technical details of
>> +the VM providing the accelerated code are allowed to differ as
>> +necessary, e.g., a class being a ``type`` when implemented in C.
> 
> I don't understand what this means ("a class being a ``type`` when
> implemented in C").
> 
>> +If this test were to provide 100% branch coverage for
>> +``heapq.heappop()`` in the pure Python implementation then the
>> +accelerated C code would be allowed to be added to CPython's standard
>> +library. If it did not, then the test suite would need to be updated
>> +until 100% branch coverage was provided before the accelerated C code
>> +could be added.
> 
> I really think that's a too strong requirement. We don't want to
> paralyze development until the stdlib gets 100% coverage in the tests
> suite.

Anybody who is either a) providing a C accelerator for an existing
stdlib module which doesn't yet have 100% coverage, or b) writing a new
module proposed for the stdlib without providing 100% coverage needs to
be prepared to defend that practice against the presumption stated by
the PEP.  We can grandfather existing code already in the stdlib, but
anybody making substantial changes to such code without first providing
coverage ought to be challenged.

Trying to accelerate existing code which doesn't have the coverage is
insane:  how can you know that the accelerator doesn't subtly change the
semantics without tests?


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2k5UoACgkQ+gerLs4ltQ5QMgCfda1S5DKbWfrJpy8bp8in0qyr
oisAn01TP7TT41Mj8q3+rusJ+vccNhcS
=s0Q6
-----END PGP SIGNATURE-----



More information about the Python-Dev mailing list