evennia/docs/1.0-dev/Python-3.html
2020-06-14 21:48:02 +02:00

308 lines
No EOL
9.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python 3 &mdash; Evennia 1.0-dev documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Evennia 1.0-dev documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Evennia
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<!-- Local TOC -->
<div class="local-toc"><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>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Evennia</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Python 3</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Python-3.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<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>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2020, The Evennia developer community.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> and ❤️ using a custom <a href="https://github.com/LinxiFan/Sphinx-theme">theme</a> based on <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0-dev',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</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>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>