r46906 - make py3 (mostly) pass

hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: hawkowl
Date: Thu Mar  3 20:51:50 2016
New Revision: 46906

Modified:
   branches/sdist-use-7985-3/setup3.py
   branches/sdist-use-7985-3/tox.ini
   branches/sdist-use-7985-3/twisted/internet/test/fakeendpoint.py
   branches/sdist-use-7985-3/twisted/plugins/cred_memory.py
   branches/sdist-use-7985-3/twisted/plugins/cred_unix.py
   branches/sdist-use-7985-3/twisted/plugins/twisted_core.py
   branches/sdist-use-7985-3/twisted/python/dist3.py

Log:
make py3 (mostly) pass

Modified: branches/sdist-use-7985-3/setup3.py
==============================================================================
--- branches/sdist-use-7985-3/setup3.py	(original)
+++ branches/sdist-use-7985-3/setup3.py	Thu Mar  3 20:51:50 2016
@@ -14,7 +14,7 @@
 
 from setuptools import setup, find_packages
 from setuptools.command.build_py import build_py
-from setuptools.command.install_scripts import install_scripts
+from distutils.command.build_scripts import build_scripts
 
 
 class PickyBuildPy(build_py):
@@ -24,19 +24,22 @@
     """
     def find_package_modules(self, package, package_dir):
         from twisted.python.dist3 import modulesToInstall, testDataFiles
-        return [
+
+        modules = [
             module for module
             in super(build_py, self).find_package_modules(package, package_dir)
-            if module in modulesToInstall or module in testDataFiles]
+            if ".".join([module[0], module[1]]) in modulesToInstall or
+               ".".join([module[0], module[1]]) in testDataFiles]
+        return modules
 
 
 
-class PickyInstallScripts(install_scripts):
+class PickyBuildScripts(build_scripts):
 
-    def write_script(self, script_name, contents, mode="t", *ignored):
+    def copy_scripts(self):
         from twisted.python.dist3 import portedScripts
-        if script_name in portedScripts:
-            return super(PickyInstallScripts, self).write_script(script_name, contents, mode=mode)
+        self.scripts = portedScripts
+        return super(PickyBuildScripts, self).copy_scripts()
 
 
 
@@ -50,9 +53,9 @@
 
     args = STATIC_PACKAGE_METADATA.copy()
     args.update(dict(
-        cmd_class={
+        cmdclass={
             'build_py': PickyBuildPy,
-            'install_scripts': PickyInstallScripts,
+            'build_scripts': PickyBuildScripts,
         },
         packages=find_packages(),
         install_requires=["zope.interface >= 4.0.2"],

Modified: branches/sdist-use-7985-3/tox.ini
==============================================================================
--- branches/sdist-use-7985-3/tox.ini	(original)
+++ branches/sdist-use-7985-3/tox.ini	Thu Mar  3 20:51:50 2016
@@ -38,8 +38,7 @@
      narrativedocs: sphinx
 
 commands =
-    py27-{tests,nomodules}: {envbindir}/trial {posargs:twisted}
-    {py33,py34,py35}-{tests,nomodules}: python {toxinidir}/admin/run-python3-tests --installed {posargs:}
+    {tests,nomodules}: {envbindir}/trial {posargs:twisted}
 
     twistedchecker: twistedchecker {posargs:twisted}
     pyflakes: pyflakes {posargs:twisted}
@@ -48,8 +47,7 @@
     narrativedocs: sphinx-build -aW -b html -d {toxinidir}/docs/_build {toxinidir}/docs {toxinidir}/docs/_build/
 
     coverage: coverage erase
-    py27-coverage: coverage run --rcfile={toxinidir}/.coveragerc {envbindir}/trial --reporter=bwverbose {posargs:twisted}
-    {py33,py34,py35}-coverage: coverage run --rcfile={toxinidir}/.coveragerc {toxinidir}/admin/run-python3-tests --installed --reporter=bwverbose {posargs:}
+    coverage: coverage run --rcfile={toxinidir}/.coveragerc {envbindir}/trial --reporter=bwverbose {posargs:twisted}
     coverage: coverage report --rcfile={toxinidir}/.coveragerc
 
 [testenv:twistedchecker]

Modified: branches/sdist-use-7985-3/twisted/internet/test/fakeendpoint.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/internet/test/fakeendpoint.py	(original)
+++ branches/sdist-use-7985-3/twisted/internet/test/fakeendpoint.py	Thu Mar  3 20:51:50 2016
@@ -6,6 +6,8 @@
 Fake client and server endpoint string parser plugins for testing purposes.
 """
 
+from __future__ import absolute_import, division
+
 from zope.interface.declarations import implementer
 from twisted.plugin import IPlugin
 from twisted.internet.interfaces import (

Modified: branches/sdist-use-7985-3/twisted/plugins/cred_memory.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/plugins/cred_memory.py	(original)
+++ branches/sdist-use-7985-3/twisted/plugins/cred_memory.py	Thu Mar  3 20:51:50 2016
@@ -7,6 +7,8 @@
 Cred plugin for an in-memory user database.
 """
 
+from __future__ import absolute_import, division
+
 from zope.interface import implementer
 
 from twisted import plugin

Modified: branches/sdist-use-7985-3/twisted/plugins/cred_unix.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/plugins/cred_unix.py	(original)
+++ branches/sdist-use-7985-3/twisted/plugins/cred_unix.py	Thu Mar  3 20:51:50 2016
@@ -7,6 +7,8 @@
 Cred plugin for UNIX user accounts.
 """
 
+from __future__ import absolute_import, division
+
 from zope.interface import implementer
 
 from twisted import plugin
@@ -134,4 +136,3 @@
 
 
 theUnixCheckerFactory = UNIXCheckerFactory()
-

Modified: branches/sdist-use-7985-3/twisted/plugins/twisted_core.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/plugins/twisted_core.py	(original)
+++ branches/sdist-use-7985-3/twisted/plugins/twisted_core.py	Thu Mar  3 20:51:50 2016
@@ -1,6 +1,7 @@
 # Copyright (c) Twisted Matrix Laboratories.
 # See LICENSE for details.
 
+from __future__ import absolute_import, division
 
 from twisted.internet.endpoints import (
     _SystemdParser, _TCP6ServerParser, _StandardIOParser,
@@ -10,4 +11,3 @@
 tcp6ServerEndpointParser = _TCP6ServerParser()
 stdioEndpointParser = _StandardIOParser()
 tlsClientEndpointParser = _TLSClientEndpointParser()
-

Modified: branches/sdist-use-7985-3/twisted/python/dist3.py
==============================================================================
--- branches/sdist-use-7985-3/twisted/python/dist3.py	(original)
+++ branches/sdist-use-7985-3/twisted/python/dist3.py	Thu Mar  3 20:51:50 2016
@@ -35,32 +35,32 @@
 
 
 modules = [
-    "twisted",
+    "twisted.__init__",
     "twisted._version",
-    "twisted.application",
+    "twisted.application.__init__",
     "twisted.application.app",
     "twisted.application.internet",
     "twisted.application.reactors",
     "twisted.application.service",
     "twisted.application.strports",
-    "twisted.application.test",
-    "twisted.conch",
-    "twisted.conch.ssh",
+    "twisted.application.test.__init__",
+    "twisted.conch.__init__",
+    "twisted.conch.ssh.__init__",
     "twisted.conch.ssh._cryptography_backports",
     "twisted.conch.ssh.common",
     "twisted.conch.ssh.keys",
     "twisted.conch.ssh.sexpy",
-    "twisted.conch.test",
+    "twisted.conch.test.__init__",
     "twisted.copyright",
-    "twisted.cred",
+    "twisted.cred.__init__",
     "twisted.cred._digest",
     "twisted.cred.checkers",
     "twisted.cred.credentials",
     "twisted.cred.error",
     "twisted.cred.portal",
     "twisted.cred.strcred",
-    "twisted.cred.test",
-    "twisted.internet",
+    "twisted.cred.test.__init__",
+    "twisted.internet.__init__",
     "twisted.internet._baseprocess",
     "twisted.internet._glibbase",
     "twisted.internet._newtls",
@@ -93,16 +93,17 @@
     "twisted.internet.stdio",
     "twisted.internet.task",
     "twisted.internet.tcp",
-    "twisted.internet.test",
+    "twisted.internet.test.__init__",
     "twisted.internet.test._posixifaces",
     "twisted.internet.test.connectionmixins",
+    "twisted.internet.test.fakeendpoint",
     "twisted.internet.test.modulehelpers",
     "twisted.internet.test.reactormixins",
     "twisted.internet.threads",
     "twisted.internet.udp",
     "twisted.internet.unix",
     "twisted.internet.utils",
-    "twisted.logger",
+    "twisted.logger.__init__",
     "twisted.logger._buffer",
     "twisted.logger._file",
     "twisted.logger._filter",
@@ -117,8 +118,8 @@
     "twisted.logger._observer",
     "twisted.logger._stdlib",
     "twisted.logger._util",
-    "twisted.logger.test",
-    "twisted.names",
+    "twisted.logger.test.__init__",
+    "twisted.names.__init__",
     "twisted.names._rfc1982",
     "twisted.names.cache",
     "twisted.names.client",
@@ -127,31 +128,34 @@
     "twisted.names.error",
     "twisted.names.hosts",
     "twisted.names.resolve",
-    "twisted.names.test",
-    "twisted.persisted",
+    "twisted.names.test.__init__",
+    "twisted.persisted.__init__",
     "twisted.persisted.aot",
     "twisted.persisted.crefutil",
     "twisted.persisted.sob",
     "twisted.persisted.styles",
     "twisted.plugin",
-    "twisted.plugins",
+    "twisted.plugins.__init__",
     "twisted.plugins.cred_anonymous",
     "twisted.plugins.cred_file",
+    "twisted.plugins.cred_memory",
     "twisted.plugins.cred_sshkeys",
+    "twisted.plugins.cred_unix",
+    "twisted.plugins.twisted_core",
     "twisted.plugins.twisted_trial",
     "twisted.plugins.twisted_web",
-    "twisted.positioning",
+    "twisted.positioning.__init__",
     "twisted.positioning._sentence",
     "twisted.positioning.base",
     "twisted.positioning.ipositioning",
     "twisted.positioning.nmea",
-    "twisted.protocols",
+    "twisted.protocols.__init__",
     "twisted.protocols.amp",
     "twisted.protocols.basic",
     "twisted.protocols.policies",
-    "twisted.protocols.test",
+    "twisted.protocols.test.__init__",
     "twisted.protocols.tls",
-    "twisted.python",
+    "twisted.python.__init__",
     "twisted.python._tzhelper",
     "twisted.python._url",
     "twisted.python.compat",
@@ -184,15 +188,15 @@
     "twisted.python.util",
     "twisted.python.versions",
     "twisted.python.zippath",
-    "twisted.scripts",
+    "twisted.scripts.__init__",
     "twisted.scripts._twistd_unix",
     "twisted.scripts.trial",
     "twisted.scripts.twistd",
-    "twisted.test",
+    "twisted.test.__init__",
     "twisted.test.iosim",
     "twisted.test.proto_helpers",
     "twisted.test.ssl_helpers",
-    "twisted._threads",
+    "twisted._threads.__init__",
     "twisted._threads._convenience",
     "twisted._threads._ithreads",
     "twisted._threads._memory",
@@ -206,7 +210,7 @@
     "twisted.trial.itrial",
     "twisted.trial.reporter",
     "twisted.trial.runner",
-    "twisted.trial.test",
+    "twisted.trial.test.__init__",
     "twisted.trial.test.detests",
     "twisted.trial.test.erroneous",
     "twisted.trial.test.packages",
@@ -215,7 +219,7 @@
     "twisted.trial.test.suppression",
     "twisted.trial.unittest",
     "twisted.trial.util",
-    "twisted.web",
+    "twisted.web.__init__",
     "twisted.web._auth",
     "twisted.web._auth.basic",
     "twisted.web._auth.digest",
@@ -235,7 +239,7 @@
     "twisted.web.static",
     "twisted.web.tap",
     "twisted.web.template",
-    "twisted.web.test",
+    "twisted.web.test.__init__",
     "twisted.web.test.requesthelper",
     "twisted.web.util",
     "twisted.web.vhost",
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.