summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-12-13 10:22:06 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-12-13 10:22:06 -0500
commit8613ebce1acfcfd780bc5394179c3bfbb9c2790e (patch)
treeb2fd75ea865ad3cfa79bbcc04b98b02ad0db0c22
parentbc99309895c8d2a93291c732c3c01ec343af6417 (diff)
downloadpython-coveragepy-git-8613ebce1acfcfd780bc5394179c3bfbb9c2790e.tar.gz
Drop support for CPython 3.2. Now I can use u'' unicode literals freely.
-rw-r--r--CHANGES.txt3
-rw-r--r--coverage/backward.py10
-rw-r--r--tests/test_templite.py7
-rw-r--r--tox.ini2
4 files changed, 6 insertions, 16 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index f0f3c7b1..05e01e81 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,7 +6,8 @@ Change history for Coverage.py
Latest
------
-- Officially support PyPy 2.3 and 2.4, and PyPy3 2.3 and 2.4.
+- Officially support PyPy 2.3 and 2.4, and PyPy3 2.3 and 2.4. Drop support for
+ CPython 3.2.
- The original command line switches (`-x` to run a program, etc) are no
longer supported.
diff --git a/coverage/backward.py b/coverage/backward.py
index dfc169d4..030d336e 100644
--- a/coverage/backward.py
+++ b/coverage/backward.py
@@ -72,11 +72,6 @@ if sys.version_info >= (3, 0):
"""Convert bytes `b` to a string."""
return b.decode('utf8')
- def unicode_literal(s):
- """Make a plain string literal into unicode."""
- # In Python 3, string literals already are unicode.
- return s
-
def binary_bytes(byte_values):
"""Produce a byte string with the ints from `byte_values`."""
return bytes(byte_values)
@@ -99,11 +94,6 @@ else:
"""Convert bytes `b` to a string (no-op in 2.x)."""
return b
- def unicode_literal(s):
- """Make a plain string literal into unicode."""
- # In Python 2, s is a byte string.
- return s.decode('utf8')
-
def binary_bytes(byte_values):
"""Produce a byte string with the ints from `byte_values`."""
return "".join(chr(b) for b in byte_values)
diff --git a/tests/test_templite.py b/tests/test_templite.py
index 56033ec1..aca848a9 100644
--- a/tests/test_templite.py
+++ b/tests/test_templite.py
@@ -3,7 +3,6 @@
import re
-from coverage.backward import unicode_literal
from coverage.templite import Templite, TempliteSyntaxError
from tests.coveragetest import CoverageTest
@@ -238,9 +237,9 @@ class TempliteTest(CoverageTest):
def test_non_ascii(self):
self.try_render(
- unicode_literal("{{where}} ollǝɥ"),
- { 'where': unicode_literal('ǝɹǝɥʇ') },
- unicode_literal("ǝɹǝɥʇ ollǝɥ")
+ u"{{where}} ollǝɥ",
+ { 'where': u'ǝɹǝɥʇ' },
+ u"ǝɹǝɥʇ ollǝɥ"
)
def test_exception_during_evaluation(self):
diff --git a/tox.ini b/tox.ini
index c1dc50b0..7e74d95a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
-envlist = py26, py27, py32, py33, py34, pypy22, pypy23, pypy24, pypy3_23, pypy3_24
+envlist = py26, py27, py33, py34, pypy22, pypy23, pypy24, pypy3_23, pypy3_24
[testenv]
commands =