[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread STINNER Victor
STINNER Victor added the comment: The documentation has been clarified, thanks Pablo Galindo! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
miss-islington added the comment: New changeset 2bad7acdfebb87a6eef238a7acca636cfb648a02 by Miss Islington (bot) in branch '2.7': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
miss-islington added the comment: New changeset 557a68789b97bf281aa7b7e96f083982c01a5f7e by Miss Islington (bot) in branch '3.7': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
miss-islington added the comment: New changeset 75ee130c39e73730535d94923fd8322ef616cb83 by Miss Islington (bot) in branch '3.6': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (GH-5621)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9332 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9331 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9330 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-10-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 027664a3d5ebad575aafe5fcc572e3b05f7f24e5 by Victor Stinner (Pablo Galindo) in branch 'master': bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (#5621)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-03-28 Thread Berker Peksag
Berker Peksag added the comment: By the way, there is a note in the "Change History" section of the msync() documentation at http://pubs.opengroup.org/onlinepubs/9699919799/ The second [EINVAL] error condition is made mandatory. The second EINVAL error condition

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-12 Thread Xiang Zhang
Xiang Zhang added the comment: One thing to note is the behaviour seems fit implementation detail. POSIX doesn't requires this for both mmap and msync, it's optional: The mmap( ) function may fail if: [EINVAL] The addr argument (if MAP_FIXED was specified) or off is not a

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +5430 stage: -> patch review ___ Python tracker ___

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-09 Thread Марк Коренберг
Марк Коренберг added the comment: Actually documented: http://man7.org/linux/man-pages/man2/msync.2.html EINVAL: addr is not a multiple of PAGESIZE; -- nosy: +socketpair ___ Python tracker

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Byron Hawkins
Byron Hawkins added the comment: Couldn't the implementation check the page size and throw a better error (for relevant platforms)? Or better yet, adjust the offset to the nearest inclusive page boundary. -- ___ Python

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: I'm marking this as a low priority and simple documentation bug. The mmap module exposes the page size of the architecture as mmap.PAGESIZE. -- keywords: +easy ___ Python tracker

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: offset must be a multiple of pagesize. This is a known but undocumented restriction on some platforms, see http://man7.org/linux/man-pages/man2/msync.2.html -- assignee: -> docs@python components: +Documentation -Library (Lib)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Byron Hawkins
New submission from Byron Hawkins : open_file = open("file.txt", "r+b") file_map = mmap.mmap(open_file, 0) file_map.seek(offset) file_map.write("foobar") # success file_map.flush() # success file_map.flush(offset, len("foobar")) # Fails with "errno 22" This example