From decd807e9e642816a5a5fba94e75d044759eb8fc Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Thu, 6 Nov 2025 07:13:50 +0100 Subject: remove undeclared dependency on on 'six' Py2+3 shim Hi, "six" is being removed from Debian, https://wiki.debian.org/Python3-six-removal ... quite successfully (look at the graph) https://qa.debian.org/popcon-graph.php?packages=python3-six%20python-six-doc&show_installed=on&want_legend=on&want_ticks=on&date_fmt=%25Y-%25m&beenhere=1 this patch remove the old Py 2 + 3 shim integration otherwise "six" must be brought in back again by "pluma" https://tracker.debian.org/news/1686894/accepted-pluma-1280-2-source-into-unstable/ (this one change should be reverted once this one got in) Greetings --- plugins/snippets/snippets/Snippet.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/snippets/snippets/Snippet.py b/plugins/snippets/snippets/Snippet.py index 765d3f42..5168df59 100644 --- a/plugins/snippets/snippets/Snippet.py +++ b/plugins/snippets/snippets/Snippet.py @@ -17,7 +17,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os -import six from gi.repository import Gio, Gtk from .Placeholder import * @@ -152,7 +151,7 @@ class Snippet: def _insert_text(self, text): # Insert text keeping indentation in mind - indented = (six.u('\n') + self._indent).join(spaces_instead_of_tabs(self._view, text).split('\n')) + indented = ('\n' + self._indent).join(spaces_instead_of_tabs(self._view, text).split('\n')) self._view.get_buffer().insert(self._insert_iter(), indented) def _insert_iter(self): @@ -171,7 +170,7 @@ class Snippet: indent = all_indent[len(self._indent):] # Keep indentation - return (six.u('\n') + indent).join(val.split('\n')) + return ('\n' + indent).join(val.split('\n')) def _create_placeholder(self, data): tabstop = data['tabstop'] @@ -249,7 +248,7 @@ class Snippet: sys.stderr.write('Token class not supported: %s\n' % token.klass) continue - if isinstance(val, six.string_types): + if isinstance(val, str): # Insert text self._insert_text(val) else: -- cgit v1.2.1