This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Daniel Moisset
Recipients Daniel Moisset, levkivskyi, rhettinger
Date 2016-07-14.14:16:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468505767.0.0.186636107782.issue27501@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2016-07-14 14:16:07Daniel Moissetsetrecipients: + Daniel Moisset, rhettinger, levkivskyi
2016-07-14 14:16:07Daniel Moissetsetmessageid: <1468505767.0.0.186636107782.issue27501@psf.upfronthosting.co.za>
2016-07-14 14:16:06Daniel Moissetlinkissue27501 messages
2016-07-14 14:16:06Daniel Moissetcreate