mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-16 07:10:04 +01:00
Remove Python 2 support
gdb got rid of Python 2 support
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user