Message270412
As a description of the idea I'm attaching a rough patch with an implementation. Some tests fail because of the following:
1) I didn't find a good place to register the Buffer ABC for mmap.mmap, and array.mmap; the modeules themselves are C extensions (and it's possible but weird to register the ABC from the C API); I could import those in typing.py but then I'd make typing depend from mmap and array which also feels wrong; so I didn't do that and the related tests that I added fail.
2) I had a similar situation with io.BytesIO. In that case there's a python module and I'm doing the abc.register there, but now io imports typing, and the test_site fails because many new modules (typing and its dependencies) are imported on startup. The alternative is to make typing depend on io (in this case it could be a reasonable idea)
After these, I'm feeling that typing.py may not be the best place for this (but given that collections.abc isn't either, I'm not sure where's the right place) |
|
Date |
User |
Action |
Args |
2016-07-14 14:16:07 | Daniel Moisset | set | recipients:
+ Daniel Moisset, rhettinger, levkivskyi |
2016-07-14 14:16:07 | Daniel Moisset | set | messageid: <1468505767.0.0.186636107782.issue27501@psf.upfronthosting.co.za> |
2016-07-14 14:16:06 | Daniel Moisset | link | issue27501 messages |
2016-07-14 14:16:06 | Daniel Moisset | create | |
|