New issue 1902: PyPy3: "IOError: [Errno 22] Invalid argument" with buffered rw 
file IO
https://bitbucket.org/pypy/pypy/issue/1902/pypy3-ioerror-errno-22-invalid-argument

Christoph Reiter:

With PyPy 2.4.0:

```
#!python

with open("foo.data", "w+b", 4096) as f:
    f.write(b"\xff" * 13569)
    f.flush()
    f.seek(0, 0)
    f.read(1)
    f.seek(-1, 1)
    f.write(b"")  # pypy3: IOError: [Errno 22] Invalid argument
```

```
#!python

with open("foo.data", "w+b", 4096) as f:
    f.write(b"\xff" * 13569)
    f.flush()
    f.seek(0, 0)

    f.read(1)
    f.seek(-1, 1)
    f.write(b"\xff")
    f.seek(1, 0)
    f.read(4123)
    f.seek(-4123, 1) # IOError: [Errno 22] Invalid argument
```



_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to