evennia/docs/1.0-dev/Python-3.html

191 lines
7.8 KiB
HTML
Raw Normal View History

2020-06-13 00:36:45 +02:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Python 3 &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="python-3">
<h1>Python 3<a class="headerlink" href="#python-3" title="Permalink to this headline"></a></h1>
<blockquote>
<div><p><em>Note: Evennia only supports Python 2.7+ at this time. This page gathers various development information relevant to server developers.</em></p>
</div></blockquote>
<p>Django can work with Python 2 and 3 already, though changes may be required to how the Evennia code
uses it. Twisted has much Python 3 compatibility, but not all modules within it have been ported
yet. The
<a class="reference external" href="https://twistedmatrix.com/documents/current/api/twisted.python.dist3.html">twisted.python.dist3</a>
module gives some information about whats ported, and Im compiling a list of missing modules with
related bug reports which can be found below. The list is based on a search for import statements in
the Evennia source code, please add anything thats missing.</p>
<p>Part of this process is expected to be writing more tests for Evennia. One encouraging recent port
to Python 3 in Twisted is its Trial test framework, which may need to be used by Evennia to ensure
it still works correctly with Twisted on Python 3.</p>
</div>
<div class="section" id="strings">
<h1>“Strings”<a class="headerlink" href="#strings" title="Permalink to this headline"></a></h1>
<p>Broadly (and perhaps over-simplified):</p>
<ul class="simple">
<li><p>Twisted <a class="reference external" href="http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhydontTwistedsnetworkmethodssupportUnicodeobjectsaswellasstrings">expects bytes</a></p></li>
<li><p>Django <a class="reference external" href="https://docs.djangoproject.com/en/1.8/topics/python3/#unicode-literals">expects “” to be unicode</a></p></li>
</ul>
<p>I think we should use (roughly speaking) “” for unicode and b”” for bytes everywhere, but I need to look at the impacts of this more closely.</p>
</div>
<div class="section" id="links">
<h1>Links<a class="headerlink" href="#links" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p>http://twistedmatrix.com/documents/current/core/howto/python3.html</p></li>
<li><p>https://twistedmatrix.com/trac/wiki/Plan/Python3</p></li>
<li><p><a class="reference external" href="https://twistedmatrix.com/trac/query?status=assigned&amp;status=new&amp;status=reopened&amp;group=status&amp;milestone=Python-3.x">Twisted Python3 bugs</a></p></li>
</ul>
</div>
<div class="section" id="twisted-module-status">
<h1>Twisted module status<a class="headerlink" href="#twisted-module-status" title="Permalink to this headline"></a></h1>
<p>x = not ported to Python 3
/ = ported to Python 3</p>
<ul class="simple">
<li><p>twisted.application.internet /</p></li>
<li><p>twisted.application.service /</p></li>
<li><p>twisted.conch x (not used directly)</p></li>
<li><p>~https://twistedmatrix.com/trac/ticket/5102~ /</p></li>
<li><p>~https://twistedmatrix.com/trac/ticket/4993~ /</p></li>
<li><p>twisted.conch.insults.insults x</p></li>
<li><p>twisted.conch.interfaces x</p></li>
<li><p>twisted.conch.manhole x</p></li>
<li><p>twisted.conch.manhole_ssh x</p></li>
<li><p>twisted.conch.ssh.common x</p></li>
<li><p>twisted.conch.ssh.keys x</p>
<ul>
<li><p>~https://twistedmatrix.com/trac/ticket/7998~ /</p></li>
<li><p>“twisted.conch.ssh.keys should be ported to Python 3”</p></li>
</ul>
</li>
<li><p>twisted.conch.ssh.userauth x</p></li>
<li><p>twisted.conch.telnet x</p></li>
<li><p>twisted.cred.checkers /</p></li>
<li><p>twisted.cred.portal /</p></li>
<li><p>twisted.internet.defer /</p></li>
<li><p>twisted.internet.interfaces /</p></li>
<li><p>twisted.internet.protocol /</p></li>
<li><p>twisted.internet.reactor /</p></li>
<li><p>twisted.internet.ssl /</p></li>
<li><p>twisted.internet.task /</p></li>
<li><p>twisted.internet.threads /</p></li>
<li><p>twisted.protocols.amp x</p></li>
<li><p>~https://twistedmatrix.com/trac/ticket/6833~ /</p></li>
<li><p>“Port twisted.protocols.amp to Python 3”</p></li>
<li><p>twisted.protocols.policies /</p></li>
<li><p>twisted.python.components /</p></li>
<li><p>twisted.python.log /</p></li>
<li><p>twisted.python.threadpool /</p></li>
<li><p>twisted.web.http (x)</p></li>
<li><p>Partial support. Sufficient?</p></li>
<li><p>twisted.web.resource /</p></li>
<li><p>twisted.web.server (x)</p></li>
<li><p>Partial support. Sufficient?</p></li>
<li><p>twisted.web.static /</p></li>
<li><p>twisted.web.proxy /</p></li>
<li><p>twisted.web.wsgi x</p></li>
<li><p>~https://twistedmatrix.com/trac/ticket/7993~ /</p>
<ul>
<li><p>twisted.web.wsgi should be ported to Python 3”</p></li>
<li><p>Seems to be making good progress</p></li>
</ul>
</li>
<li><p>twisted.words.protocols.irc x</p></li>
<li><p>https://twistedmatrix.com/trac/ticket/6320</p></li>
<li><p>“Python 3 support for twisted.words.protocols.irc”</p></li>
<li><p>~https://twistedmatrix.com/trac/ticket/6564~</p></li>
<li><p>“Replace usage of builtin reduce in twisted.words”</p></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<p><h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Python 3</a></li>
<li><a class="reference internal" href="#strings">“Strings”</a></li>
<li><a class="reference internal" href="#links">Links</a></li>
<li><a class="reference internal" href="#twisted-module-status">Twisted module status</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="_sources/Python-3.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div>
<h3>Versions</h3>
<ul>
<li><a href="Python-3.html">1.0-dev (develop branch)</a></li>
<li><a href="../../versions/0.9.1/index.html">0.9.1 (master branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2020, The Evennia developer community.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/Python-3.md.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>