From 8eab4299c93014613dbadfee6770535b99d48746 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 6 Aug 2025 17:58:10 +0100 Subject: Remove python2 support (first party) --- klippy/util.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'klippy/util.py') diff --git a/klippy/util.py b/klippy/util.py index 43a2becc..b43a7f1c 100644 --- a/klippy/util.py +++ b/klippy/util.py @@ -3,7 +3,7 @@ # Copyright (C) 2016-2020 Kevin O'Connor # # This file may be distributed under the terms of the GNU GPLv3 license. -import sys, os, pty, fcntl, termios, signal, logging, json, time +import os, pty, fcntl, termios, signal, logging, json, time import subprocess, traceback, shlex @@ -99,26 +99,6 @@ def dump_mcu_build(): dump_file_stats(build_dir, "out/klipper.elf") -###################################################################### -# Python2 wrapper hacks -###################################################################### - - -def setup_python2_wrappers(): - if sys.version_info.major >= 3: - return - # Add module hacks so that common Python3 module imports work in Python2 - import ConfigParser, Queue, io, StringIO, time - - sys.modules["configparser"] = ConfigParser - sys.modules["queue"] = Queue - io.StringIO = StringIO.StringIO - time.process_time = time.clock - - -setup_python2_wrappers() - - ###################################################################### # General system and software information ###################################################################### -- cgit v1.2.3-70-g09d2