Drop support for Python 2.5

It still compiles and probably works fine. But unit tests do not run and
official support for Python 2.5 has been dropped.
This commit is contained in:
J. David Ibáñez
2011-08-13 22:05:43 +02:00
parent 7035598c73
commit aaa3d533a8
2 changed files with 4 additions and 7 deletions

View File

@@ -1,7 +1,8 @@
pygit2 - libgit2 bindings in Python pygit2 - libgit2 bindings in Python
===================================== =====================================
pygit2 is a set of Python 2.5+ bindings to the libgit2 linkable C Git library. pygit2 is a set of Python bindings to the libgit2 linkable C Git library.
The supported versions of Python are 2.6, 2.7, 3.1 and 3.2
INSTALLING AND RUNNING INSTALLING AND RUNNING
======================== ========================
@@ -16,7 +17,7 @@ For instance, in Debian-based systems run:
$ sudo apt-get install zlib1g-dev libssl-dev $ sudo apt-get install zlib1g-dev libssl-dev
Also, make sure you have Python 2.5+ installed together with the Python development headers. Also, make sure you have Python 2.6+ installed together with the Python development headers.
When those are installed, you can install pygit2: When those are installed, you can install pygit2:

View File

@@ -29,7 +29,6 @@ __author__ = 'dborowitz@google.com (Dave Borowitz)'
import os import os
import shutil import shutil
import sys
import tarfile import tarfile
import tempfile import tempfile
import unittest import unittest
@@ -45,10 +44,7 @@ class BaseTestCase(unittest.TestCase):
def assertRaisesWithArg(self, exc_class, arg, func, *args, **kwargs): def assertRaisesWithArg(self, exc_class, arg, func, *args, **kwargs):
try: try:
func(*args, **kwargs) func(*args, **kwargs)
except exc_class: except exc_class as exc_value:
# XXX Use the 'exc_class as exc_value' syntax as soon as we drop
# support for Python 2.5
exc_value = sys.exc_info()[1]
self.assertEqual((arg,), exc_value.args) self.assertEqual((arg,), exc_value.args)
else: else:
self.fail('%s(%r) not raised' % (exc_class.__name__, arg)) self.fail('%s(%r) not raised' % (exc_class.__name__, arg))