summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dent <cdent@anticdent.org>2023-04-30 12:05:35 +0100
committerChris Dent <cdent@anticdent.org>2023-04-30 12:05:35 +0100
commit81de36a1b598273018955baa855debf4a623befc (patch)
tree3ca06376f33ca2c93579c27316e1c3aec79e798f
parent02abe887d52254867fd4f287e7f361dd6c832100 (diff)
downloadpaste-git-81de36a1b598273018955baa855debf4a623befc.tar.gz
quiet deprecations in in form.cgi
-rwxr-xr-xtests/cgiapp_data/form.cgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/cgiapp_data/form.cgi b/tests/cgiapp_data/form.cgi
index ac513b1..5ad8f68 100755
--- a/tests/cgiapp_data/form.cgi
+++ b/tests/cgiapp_data/form.cgi
@@ -2,9 +2,16 @@
from __future__ import print_function
-import cgi
import sys
+# Quiet warnings in this CGI so that it does not upset tests.
+if not sys.warnoptions:
+ import warnings
+ warnings.simplefilter("ignore")
+
+# TODO: cgi is deprecated and will go away in Python 3.13.
+import cgi
+
print('Content-type: text/plain')
print('')