New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileIO.seekable() can return False #49266
Comments
FileIO.seekable() can return False if we first seek to a position such >>> f = open('largefile', 'wb', buffering=0)
>>> f.seek(2**31, 0)
2147483648
>>> f.write(b'x')
1
>>> f.close()
>>> f = open('largefile', 'rb', buffering=0)
>>> f.seek(0, 2)
2147483649
>>> f.seekable()
False |
Patch with regression test in test_largefile: test 2**31-1, 2**31, |
See also issue bpo-5008. |
Woops, I attached the wrong patch! |
Committed in r70352 (py3k), r70353 (3.0). Needs backport to trunk and |
I'm interrested by a backport at least in trunk. I updated the patch
|
You can use io.open() instead of open()... |
Alright, it's much easier with io.open() :-) |
It is fixed in 2.7 with the backport of the Python3's io library (r73394). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: