You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
assignee=Noneclosed_at=<Date2011-07-25.05:26:23.708>created_at=<Date2011-05-18.09:56:03.768>labels= ['type-bug']
title='mmap requires file to be synced'updated_at=<Date2011-07-25.05:26:23.707>user='https://bugs.python.org/rion4ikgmailcom'
Hello, zion, Victor, i'm proposing a documentation patch.
I like it.
I don't think that Python should guess what the user expects (i.e. Python should not sync the file *implicitly*).
sdaoden commented on May 18, 2011
sdaodenmannequin
Mannequin
More actions
@ STINNER Victor wrote (2011-05-18 14:33+0200):
I don't think that Python should guess what the user expects
(i.e. Python should not sync the file *implicitly*).
Before i've found F_FULLFSYNC i indeed have had a solution which
tracked the open() of all files, so that mmap() could check wether
a file had been opened in write mode or not. ;|
Python does not do that by default (AFAIK).
rosslagerwall commented on May 18, 2011
rosslagerwallmannequin
Mannequin
More actions
I don't think that Python should guess what the user expects (i.e. Python should not sync the file *implicitly*).
Agreed.
The documentation patch looks good.
sdaoden commented on May 21, 2011
sdaodenmannequin
Mannequin
More actions
Looked at it again and i think it's much better english with an
additional ..to ensure "that" local... @ross, aren't you a native english speaker? What do you say?
rosslagerwall commented on May 21, 2011
rosslagerwallmannequin
Mannequin
More actions
Looked at it again and i think it's much better english with an
additional ..to ensure "that" local... @ross, aren't you a native english speaker? What do you say?
Yes I am, but that doesn't make me any good ;-)
I'd probably agree that it's better with "that" included.
sdaoden commented on May 22, 2011
sdaodenmannequin
Mannequin
More actions
that doesn't make me any good
Well - 'can only be better than myself, so i'll take that as yes :)
Activity
rion4ikgmailcom commentedon May 18, 2011
Not flushed file gives next results:
testcase:
#f.flush()
just uncomment f.flush() and try again. feel the difference.
suggestion: force flush on file descriptor when passed to mmap.
schmir commentedon May 18, 2011
your suggestion doesn't work. there's no such thing like a "flush on file descriptor".
vstinner commentedon May 18, 2011
See also issue bpo-11877 and bpo-11277.
rion4ikgmailcom commentedon May 18, 2011
okay guys I'm not going to read all this stuff.
just document it or fix.
thanks for quick reply
sdaoden commentedon May 18, 2011
@ rion wrote (2011-05-18 12:39+0200):
Hello, zion, Victor, i'm proposing a documentation patch.
It applies to 2.7 and 3.3 (from yesterday).
vstinner commentedon May 18, 2011
I like it.
I don't think that Python should guess what the user expects (i.e. Python should not sync the file *implicitly*).
sdaoden commentedon May 18, 2011
@ STINNER Victor wrote (2011-05-18 14:33+0200):
Before i've found F_FULLFSYNC i indeed have had a solution which
tracked the open() of all files, so that mmap() could check wether
a file had been opened in write mode or not. ;|
Python does not do that by default (AFAIK).
rosslagerwall commentedon May 18, 2011
Agreed.
The documentation patch looks good.
sdaoden commentedon May 21, 2011
Looked at it again and i think it's much better english with an
additional ..to ensure "that" local...
@ross, aren't you a native english speaker? What do you say?
rosslagerwall commentedon May 21, 2011
Yes I am, but that doesn't make me any good ;-)
I'd probably agree that it's better with "that" included.
sdaoden commentedon May 22, 2011
Well - 'can only be better than myself, so i'll take that as yes :)
python-dev commentedon Jul 25, 2011
New changeset 198627bbe242 by Ross Lagerwall in branch '3.2':
Issue bpo-12102: Document that buffered files must be flushed before being used
http://hg.python.org/cpython/rev/198627bbe242
New changeset 4898b14dcd69 by Ross Lagerwall in branch 'default':
Issue bpo-12102: Merge with 3.2.
http://hg.python.org/cpython/rev/4898b14dcd69
python-dev commentedon Jul 25, 2011
New changeset e75715f27ce7 by Ross Lagerwall in branch '2.7':
Issue bpo-12102: Document that buffered files must be flushed before being used
http://hg.python.org/cpython/rev/e75715f27ce7
rosslagerwall commentedon Jul 25, 2011
Thanks!