Remove Python 2 support

gdb got rid of Python 2 support
This commit is contained in:
Tom Tromey
2023-11-22 20:48:58 -07:00
parent b21838a4ea
commit 37f050380b
2 changed files with 5 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2012, 2013, 2015 Tom Tromey <tom@tromey.com>
# Copyright (C) 2012, 2013, 2015, 2023 Tom Tromey <tom@tromey.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,12 +15,7 @@
import gdb
import threading
try:
import queue
except ImportError:
# Python 2.
import Queue
queue = Queue
import queue
import os
import os.path
import gui
@@ -42,8 +37,7 @@ _event_queue = queue.Queue()
def send_to_gtk(func):
_event_queue.put(func)
# The payload is arbitrary, and bytes(1) is chosen to work on both
# Python 2 and Python 3.
# The payload is arbitrary.
os.write(write_pipe, bytes(1))
class _GtkThread(threading.Thread):

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2015 Tom Tromey <tom@tromey.com>
# Copyright (C) 2015, 2023 Tom Tromey <tom@tromey.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,7 @@
from gi.repository import GLib
import os
import errno
try:
import configparser
except ImportError:
# Python 2.
import ConfigParser
configparser = ConfigParser
import configparser
import atexit
class StorageManager: