From aaa3d533a82087e6a680e39c55a825dc89e1bc75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid@itaapy.com>
Date: Sat, 13 Aug 2011 22:05:43 +0200
Subject: [PATCH] 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.
---
 README.md     | 5 +++--
 test/utils.py | 6 +-----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index f24f4cf..a39fdca 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
 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
 ========================
@@ -16,7 +17,7 @@ For instance, in Debian-based systems run:
 
     $ 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:
 
diff --git a/test/utils.py b/test/utils.py
index ddc0ce0..f531e45 100644
--- a/test/utils.py
+++ b/test/utils.py
@@ -29,7 +29,6 @@ __author__ = 'dborowitz@google.com (Dave Borowitz)'
 
 import os
 import shutil
-import sys
 import tarfile
 import tempfile
 import unittest
@@ -45,10 +44,7 @@ class BaseTestCase(unittest.TestCase):
     def assertRaisesWithArg(self, exc_class, arg, func, *args, **kwargs):
         try:
             func(*args, **kwargs)
-        except exc_class:
-            # 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]
+        except exc_class as exc_value:
             self.assertEqual((arg,), exc_value.args)
         else:
             self.fail('%s(%r) not raised' % (exc_class.__name__, arg))