Merge license fixes
diff --git a/.bzrignore b/.bzrignore
new file mode 100644
index 0000000..3061b41
--- /dev/null
+++ b/.bzrignore
@@ -0,0 +1,2 @@
+*.egg-info
+build
diff --git a/dateutil/relativedelta.py b/dateutil/relativedelta.py
index 1674d80..4393bcb 100644
--- a/dateutil/relativedelta.py
+++ b/dateutil/relativedelta.py
@@ -242,7 +242,24 @@
         else:
             self.years = 0
 
-    def __radd__(self, other):
+    def __add__(self, other):
+        if isinstance(other, relativedelta):
+            return relativedelta(years=other.years+self.years,
+                             months=other.months+self.months,
+                             days=other.days+self.days,
+                             hours=other.hours+self.hours,
+                             minutes=other.minutes+self.minutes,
+                             seconds=other.seconds+self.seconds,
+                             microseconds=other.microseconds+self.microseconds,
+                             leapdays=other.leapdays or self.leapdays,
+                             year=other.year or self.year,
+                             month=other.month or self.month,
+                             day=other.day or self.day,
+                             weekday=other.weekday or self.weekday,
+                             hour=other.hour or self.hour,
+                             minute=other.minute or self.minute,
+                             second=other.second or self.second,
+                             microsecond=other.microsecond or self.microsecond)
         if not isinstance(other, datetime.date):
             raise TypeError("unsupported type for add operation")
         elif self._has_time and not isinstance(other, datetime.datetime):
@@ -285,48 +302,31 @@
             ret += datetime.timedelta(days=jumpdays)
         return ret
 
+    def __radd__(self, other):
+        return self.__add__(other)
+
     def __rsub__(self, other):
         return self.__neg__().__radd__(other)
 
-    def __add__(self, other):
-        if not isinstance(other, relativedelta):
-            raise TypeError("unsupported type for add operation")
-        return relativedelta(years=other.years+self.years,
-                             months=other.months+self.months,
-                             days=other.days+self.days,
-                             hours=other.hours+self.hours,
-                             minutes=other.minutes+self.minutes,
-                             seconds=other.seconds+self.seconds,
-                             microseconds=other.microseconds+self.microseconds,
-                             leapdays=other.leapdays or self.leapdays,
-                             year=other.year or self.year,
-                             month=other.month or self.month,
-                             day=other.day or self.day,
-                             weekday=other.weekday or self.weekday,
-                             hour=other.hour or self.hour,
-                             minute=other.minute or self.minute,
-                             second=other.second or self.second,
-                             microsecond=other.microsecond or self.microsecond)
-
     def __sub__(self, other):
         if not isinstance(other, relativedelta):
             raise TypeError("unsupported type for sub operation")
-        return relativedelta(years=other.years-self.years,
-                             months=other.months-self.months,
-                             days=other.days-self.days,
-                             hours=other.hours-self.hours,
-                             minutes=other.minutes-self.minutes,
-                             seconds=other.seconds-self.seconds,
-                             microseconds=other.microseconds-self.microseconds,
-                             leapdays=other.leapdays or self.leapdays,
-                             year=other.year or self.year,
-                             month=other.month or self.month,
-                             day=other.day or self.day,
-                             weekday=other.weekday or self.weekday,
-                             hour=other.hour or self.hour,
-                             minute=other.minute or self.minute,
-                             second=other.second or self.second,
-                             microsecond=other.microsecond or self.microsecond)
+        return relativedelta(years=self.years-other.years,
+                             months=self.months-other.months,
+                             days=self.days-other.days,
+                             hours=self.hours-other.hours,
+                             minutes=self.minutes-other.minutes,
+                             seconds=self.seconds-other.seconds,
+                             microseconds=self.microseconds-other.microseconds,
+                             leapdays=self.leapdays or other.leapdays,
+                             year=self.year or other.year,
+                             month=self.month or other.month,
+                             day=self.day or other.day,
+                             weekday=self.weekday or other.weekday,
+                             hour=self.hour or other.hour,
+                             minute=self.minute or other.minute,
+                             second=self.second or other.second,
+                             microsecond=self.microsecond or other.microsecond)
 
     def __neg__(self):
         return relativedelta(years=-self.years,
diff --git a/test.py b/test.py
index c30b52e..80a7776 100755
--- a/test.py
+++ b/test.py
@@ -12,7 +12,10 @@
 if os.path.exists("build"):
 	from distutils.util import get_platform
 	import sys
-	s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
+	if sys.version_info >= (3, 2):
+		s = "build/lib"
+	else:
+		s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
 	s = os.path.join(os.getcwd(), s)
 	sys.path.insert(0, s)
 
@@ -147,14 +150,35 @@
         self.assertEqual(self.today+relativedelta(yearday=261),
                          date(2003, 9, 18))
 
-    def test884317(self):
-        # See https://bugs.launchpad.net/dateutil/+bug/884317
-        a = relativedelta(second = 2, microsecond = 20)
-        b = relativedelta(second = 1, microsecond = 10)
-        c = a-b
-        self.assertEqual(c.microsecond, b.microsecond)
-        c = a+b
-        self.assertEqual(c.microsecond, b.microsecond)
+    def testAddition(self):
+        self.assertEqual(relativedelta(days=10) +
+                         relativedelta(years=1, months=2, days=3, hours=4,
+                                       minutes=5, microseconds=6),
+                         relativedelta(years=1, months=2, days=13, hours=4,
+                                       minutes=5, microseconds=6))
+
+    def testAdditionToDatetime(self):
+        self.assertEqual(datetime(2000, 1, 1) + relativedelta(days=1),
+                         datetime(2000, 1, 2))
+
+    def testRightAdditionToDatetime(self):
+        self.assertEqual(relativedelta(days=1) + datetime(2000, 1, 1),
+                         datetime(2000, 1, 2))
+
+    def testSubtraction(self):
+        self.assertEqual(relativedelta(days=10) -
+                         relativedelta(years=1, months=2, days=3, hours=4,
+                                       minutes=5, microseconds=6),
+                         relativedelta(years=-1, months=-2, days=7, hours=-4,
+                                       minutes=-5, microseconds=-6))
+
+    def testRightSubtractionFromDatetime(self):
+        self.assertEqual(datetime(2000, 1, 2) - relativedelta(days=1),
+                         datetime(2000, 1, 1))
+
+    def testSubractionWithDatetime(self):
+        self.assertRaises(TypeError, lambda x, y: x - y,
+                          (relativedelta(days=1), datetime(2000, 1, 1)))
 
     def testMultiplication(self):
         self.assertEqual(datetime(2000, 1, 1) + relativedelta(days=1) * 28,
@@ -3925,7 +3949,8 @@
     def testZoneInfoOffsetSignal(self):
         utc = zoneinfo.gettz("UTC")
         nyc = zoneinfo.gettz("America/New_York")
-        self.assertFalse(any([None in [utc, nyc]]))
+        self.assertNotEqual(utc, None)
+        self.assertNotEqual(nyc, None)
         t0 = datetime(2007, 11, 4, 0, 30, tzinfo=nyc)
         t1 = t0.astimezone(utc)
         t2 = t1.astimezone(nyc)