Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update mmap stubs for newer Python versions (python#4244)
* Update mmap stubs for newer Python versions Based on the Python stdlib documentation: - Since Python 3.5, mmap.{find,rfind,write} all accept any bytes-like. I've used the _typeshed.ReadableBuffer alias defined in python#4232. - Since Python 3.6, mmap.write returns the number of bytes written. - Since Python 3.3, mmap.read allows None as the parameter; while in Python 2 the argument cannot be omitted. * Further clean up mmap.pyi Use the fact that Python 3.0-3.4 are no longer supported to clean up the version-dependent logic. Functions that always have different signatures in Python 2/3 are moved from the base _mmap[bytes] to the mmap subclass.
- Loading branch information