/usr/share/doc/python-sqlobject-doc/Python3.html is in python-sqlobject-doc 3.1.0+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | <?xml version="1.0" encoding="utf-8" ?>
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>SQLObject and Python 3</title>
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
<div class="document" id="sqlobject-and-python-3">
<h1 class="title">SQLObject and Python 3</h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#changes-between-python-2-and-python-3" id="id1">Changes between Python 2 and Python 3</a><ul>
<li><a class="reference internal" href="#blobcol" id="id2">BLOBCol</a></li>
<li><a class="reference internal" href="#stringcol" id="id3">StringCol</a></li>
<li><a class="reference internal" href="#unicodecol" id="id4">UnicodeCol</a></li>
</ul>
</li>
<li><a class="reference internal" href="#python-3-and-mysql" id="id5">Python 3 and MySQL</a></li>
<li><a class="reference internal" href="#using-databases-created-with-sqlobject-and-python-2-in-python-3" id="id6">Using databases created with SQLObject and Python 2 in Python 3</a><ul>
<li><a class="reference internal" href="#sqlite" id="id7">SQLite</a></li>
<li><a class="reference internal" href="#postgres" id="id8">Postgres</a></li>
<li><a class="reference internal" href="#mysql" id="id9">MySQL</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="changes-between-python-2-and-python-3">
<h1>Changes between Python 2 and Python 3</h1>
<p>There are a few changes in the behaviour of SQLObject on Python 3, due to
the changed stings / bytes handling introduced in Python 3.0.</p>
<div class="section" id="blobcol">
<h2>BLOBCol</h2>
<p>In Python 3, BLOBCol now accepts and returns bytes, rather than strings as it
did in Python 2.</p>
</div>
<div class="section" id="stringcol">
<h2>StringCol</h2>
<p>In Python 3, StringCol now accepts arbitrary Unicode strings.</p>
</div>
<div class="section" id="unicodecol">
<h2>UnicodeCol</h2>
<p>The dbEncoding parameter to UnicodeCol has no effect in Python 3 code. This
is now handled by the underlying database layer and is no longer exposed
via SQLObject. The parameter is still available for those writing Python 2
compatible code.</p>
</div>
</div>
<div class="section" id="python-3-and-mysql">
<h1>Python 3 and MySQL</h1>
<p>SQLObject is tested using <a class="reference external" href="https://pypi.python.org/pypi/mysqlclient">mysqlclient</a> as the database driver on Python 3.
Note that the default encoding of MySQL databases is <em>latin1</em>, which can cause
problems with general Unicode strings. We recommend specifying the character
set as <em>utf8</em> when using MySQL to protect against these issues.</p>
</div>
<div class="section" id="using-databases-created-with-sqlobject-and-python-2-in-python-3">
<h1>Using databases created with SQLObject and Python 2 in Python 3</h1>
<p>For most cases, things should just work as before. The only issues should
around UnicodeCol, as how this is handled has changed.</p>
<div class="section" id="sqlite">
<h2>SQLite</h2>
<p>The Python 3 sqlite driver expects Unicode columns to be encoded using
utf8. Columns created using the default encoding on Python 2 should work fine,
but columns created with a different encoding set using the dbEncoding
parameter may cause problems.</p>
</div>
<div class="section" id="postgres">
<h2>Postgres</h2>
<p>Postgres' behaviour is similar to sqlite. Columns created using the
default encoding on Python 2 should work fine, but columns created with a
different encoding set using the dbEncoding may cause problems.</p>
</div>
<div class="section" id="mysql">
<h2>MySQL</h2>
<p>For MySQL, the results depend on whether the Python 2 database was using
MySQLdb's Unicode mode or not.</p>
<p>If a character set was specified for the database using the charset parameter,
such as:</p>
<pre class="literal-block">
mysql:///localhost/test?charset=latin1
</pre>
<p>Things should work provided the same character set is specified when using
Python 3.</p>
<p>If a character set wasn't specified, then things may work if the character set
is set to match the dbEncoding parameter used when defining the UnicodeCol.</p>
</div>
</div>
</div>
<div class="footer">
<hr class="footer" />
Get SQLObject at <a class="reference external" href="http://sourceforge.net/projects/sqlobject">Sourceforge.net</a>. Fast, secure and Free Open Source software downloads
</div>
</body>
</html>
|