[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > When OverflowError is raised? Shouldn't it be replaced with ValueError? At least Python implementation of io.FileIO can raise OverflowError (from os.lseek()). Thus OverflowError should be kept. -- resolution: -> fixed status: open -> closed _

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset bca81ea8f898 by Serhiy Storchaka in branch '3.5': Issue #26927: Fixed test_mmap on platforms with 32-bit off_t (like Android). https://hg.python.org/cpython/rev/bca81ea8f898 New changeset 6147a2c99db0 by Serhiy Storchaka in branch 'default': Issue #

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: When OverflowError is raised? Shouldn't it be replaced with ValueError? -- ___ Python tracker ___

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-22 Thread Xavier de Gaye
Xavier de Gaye added the comment: On linux with large file support, OSError is raised when the file system limit is exceeded, here with ext4: >>> f.seek(2**44 - 2**11) Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument >>> f.seek(2**44 - 2**12) 175921

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm wondering in what cases other exceptions (OSError, OverflowError) can be raised? Initial test was added in issue4681. -- nosy: +pitrou, rosslagerwall ___ Python tracker

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-22 Thread Xavier de Gaye
Xavier de Gaye added the comment: f.seek(number) raises ValueError (ValueError: cannot fit 'int' into an offset-sized integer) when 'number' is greater than the size allowed by off_t. ValueError is not handled in test_mmap to detect that large file is not supported. With this patch, test_larg