Skip to content

Commit

Permalink
Drop support of Python 2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
sallner committed Sep 30, 2016
1 parent afa88ce commit edae2da
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- 2.6
- 2.7
install:
- python bootstrap.py
Expand Down
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changes
- In the template directory grokker, ignore directories and files
without extensions.

- Drop support of Python 2.6.

2.10.2 (2016-02-02)
-------------------
Expand Down
16 changes: 0 additions & 16 deletions src/grokcore/view/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@
optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS


def getlines(self, filename, module_globals=None):
# Patch patch for python 2.6 to prevent a UnicodeDecodeError.
m = self._DocTestRunner__LINECACHE_FILENAME_RE.match(filename)
if m and m.group('name') == self.test.name:
example = self.test.examples[int(m.group('examplenum'))]
source = example.source
if isinstance(source, unicode):
source = source.encode('ascii', 'backslashreplace')
return source.splitlines(True)
else:
return self.save_linecache_getlines(filename, module_globals)


doctest.DocTestRunner._DocTestRunner__patched_linecache_getlines = getlines


def setUp(test):
zope.component.eventtesting.setUp(test)
file_template_registry.ignore_templates('.svn')
Expand Down

0 comments on commit edae2da

Please sign in to comment.