view roundup/anypy/cgi_.py @ 8500:b03160d46e9d

bug: don't reference vendored outside of anypy modules client.py was referencing the vendored.cgi module. This is wrong. It should pull the vendored.cgi module only via anypy.cgi_.
author John Rouillard <rouilj@ieee.org>
date Sun, 21 Dec 2025 23:59:08 -0500
parents 7c49a4267705
children
line wrap: on
line source

# ruff: noqa: F401  - unused imports
import warnings
try:
    # used for python2 and python 3 < 3.13
    with warnings.catch_warnings():
        warnings.filterwarnings('ignore', category=DeprecationWarning)
        import cgi
    from cgi import FieldStorage, MiniFieldStorage
except ImportError:
    # use for python3 >= 3.13
    from roundup.anypy.vendored import cgi
    from roundup.anypy.vendored.cgi import FieldStorage, MiniFieldStorage

Roundup Issue Tracker: http://roundup-tracker.org/