[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2020-04-18 Thread Ned Deily


Change by Ned Deily :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2020-04-18 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL.

--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2015-02-14 Thread Steve Dower

Steve Dower added the comment:

I can't say why 2.7 doesn't use _fseeki64, but 3.5 certainly does. 

Possibly it's a significant change of behaviour that would break backwards 
compatibility? Making a currently working call raise new exceptions is 
certainly worth double-checking before introducing into a maintenance release.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2015-02-08 Thread eryksun

eryksun added the comment:

The whence argument is used in a switch statement that handles SEEK_END and 
SEEK_CUR. It doesn't raise an error for an invalid whence value. It just falls 
through to the fsetpos call.

_portable_fseek
https://hg.python.org/cpython/file/648dcafa7e5f/Objects/fileobject.c#l692

0:000> k 3
Child-SP  RetAddr   Call Site
`0021fa68 `1e0ac84f MSVCR90!fsetpos
`0021fa70 `1e0aeea3 python27!_portable_fseek+0x6f
`0021faa0 `1e0c3d09 python27!file_seek+0x123

Why does it manually handle whence and call fgetpos/fsetpos instead of calling 
_fseeki64?

fseek, _fseeki64
https://msdn.microsoft.com/en-us/library/75yw9bf3%28v=vs.90%29.aspx

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2015-02-08 Thread mattip

New submission from mattip:

f=open('abc.txt', 'w+')
f.seek(0, 42)

does not raise an exception on windows, python2.7

--
components: Windows
messages: 235568
nosy: mattip, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: seek(count, whence) accepts bogus whence on windows, python2.7
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com