<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>rarfile history — RarFile 2.6 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '2.6', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="RarFile 2.6 documentation" href="index.html" /> <link rel="prev" title="rarfile FAQ" href="faq.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="faq.html" title="rarfile FAQ" accesskey="P">previous</a> |</li> <li><a href="index.html">RarFile 2.6 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="rarfile-history"> <h1>rarfile history<a class="headerlink" href="#rarfile-history" title="Permalink to this headline">¶</a></h1> <div class="section" id="version-2-6-2013-04-10"> <h2>Version 2.6 (2013-04-10)<a class="headerlink" href="#version-2-6-2013-04-10" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Add context manager support for <a class="reference internal" href="api.html#rarfile.RarFile" title="rarfile.RarFile"><tt class="xref py py-class docutils literal"><span class="pre">RarFile</span></tt></a> class. Both <a class="reference internal" href="api.html#rarfile.RarFile" title="rarfile.RarFile"><tt class="xref py py-class docutils literal"><span class="pre">RarFile</span></tt></a> and <a class="reference internal" href="api.html#rarfile.RarExtFile" title="rarfile.RarExtFile"><tt class="xref py py-class docutils literal"><span class="pre">RarExtFile</span></tt></a> support <a class="reference external" href="http://docs.python.org/2/reference/compound_stmts.html#with" title="(in Python v2.7)"><tt class="xref std std-keyword docutils literal"><span class="pre">with</span></tt></a> statement now. (Wentao Han)</li> <li><a class="reference internal" href="api.html#rarfile.RarFile.volumelist" title="rarfile.RarFile.volumelist"><tt class="xref py py-meth docutils literal"><span class="pre">RarFile.volumelist()</span></tt></a> method, returns filenames of archive volumes.</li> <li>Re-throw clearer error in case <tt class="docutils literal"><span class="pre">unrar</span></tt> is not found in <tt class="docutils literal"><span class="pre">PATH</span></tt>.</li> <li>Sync new unrar4.x error code from <tt class="docutils literal"><span class="pre">rar.txt</span></tt>.</li> <li>Use Sphinx for documentation, push docs to <a class="reference external" href="https://rarfile.readthedocs.org/">rtfd.org</a></li> </ul> </div> <div class="section" id="version-2-5-2012-01-19"> <h2>Version 2.5 (2012-01-19)<a class="headerlink" href="#version-2-5-2012-01-19" title="Permalink to this headline">¶</a></h2> <p>Fixes:</p> <ul class="simple"> <li>.read() and .readinto() now do looping read to work properly on short reads. Important for Python 3.2+ where read from pipe can return short result even on blocking file descriptor.</li> <li>Proper error reporting in .extract(), .extractall(), .testrar()</li> <li>.read() from unrar pipe: prefer to return unrar error code, if thats not available, do own error checks.</li> <li>Avoid string addition in .read(), instead use always list+join to merge multi-part reads.</li> <li>dumprar: dont re-encode byte strings (python 2.x). This avoids unneccessary failure when printing invalid unicode.</li> </ul> </div> <div class="section" id="version-2-4-2011-11-05"> <h2>Version 2.4 (2011-11-05)<a class="headerlink" href="#version-2-4-2011-11-05" title="Permalink to this headline">¶</a></h2> <p>Fixes:</p> <ul class="simple"> <li>USE_DATETIME: survive bad values from RAR</li> <li>Fix bug in corrupt unicode filename handling</li> <li>dumprar: make unicode chars work with both pipe and console</li> </ul> </div> <div class="section" id="version-2-3-2011-07-03"> <h2>Version 2.3 (2011-07-03)<a class="headerlink" href="#version-2-3-2011-07-03" title="Permalink to this headline">¶</a></h2> <p>Features:</p> <ul class="simple"> <li>Support .seek() method on file streams. (Kristian Larsson)</li> <li>Support .readinto() method on file streams. Optimized implementation is available on Python 2.6+ where <tt class="docutils literal"><span class="pre">memoryview</span></tt> is available.</li> <li>Support file comments - <tt class="docutils literal"><span class="pre">RarInfo.comment</span></tt> contains decompressed data if available.</li> <li>File objects returned by <tt class="docutils literal"><span class="pre">RarFile.open()</span></tt> are <tt class="docutils literal"><span class="pre">io.RawIOBase</span></tt>-compatible. They can further wrapped with <tt class="docutils literal"><span class="pre">io.BufferedReader`</span> <span class="pre">and</span> <span class="pre">``io.TextIOWrapper</span></tt>.</li> <li>Now .getinfo() uses dict lookup instead of sequential scan when searching archive entry. This speeds up prococessing for archives that have many entries.</li> <li>Option <tt class="docutils literal"><span class="pre">rarfile.UNICODE_COMMENTS</span></tt> to decode both archive and file comments to unicode. It uses <tt class="docutils literal"><span class="pre">TRY_ENCODINGS</span></tt> for list of encodings to try. If off, comments are left as byte strings. Default: 0</li> <li>Option <tt class="docutils literal"><span class="pre">rarfile.PATH_SEP</span></tt> to change path separator. Default: <tt class="docutils literal"><span class="pre">r'\'</span></tt>, set <tt class="docutils literal"><span class="pre">rarfile.PATH_SEP='/'</span></tt> to be compatibe with zipfile.</li> <li>Option <tt class="docutils literal"><span class="pre">rarfile.USE_DATETIME</span></tt> to convert timestamps to datetime objects. Default: 0, timestamps are tuples.</li> <li>Option <tt class="docutils literal"><span class="pre">rarfile.TRY_ENCODINGS</span></tt> to allow tuning attempted encoding list.</li> <li>Reorder RarInfo fiels to better show zipfile-compatible fields.</li> <li>Standard regtests to make sure various features work</li> </ul> <p>Compatibility:</p> <ul class="simple"> <li>Drop <tt class="docutils literal"><span class="pre">RarInfo.unicode_filename</span></tt>, plain <tt class="docutils literal"><span class="pre">RarInfo.filename</span></tt> is already unicode since 2.0.</li> <li>.read(-1) reads now until EOF. Previously it returned empty buffer.</li> </ul> <p>Fixes:</p> <ul class="simple"> <li>Make encrypted headers work with Python 3.x bytes() and with old 2.x ‘sha’ module.</li> <li>Simplify <tt class="docutils literal"><span class="pre">subprocess.Popen()</span></tt> usage when launching <tt class="docutils literal"><span class="pre">unrar</span></tt>. Previously it tried to optimize and work around OS/Python bugs, but this is not maintainable.</li> <li>Use temp rar file hack on multi-volume archives too.</li> <li>Always .wait() on unrar, to avoid zombies</li> <li>Convert struct.error to BadRarFile</li> <li>Plug some fd leaks. Affected: Jython, PyPy.</li> <li>Broken archives are handled more robustly.</li> </ul> </div> <div class="section" id="version-2-2-2010-08-19"> <h2>Version 2.2 (2010-08-19)<a class="headerlink" href="#version-2-2-2010-08-19" title="Permalink to this headline">¶</a></h2> <p>Fixes:</p> <ul class="simple"> <li>Relaxed volume naming. Now it just calculates new volume name by finding number in old one and increasing it, without any expectations what that number should be.</li> <li>Files with 4G of compressed data in one colume were handled wrong. Fix.</li> <li>DOS timestamp seconds need to be multiplied with 2.</li> <li>Correct EXTTIME parsing.</li> </ul> <p>Cleanups:</p> <ul class="simple"> <li>Compressed size is per-volume, sum them together, so that user sees complete compressed size for files split over several volumes.</li> <li>dumprar: Show unknown bits.</li> <li>Use <tt class="docutils literal"><span class="pre">struct.Struct()</span></tt> to cache unpack formats.</li> <li>Support missing <tt class="docutils literal"><span class="pre">os.devnull</span></tt>. (Python 2.3)</li> </ul> </div> <div class="section" id="version-2-1-2010-07-31"> <h2>Version 2.1 (2010-07-31)<a class="headerlink" href="#version-2-1-2010-07-31" title="Permalink to this headline">¶</a></h2> <p>Features:</p> <ul class="simple"> <li>Minimal implmentation for .extract(), .extractall(), .testrar(). They are simple shortcuts to <tt class="docutils literal"><span class="pre">unrar</span></tt> invocation.</li> <li>Accept RarInfo object where filename is expected.</li> <li>Include dumprar.py in .tgz. It can be used to visualize RAR structure and test module.</li> <li>Support for encrypted file headers.</li> </ul> <p>Fixes:</p> <ul class="simple"> <li>Don’t read past ENDARC, there could be non-RAR data there.</li> <li>RAR 2.x: It does not write ENDARC, but our volume code expected it. Fix that.</li> <li>RAR 2.x: Support more than 200 old-style volumes.</li> </ul> <p>Cleanups:</p> <ul class="simple"> <li>Load comment only when requested.</li> <li>Cleanup of internal config variables. They should have now final names.</li> <li>.open(): Add mode=r argument to match zipfile.</li> <li>Doc and comments cleanup, minimize duplication.</li> <li>Common wrappers for both compressed and uncompressed files, now .open() also does CRC-checking.</li> </ul> </div> <div class="section" id="version-2-0-2010-04-29"> <h2>Version 2.0 (2010-04-29)<a class="headerlink" href="#version-2-0-2010-04-29" title="Permalink to this headline">¶</a></h2> <p>Features:</p> <ul class="simple"> <li>Python 3 support. Still works with 2.x.</li> <li>Parses extended time fields. (.mtime, .ctime, .atime)</li> <li>.open() method. This makes possible to process large entries that do not fit into memory.</li> <li>Supports password-protected archives.</li> <li>Supports archive comments.</li> </ul> <p>Cleanups:</p> <ul class="simple"> <li>Uses subprocess module to launch unrar.</li> <li>.filename is always Unicode string, .unicode_filename is now deprecated.</li> <li>.CRC is unsigned again, as python3 crc32() is unsigned.</li> </ul> </div> <div class="section" id="version-1-1-2008-08-31"> <h2>Version 1.1 (2008-08-31)<a class="headerlink" href="#version-1-1-2008-08-31" title="Permalink to this headline">¶</a></h2> <p>Fixes:</p> <ul class="simple"> <li>Replace os.tempnam() with tempfile.mkstemp(). (Jason Moiron)</li> <li>Fix infinite loop in _extract_hack on unexpected EOF</li> <li>RarInfo.CRC is now signed value to match crc32()</li> <li>RarFile.read() now checks file crc</li> </ul> <p>Cleanups:</p> <ul class="simple"> <li>more docstrings</li> <li>throw proper exceptions (subclasses of rarfile.Error)</li> <li>RarInfo has fields pre-initialized, so they appear in help()</li> <li>rename RarInfo.data to RarInfo.header_data</li> <li>dont use “print” when header parsing fails</li> <li>use try/finally to delete temp rar</li> </ul> </div> <div class="section" id="version-1-0-2005-08-08"> <h2>Version 1.0 (2005-08-08)<a class="headerlink" href="#version-1-0-2005-08-08" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>First release.</li> </ul> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">rarfile history</a><ul> <li><a class="reference internal" href="#version-2-6-2013-04-10">Version 2.6 (2013-04-10)</a></li> <li><a class="reference internal" href="#version-2-5-2012-01-19">Version 2.5 (2012-01-19)</a></li> <li><a class="reference internal" href="#version-2-4-2011-11-05">Version 2.4 (2011-11-05)</a></li> <li><a class="reference internal" href="#version-2-3-2011-07-03">Version 2.3 (2011-07-03)</a></li> <li><a class="reference internal" href="#version-2-2-2010-08-19">Version 2.2 (2010-08-19)</a></li> <li><a class="reference internal" href="#version-2-1-2010-07-31">Version 2.1 (2010-07-31)</a></li> <li><a class="reference internal" href="#version-2-0-2010-04-29">Version 2.0 (2010-04-29)</a></li> <li><a class="reference internal" href="#version-1-1-2008-08-31">Version 1.1 (2008-08-31)</a></li> <li><a class="reference internal" href="#version-1-0-2005-08-08">Version 1.0 (2005-08-08)</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="faq.html" title="previous chapter">rarfile FAQ</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/news.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="faq.html" title="rarfile FAQ" >previous</a> |</li> <li><a href="index.html">RarFile 2.6 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2005-2013, Marko Kreen. </div> </body> </html>