Skip to content

Commit e437716

Browse files
author
Richard Jones
committed
python 2.6 compatibility
1 parent 1612218 commit e437716

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Fixed:
5353
committing clenup in the sessions database
5454
- translate titles of "show all" and "unassigned" issue lists
5555
in classic template (sf patch 1424576)
56+
- "as" is a keyword in Python 2.6
57+
- "from __future__" statments need to be first line of file in Python 2.6
58+
5659

5760
2006-04-27 1.1.2
5861
Feature:

roundup/cgi/templating.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import nested_scopes
2+
13
"""Implements the API used in the HTML templating for the web interface.
24
"""
35

@@ -17,7 +19,6 @@
1719

1820
__docformat__ = 'restructuredtext'
1921

20-
from __future__ import nested_scopes
2122

2223
import sys, cgi, urllib, os, re, os.path, time, errno, mimetypes, csv
2324
import calendar, textwrap

roundup/date.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: date.py,v 1.87 2006-05-06 16:43:29 a1s Exp $
18+
# $Id: date.py,v 1.88 2006-09-09 05:50:17 richard Exp $
1919

2020
"""Date, time and time interval handling.
2121
"""
@@ -732,10 +732,10 @@ def __add__(self, other):
732732
elif isinstance(other, Interval):
733733
# add the other Interval to this one
734734
a = self.get_tuple()
735-
as = a[0]
735+
asgn = a[0]
736736
b = other.get_tuple()
737-
bs = b[0]
738-
i = [as*x + bs*y for x,y in zip(a[1:],b[1:])]
737+
bsgn = b[0]
738+
i = [asgn*x + bsgn*y for x,y in zip(a[1:],b[1:])]
739739
i.insert(0, 1)
740740
i = fixTimeOverflow(i)
741741
return Interval(i, translator=self.translator)
@@ -752,10 +752,10 @@ def __sub__(self, other):
752752
elif isinstance(other, Interval):
753753
# add the other Interval to this one
754754
a = self.get_tuple()
755-
as = a[0]
755+
asgn = a[0]
756756
b = other.get_tuple()
757-
bs = b[0]
758-
i = [as*x - bs*y for x,y in zip(a[1:],b[1:])]
757+
bsgn = b[0]
758+
i = [asgn*x - bsgn*y for x,y in zip(a[1:],b[1:])]
759759
i.insert(0, 1)
760760
i = fixTimeOverflow(i)
761761
return Interval(i, translator=self.translator)

roundup/roundupdb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import nested_scopes
12
#
23
# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
34
# This module is free software, and you may redistribute it and/or modify
@@ -15,14 +16,12 @@
1516
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1617
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1718
#
18-
# $Id: roundupdb.py,v 1.124 2006-05-06 17:19:58 a1s Exp $
19+
# $Id: roundupdb.py,v 1.125 2006-09-09 05:50:17 richard Exp $
1920

2021
"""Extending hyperdb with types specific to issue-tracking.
2122
"""
2223
__docformat__ = 'restructuredtext'
2324

24-
from __future__ import nested_scopes
25-
2625
import re, os, smtplib, socket, time, random
2726
import cStringIO, base64, quopri, mimetypes
2827

0 commit comments

Comments
 (0)