Commits

jayd3e committed 4ad9161

Fixed all of the print statements

Comments (0)

Files changed (20)

tests/performance_test.py

 #!/usr/bin/env python
+import six
 import webob
 
 def make_middleware(app):
         subprocess.call(['ab', '-n', '1000', 'http://localhost:8080/'])
         if arg == 'open':
             webbrowser.open('http://localhost:8080/__profile__')
-        print 'Hit ^C to end'
+        six.print_('Hit ^C to end')
         try:
             while 1:
                 raw_input()
     else:
         from paste.httpserver import serve
         if os.environ.get('SHOW_OUTPUT') != '0':
-            print 'Note you can also use:'
-            print '  %s %s open' % (sys.executable, __file__)
-            print 'to run ab and open a browser (or "run" to just run ab)'
-            print 'Now do:'
-            print 'ab -n 1000 http://localhost:8080/'
-            print 'wget -O - http://localhost:8080/__profile__'
+            six.print_('Note you can also use:')
+            six.print_('  %s %s open' % (sys.executable, __file__))
+            six.print_('to run ab and open a browser (or "run" to just run ab)')
+            six.print_('Now do:')
+            six.print_('ab -n 1000 http://localhost:8080/')
+            six.print_('wget -O - http://localhost:8080/__profile__')
         serve(make_middleware(simple_app))

tests/test_acceptparse.py

+import six
 from webob import Request
 from webob.acceptparse import Accept, MIMEAccept, NilAccept, NoAccept, accept_property, parse_accept
 from nose.tools import eq_, assert_raises

tests/test_byterange.py

+import six
 from webob.byterange import Range, ContentRange, _is_content_range_valid
 
 from nose.tools import assert_true, assert_false, assert_equal, assert_raises

tests/test_cachecontrol.py

+import six
 from nose.tools import eq_
 from nose.tools import raises
 import unittest

tests/test_cookies.py

 # -*- coding: utf-8 -*-
+import six
 from datetime import timedelta
 from webob import cookies
 from nose.tools import eq_

tests/test_datetime_utils.py

 # -*- coding: utf-8 -*-
 
+import six
 import datetime
 import calendar
 from rfc822 import formatdate
+import six
 import unittest
 from webob import Request
 from webob import Response

tests/test_descriptors.py

 # -*- coding: utf-8 -*-
 
+import six
+
 from datetime import tzinfo
 from datetime import timedelta
 
+import six
 import unittest
 
 class etag_propertyTests(unittest.TestCase):
+import six
 from webob.request import Request
 from webob.dec import wsgify
 from webob.exc import sys

tests/test_headers.py

 # -*- coding: utf-8 -*-
+import six
 from webob import headers
 from nose.tools import ok_, assert_raises, eq_
 

tests/test_in_wsgiref.py

+import six
 from webob import Request, Response
 import sys, logging, threading, random, urllib2
 
+import six
 import cgi, sys
 from cStringIO import StringIO
 from webob import html_escape, Response

tests/test_multidict.py

 # -*- coding: utf-8 -*-
 
+import six
 import unittest
 from webob import multidict
 

tests/test_request.py

+import six
 import unittest, warnings
 from webob import Request, BaseRequest, UTC
 

tests/test_request_nose.py

+import six
 from webob import Request
 
 

tests/test_response.py

+import six
 import sys
 import zlib
 if sys.version >= '2.7':

webob/datetime_utils.py

+import six
 import time
 import calendar
 from datetime import datetime, date, timedelta, tzinfo
 from email.utils import parsedate_tz, mktime_tz, formatdate
 
+if six.PY3:
+    long = int
+
 __all__ = [
     'UTC', 'timedelta_to_seconds',
     'year', 'month', 'week', 'day', 'hour', 'minute', 'second',
 Also If-Range parsing
 """
 
+import six
 from webob.datetime_utils import *
 from webob.util import rfc_reference
 
+import six
+
 def rfc_reference(header, section):
     if not section:
         return ''