diff options
| author | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-11-14 19:31:23 +0100 |
|---|---|---|
| committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-11-14 19:31:40 +0100 |
| commit | bf767fc9826197c5b9b44d3424c9aa0bc0361096 (patch) | |
| tree | 5c01cc5f79da6c8771a18c91ed114c84187f9265 /main/gdb/python-3.8.patch | |
| parent | e4f618c13f70d7c419aaffe7fd9f789a214bb4cb (diff) | |
| download | aports-bf767fc9826197c5b9b44d3424c9aa0bc0361096.tar.bz2 aports-bf767fc9826197c5b9b44d3424c9aa0bc0361096.tar.xz | |
main/gdb: fix compatibility with python 3.8
Diffstat (limited to 'main/gdb/python-3.8.patch')
| -rw-r--r-- | main/gdb/python-3.8.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/gdb/python-3.8.patch b/main/gdb/python-3.8.patch new file mode 100644 index 0000000000..db26f5ef40 --- /dev/null +++ b/main/gdb/python-3.8.patch @@ -0,0 +1,33 @@ +From b6484282f85bf7f11451b2441599c241d302ad9d Mon Sep 17 00:00:00 2001 +From: Raul Tambre <raul@tambre.ee> +Date: Sat, 4 May 2019 15:48:17 -0400 +Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in + python/lib/gdb/command/prompt.py + +The 'is' operator is not meant to be used for comparisons. It currently working +is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning +for this. + +diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py +index 3d662a7..04b9e49 100644 +--- a/gdb/python/lib/gdb/command/prompt.py ++++ b/gdb/python/lib/gdb/command/prompt.py +@@ -45,7 +45,7 @@ The currently defined substitutions are: + self.hook_set = False + + def get_show_string (self, pvalue): +- if self.value is not '': ++ if self.value: + return "The extended prompt is: " + self.value + else: + return "The extended prompt is not set." +@@ -57,7 +57,7 @@ The currently defined substitutions are: + return "" + + def before_prompt_hook(self, current): +- if self.value is not '': ++ if self.value: + return gdb.prompt.substitute_prompt(self.value) + else: + return None + |
