From 94aaeb7f87aa3e61ab8bef91fb593ca8c161c5be Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Mon, 21 Oct 2024 09:15:35 -0600 Subject: [PATCH 1/2] fix python 2 compat --- test/stub/wsgi/{cgi.py => cgishim.py} | 0 test/stub/wsgi/passenger_wsgi.py | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename test/stub/wsgi/{cgi.py => cgishim.py} (100%) diff --git a/test/stub/wsgi/cgi.py b/test/stub/wsgi/cgishim.py similarity index 100% rename from test/stub/wsgi/cgi.py rename to test/stub/wsgi/cgishim.py diff --git a/test/stub/wsgi/passenger_wsgi.py b/test/stub/wsgi/passenger_wsgi.py index a4353f1c51..acaddd19bc 100644 --- a/test/stub/wsgi/passenger_wsgi.py +++ b/test/stub/wsgi/passenger_wsgi.py @@ -1,4 +1,9 @@ -import os, sys, time, cgi +import os, sys, time + +if sys.version_info[0] >= 3 and sys.version_info[1] >= 13: + import cgishim +else: + import cgi def file_exist(filename): try: From 080171e6e254972ae32e7724372879713743c6b2 Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Mon, 21 Oct 2024 09:34:27 -0600 Subject: [PATCH 2/2] fix module name --- test/stub/wsgi/passenger_wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/stub/wsgi/passenger_wsgi.py b/test/stub/wsgi/passenger_wsgi.py index acaddd19bc..1886438fd2 100644 --- a/test/stub/wsgi/passenger_wsgi.py +++ b/test/stub/wsgi/passenger_wsgi.py @@ -1,7 +1,7 @@ import os, sys, time if sys.version_info[0] >= 3 and sys.version_info[1] >= 13: - import cgishim + import cgishim as cgi else: import cgi