Author: David Spickett Date: 2025-10-31T10:19:10Z New Revision: e5d0b389e5a8bafd4882955a8da255973b3cf3e7
URL: https://github.com/llvm/llvm-project/commit/e5d0b389e5a8bafd4882955a8da255973b3cf3e7 DIFF: https://github.com/llvm/llvm-project/commit/e5d0b389e5a8bafd4882955a8da255973b3cf3e7.diff LOG: [clang][tools][scan-view] Remove Python2 compatibility code in ScanView.py (#163747) All these modules got new names or were moved around in Python 3.0: https://docs.python.org/3/whatsnew/3.0.html#library-changes LLVM requires Python >= 3.8 so we don't need to try Python2 naming. Added: Modified: clang/tools/scan-view/share/ScanView.py Removed: ################################################################################ diff --git a/clang/tools/scan-view/share/ScanView.py b/clang/tools/scan-view/share/ScanView.py index c395b9590e0ee..9c110130315ad 100644 --- a/clang/tools/scan-view/share/ScanView.py +++ b/clang/tools/scan-view/share/ScanView.py @@ -1,35 +1,18 @@ -from __future__ import print_function - -try: - from http.server import HTTPServer, SimpleHTTPRequestHandler -except ImportError: - from BaseHTTPServer import HTTPServer - from SimpleHTTPServer import SimpleHTTPRequestHandler +from http.server import HTTPServer, SimpleHTTPRequestHandler import os import sys - -try: - from urlparse import urlparse - from urllib import unquote -except ImportError: - from urllib.parse import urlparse, unquote - +from urllib.parse import urlparse, unquote import posixpath - -if sys.version_info.major >= 3: - from io import StringIO, BytesIO -else: - from io import BytesIO, BytesIO as StringIO - +from io import StringIO, BytesIO import re import shutil import threading import time import socket import itertools +import configparser import Reporter -import configparser ### # Various patterns matched or replaced by server. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
