ZipPath patch so that plugins works with non-writable plugins cache

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from grossetti <None>:

As described in the email thread [http://twistedmatrix.com/pipermail/twisted-python/2009-February/019244.html Twisted plugins and py2exe], I had problems using plugins with py2exe when the files are compressed in a Zip archive. A potential solution was to patch plugin.py to not try to update the cache file (or not creating it at all), btu that wasn't seen as a good solution. Another solution was to have py2exe create the cache and copy the cache files into the Zip archive, this is the path I took. While implementing this, I ran into a small problem, the `open()` funtion's signature is not the same in `twisted.python.filepath.FilePath` as it is in `twisted.python.zippath.ZipPath` and so I got exceptions. The patch I am submitting make's `ZipPath`'s open function take an optional `mode` para
 m and makes sure only read-only modes are passed. Also, if there could be a page in the wiki concerning py2exe it would be great, it could explain the code to make py2exe & Twisted w/ plugins behave like expected. I also joined a py2exe `setup.py` example on how to do that. This ticket is in some ways related to tickets #996 & #2409

----------
Type     : enhancement
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3827
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.