[Python-bugs-list] [ python-Bugs-577782 ] resize readonly memory mapped file
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Sep 2002 12:45:22 -0700
Bugs item #577782, was opened at 2002-07-05 10:07
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577782&group_id=5470
Category: Windows
>Group: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Grzegorz Makarewicz (makaron)
Assigned to: Tim Peters (tim_one)
Summary: resize readonly memory mapped file
Initial Comment:
When file is open as readonly and mmf if created as R/O
too, then resizing this mapping will change its
protection and desired acces to read-write.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2002-09-25 15:45
Message:
Logged In: YES
user_id=31435
Closed, as the OP confirmed it was specific to 2.1. If anyone
volunteers to do another release in the 2.1 line, perhaps this
should be revisited.
----------------------------------------------------------------------
Comment By: Grzegorz Makarewicz (makaron)
Date: 2002-09-10 12:22
Message:
Logged In: YES
user_id=115179
Sorry, i was out of internet ;(
My python is 2.1 on windows, under 2.2 or cvs MMF works as
expected - my fault.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-09-10 10:57
Message:
Logged In: YES
user_id=31435
If the requested followup info isn't forthcoming, I can only
close this as Irreproducible.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-08-27 16:09
Message:
Logged In: YES
user_id=31435
Which version of Python are you talking about? Also, please
give a concrete example so we don't have to guess at what
you mean. Here's mine:
"""
import mmap
f = open('in.txt', 'rb')
m = mmap.mmap(f.fileno(), 0,
access=mmap.ACCESS_READ)
f.close()
print `m[:]`
m.resize(5)
"""
The m.resizes() attempt yields a TypeError, "mmap can't
resize a readonly or copy-on-write memory map". I tried this
under current CVS, and under 2.2.1, on Win2K.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577782&group_id=5470