summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2021-07-17 10:10:43 (GMT)
committerGitHub <noreply@github.com>2021-07-17 10:10:43 (GMT)
commitd0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650 (patch)
treed646e7a7f3ff18db2428c0bb1dfacae72d0317a8 /Tools
parent311ee83adb40a9b549af8e0b546a787e8eb01f5d (diff)
downloadcpython-d0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650.zip
cpython-d0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650.tar.gz
cpython-d0b2b00c7d5ac3dc18d77bf4fcf607ee98c11650.tar.bz2
bpo-43425: Remove test2to3 from Tools (#26981)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/README2
-rw-r--r--Tools/test2to3/README3
-rwxr-xr-xTools/test2to3/maintest.py10
-rw-r--r--Tools/test2to3/setup.py26
-rw-r--r--Tools/test2to3/test/runtests.py19
-rw-r--r--Tools/test2to3/test/test_foo.py8
-rw-r--r--Tools/test2to3/test2to3/__init__.py1
-rw-r--r--Tools/test2to3/test2to3/hello.py5
8 files changed, 0 insertions, 74 deletions
diff --git a/Tools/README b/Tools/README
index b6d0b18..1f9d927 100644
--- a/Tools/README
+++ b/Tools/README
@@ -35,8 +35,6 @@ scripts A number of useful single-file programs, e.g. tabnanny.py
stringbench A suite of micro-benchmarks for various operations on
strings (both 8-bit and unicode). (*)
-test2to3 A demonstration of how to use 2to3 transparently in setup.py.
-
unicode Tools for generating unicodedata and codecs from unicode.org
and other mapping files (by Fredrik Lundh, Marc-Andre Lemburg
and Martin von Loewis).
diff --git a/Tools/test2to3/README b/Tools/test2to3/README
deleted file mode 100644
index 9365593..0000000
--- a/Tools/test2to3/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This project demonstrates how a distutils package
-can support Python 2.x and Python 3.x from a single
-source, using lib2to3. \ No newline at end of file
diff --git a/Tools/test2to3/maintest.py b/Tools/test2to3/maintest.py
deleted file mode 100755
index 036dd4f..0000000
--- a/Tools/test2to3/maintest.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env python3
-
-# The above line should get replaced with the path to the Python
-# interpreter; the block below should get 2to3-converted.
-
-try:
- from test2to3.hello import hello
-except ImportError, e:
- print "Import failed", e
-hello()
diff --git a/Tools/test2to3/setup.py b/Tools/test2to3/setup.py
deleted file mode 100644
index a0f9024..0000000
--- a/Tools/test2to3/setup.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-from distutils.core import setup
-
-try:
- from distutils.command.build_py import build_py_2to3 as build_py
-except ImportError:
- from distutils.command.build_py import build_py
-
-try:
- from distutils.command.build_scripts import build_scripts_2to3 as build_scripts
-except ImportError:
- from distutils.command.build_scripts import build_scripts
-
-setup(
- name = "test2to3",
- version = "1.0",
- description = "2to3 distutils test package",
- author = "Martin v. Lwis",
- author_email = "python-dev@python.org",
- license = "PSF license",
- packages = ["test2to3"],
- scripts = ["maintest.py"],
- cmdclass = {'build_py': build_py,
- 'build_scripts': build_scripts,
- }
-)
diff --git a/Tools/test2to3/test/runtests.py b/Tools/test2to3/test/runtests.py
deleted file mode 100644
index 1730f0d..0000000
--- a/Tools/test2to3/test/runtests.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Fictitious test runner for the project
-
-import sys, os
-
-if sys.version_info > (3,):
- # copy test suite over to "build/lib" and convert it
- from distutils.util import copydir_run_2to3
- testroot = os.path.dirname(__file__)
- newroot = os.path.join(testroot, '..', 'build/lib/test')
- copydir_run_2to3(testroot, newroot)
- # in the following imports, pick up the converted modules
- sys.path[0] = newroot
-
-# run the tests here...
-
-from test_foo import FooTest
-
-import unittest
-unittest.main()
diff --git a/Tools/test2to3/test/test_foo.py b/Tools/test2to3/test/test_foo.py
deleted file mode 100644
index ec8f26a..0000000
--- a/Tools/test2to3/test/test_foo.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import sys
-import unittest
-
-class FooTest(unittest.TestCase):
- def test_foo(self):
- # use 2.6 syntax to demonstrate conversion
- print 'In test_foo, using Python %s...' % (sys.version_info,)
- self.assertTrue(False)
diff --git a/Tools/test2to3/test2to3/__init__.py b/Tools/test2to3/test2to3/__init__.py
deleted file mode 100644
index 1bb8bf6..0000000
--- a/Tools/test2to3/test2to3/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# empty
diff --git a/Tools/test2to3/test2to3/hello.py b/Tools/test2to3/test2to3/hello.py
deleted file mode 100644
index f52926b..0000000
--- a/Tools/test2to3/test2to3/hello.py
+++ /dev/null
@@ -1,5 +0,0 @@
-def hello():
- try:
- print "Hello, world"
- except IOError, e:
- print e.errno