PHP 8.2.30
Preview: compat.py Size: 815 B
//opt/cloudlinux/venv/lib/python3.11/site-packages/simplejson/compat.py

"""Python 3 compatibility shims
"""
import sys
if sys.version_info[0] < 3:
    PY3 = False
    def b(s):
        return s
    try:
        from cStringIO import StringIO
    except ImportError:
        from StringIO import StringIO
    BytesIO = StringIO
    text_type = unicode
    binary_type = str
    string_types = (basestring,)
    integer_types = (int, long)
    unichr = unichr
    reload_module = reload
else:
    PY3 = True
    if sys.version_info[:2] >= (3, 4):
        from importlib import reload as reload_module
    else:
        from imp import reload as reload_module
    def b(s):
        return bytes(s, 'latin1')
    from io import StringIO, BytesIO
    text_type = str
    binary_type = bytes
    string_types = (str,)
    integer_types = (int,)
    unichr = chr

long_type = integer_types[-1]

Directory Contents

Dirs: 2 × Files: 10

Name Size Perms Modified Actions
tests DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:10
Edit Download
815 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
14.78 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
28.41 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.74 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
2.88 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
217 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
2.96 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.11 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
59.53 KB lrwxr-xr-x 2026-01-20 13:18:45
Edit Download
22.95 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).