# HG changeset patch # User Jeff Hammel # Date 1589161600 25200 # Node ID d742aff49859971d496817dbe4eb25ffd8886446 # Parent b3a95006584482c226c4c40942b3efe0a0575615 -> python3 diff -r b3a950065844 -r d742aff49859 setup.py --- a/setup.py Sun May 10 18:39:21 2020 -0700 +++ b/setup.py Sun May 10 18:46:40 2020 -0700 @@ -10,7 +10,7 @@ except: description = '' -dependencies = ['webob', 'pyloader'] +dependencies = ['webob', 'pyloader>=0.1.5'] setup(name='wsgintegrate', version=version, diff -r b3a950065844 -r d742aff49859 tox.ini --- a/tox.ini Sun May 10 18:39:21 2020 -0700 +++ b/tox.ini Sun May 10 18:46:40 2020 -0700 @@ -1,7 +1,6 @@ # https://tox.readthedocs.io/en/latest/ - [tox] -envlist=py27 +envlist=py27,py37 [testenv] commands=python setup.py test \ No newline at end of file diff -r b3a950065844 -r d742aff49859 wsgintegrate/dispatcher.py --- a/wsgintegrate/dispatcher.py Sun May 10 18:39:21 2020 -0700 +++ b/wsgintegrate/dispatcher.py Sun May 10 18:46:40 2020 -0700 @@ -22,7 +22,7 @@ except exc.HTTPNotFound: continue except: - print app + print(app) raise else: response = exc.HTTPNotFound() diff -r b3a950065844 -r d742aff49859 wsgintegrate/factory.py --- a/wsgintegrate/factory.py Sun May 10 18:39:21 2020 -0700 +++ b/wsgintegrate/factory.py Sun May 10 18:46:40 2020 -0700 @@ -18,12 +18,12 @@ # reload the .ini file mtime = os.path.getmtime(self.inifile) if mtime > self.mtime: - print "Reloading '%s': %s > %s" % (self.inifile, mtime, self.mtime) + print("Reloading '%s': %s > %s" % (self.inifile, mtime, self.mtime)) try: config = self.read(self.inifile) self.configure(config) - except Exception, e: - print >> sys.stderr, "Error reading '%s': %s" % (self.inifile, e) + except Exception as e: + sys.stderr.write("Error reading '%s': %s\n" % (self.inifile, e)) self.mtime = mtime app = self.load(self.main) diff -r b3a950065844 -r d742aff49859 wsgintegrate/main.py --- a/wsgintegrate/main.py Sun May 10 18:39:21 2020 -0700 +++ b/wsgintegrate/main.py Sun May 10 18:46:40 2020 -0700 @@ -50,20 +50,20 @@ # print configuration, if specified if options.list_apps: for app in sorted(factory.config.keys()): - print app + print(app) return if options.print_json: - print factory.json_config() + print(factory.json_config()) return if options.print_ini: - print factory.ini_config() + print(factory.ini_config()) return # serve it server_name = getattr(options, 'server', 'wsgiref') - print ("Serving with %s" % (server_name)) + print("Serving with %s" % (server_name)) server = servers[server_name] - print ('http://localhost:%d/' % options.port) + print('http://localhost:%d/' % options.port) server(app=factory.load(), port=options.port) if __name__ == '__main__':