diff --git a/_service b/_service
index 4915450..a1e49f1 100644
--- a/_service
+++ b/_service
@@ -2,12 +2,14 @@
git
https://github.com/open-iscsi/configshell-fb.git
-
+ yes
python-configshell-fb
- @PARENT_TAG@
+ master
+ master
+ 2.0.0-@TAG_OFFSET@.%h
v(\d*\.\d*\.)(\d*)
\1\2
- v1.1.30
+ v2.0.0*
*configshell-fb*.tar
diff --git a/no-six.patch b/no-six.patch
deleted file mode 100644
index 7161e19..0000000
--- a/no-six.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-Index: python-configshell-fb-1.1.30/configshell/console.py
-===================================================================
---- python-configshell-fb-1.1.30.orig/configshell/console.py
-+++ python-configshell-fb-1.1.30/configshell/console.py
-@@ -17,7 +17,6 @@ under the License.
-
- from fcntl import ioctl
- import re
--import six
- import struct
- import sys
- from termios import TIOCGWINSZ, TCSADRAIN, tcsetattr, tcgetattr
-Index: python-configshell-fb-1.1.30/configshell/node.py
-===================================================================
---- python-configshell-fb-1.1.30.orig/configshell/node.py
-+++ python-configshell-fb-1.1.30/configshell/node.py
-@@ -17,7 +17,6 @@ under the License.
-
- import inspect
- import re
--import six
-
- class ExecutionError(Exception):
- pass
-@@ -503,7 +502,7 @@ class ConfigNode(object):
- elif group not in self.list_config_groups():
- raise ExecutionError("Unknown configuration group: %s" % group)
-
-- for param, value in six.iteritems(parameter):
-+ for param, value in parameter.items():
- if param not in self.list_group_params(group):
- raise ExecutionError("Unknown parameter %s in group '%s'."
- % (param, group))
-@@ -1256,7 +1255,7 @@ class ConfigNode(object):
- bookmarks += "No bookmarks yet.\n"
- else:
- for (bookmark, path) \
-- in six.iteritems(self.shell.prefs['bookmarks']):
-+ in self.shell.prefs['bookmarks'].items():
- if len(bookmark) == 1:
- bookmark += '\0'
- underline = ''.ljust(len(bookmark), '-')
-@@ -1703,7 +1702,7 @@ class ConfigNode(object):
- return []
- else:
- params = []
-- for p_name, p_def in six.iteritems(self._configuration_groups[group]):
-+ for p_name, p_def in self._configuration_groups[group].items():
- (p_type, p_description, p_writable) = p_def
- if writable is not None and p_writable != writable:
- continue
-Index: python-configshell-fb-1.1.30/configshell/prefs.py
-===================================================================
---- python-configshell-fb-1.1.30.orig/configshell/prefs.py
-+++ python-configshell-fb-1.1.30/configshell/prefs.py
-@@ -16,8 +16,8 @@ under the License.
- '''
-
- import os
--import six
- import fcntl
-+import pickle
-
- class Prefs(object):
- '''
-@@ -116,7 +116,7 @@ class Prefs(object):
- @return: Iterates on the items in preferences.
- @rtype: yields items that are (key, value) pairs
- '''
-- return six.iteritems(self._prefs)
-+ return self._prefs.items()
-
- def save(self, filename=None):
- '''
-@@ -132,7 +132,7 @@ class Prefs(object):
- fsock = open(filename, 'wb')
- fcntl.lockf(fsock, fcntl.LOCK_UN)
- try:
-- six.moves.cPickle.dump(self._prefs, fsock, 2)
-+ pickle.dump(self._prefs, fsock, 2)
- finally:
- fsock.close()
-
-@@ -148,6 +148,6 @@ class Prefs(object):
- fsock = open(filename, 'rb')
- fcntl.lockf(fsock, fcntl.LOCK_SH)
- try:
-- self._prefs = six.moves.cPickle.load(fsock)
-+ self._prefs = pickle.load(fsock)
- finally:
- fsock.close()
-Index: python-configshell-fb-1.1.30/configshell/shell.py
-===================================================================
---- python-configshell-fb-1.1.30.orig/configshell/shell.py
-+++ python-configshell-fb-1.1.30/configshell/shell.py
-@@ -16,7 +16,6 @@ under the License.
- '''
-
- import os
--import six
- import sys
- from pyparsing import (alphanums, Empty, Group, locatedExpr,
- OneOrMore, Optional, ParseResults, Regex,
-@@ -173,7 +172,7 @@ class ConfigShell(object):
- self.log.warning("Could not load preferences file %s."
- % self._prefs_file)
-
-- for pref, value in six.iteritems(self.default_prefs):
-+ for pref, value in self.default_prefs.items():
- if pref not in self.prefs:
- self.prefs[pref] = value
-
-@@ -239,7 +238,7 @@ class ConfigShell(object):
- else:
- nr_cols = 1
-
-- for i in six.moves.range(0, len(matches), nr_cols):
-+ for i in range(0, len(matches), nr_cols):
- self.con.raw_write(''.join(matches[i:i+nr_cols]))
- self.con.raw_write('\n')
-
-@@ -402,7 +401,7 @@ class ConfigShell(object):
- for index in range(len(pparams)):
- if index < len(cmd_params):
- current_parameters[cmd_params[index]] = pparams[index]
-- for key, value in six.iteritems(kparams):
-+ for key, value in kparams.items():
- current_parameters[key] = value
- self._completion_help_topic = command
- completion_method = target.get_completion_method(command)
-@@ -550,7 +549,7 @@ class ConfigShell(object):
- current_parameters = {}
- for index in range(len(pparams)):
- current_parameters[cmd_params[index]] = pparams[index]
-- for key, value in six.iteritems(kparams):
-+ for key, value in kparams.items():
- current_parameters[key] = value
- completion_method = target.get_completion_method(command)
- if completion_method:
-@@ -722,7 +721,7 @@ class ConfigShell(object):
- try:
- readline.parse_and_bind("tab: complete")
- readline.set_completer(self._complete)
-- cmdline = six.moves.input(self._get_prompt()).strip()
-+ cmdline = input(self._get_prompt()).strip()
- except EOFError:
- self.con.raw_write('exit\n')
- cmdline = "exit"
-Index: python-configshell-fb-1.1.30/setup.py
-===================================================================
---- python-configshell-fb-1.1.30.orig/setup.py
-+++ python-configshell-fb-1.1.30/setup.py
-@@ -43,7 +43,6 @@ setup(
- packages = ['configshell', 'configshell_fb'],
- install_requires = [
- 'pyparsing >=2.0.2',
-- 'six',
- 'urwid',
- ],
- classifiers = [
diff --git a/python-configshell-fb-1.1.30.tar.xz b/python-configshell-fb-1.1.30.tar.xz
deleted file mode 100644
index 245f15f..0000000
--- a/python-configshell-fb-1.1.30.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3f38784e622350115d8dac931eada2158894fff0b7b146aa96052e6202827a11
-size 28652
diff --git a/python-configshell-fb-2.0.0-5.7088593241b4.tar.xz b/python-configshell-fb-2.0.0-5.7088593241b4.tar.xz
new file mode 100644
index 0000000..426f741
--- /dev/null
+++ b/python-configshell-fb-2.0.0-5.7088593241b4.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:db289fffb3633725ba24e43bebd7f65ee7f63023856b0beb0cd761bd10763152
+size 361716
diff --git a/python-configshell-fb.changes b/python-configshell-fb.changes
index 62fa26c..bc71a0e 100644
--- a/python-configshell-fb.changes
+++ b/python-configshell-fb.changes
@@ -1,3 +1,29 @@
+-------------------------------------------------------------------
+Mon Mar 24 15:43:17 UTC 2025 - Lee Duncan
+
+- Upgrade to current latest upstream, which is a few
+ commits past v2.0.0:
+ * Update pre-commit hooks, ruff rules
+ * Improve backwards configshell-fb compatibility
+ * Fix: log truncated
+ * v2.0.0
+ * Add pypi publish and pre-commit workflows
+ * Add backwards compatibility with _fb module name
+ * Explicitly declare wheel build target dir
+ * Adding -fb suffix to module name
+ * Remove urwid dependency
+ * Adding pre-commit config
+ * Use f-strings
+ * Use Pathlib
+ * Refactoring to Python>=3.9, adding ruff rules
+ * Move to PEP-621; Use configshell module name
+ * six is unneeded, get rid of it
+ * Fix help messages without a trailing newline
+ * Remove usage of six
+
+ Note that the last item means we can do away with the patch:
+ * no-six.patch (removed)
+
-------------------------------------------------------------------
Tue Apr 16 12:25:42 UTC 2024 - Markéta Machová
diff --git a/python-configshell-fb.spec b/python-configshell-fb.spec
index 6bd756d..b2029e7 100644
--- a/python-configshell-fb.spec
+++ b/python-configshell-fb.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-configshell-fb
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,20 +17,24 @@
%{?sle15_python_module_pythons}
+
+%define configshell_service_tag 5.7088593241b4
+
Name: python-configshell-fb
-Version: 1.1.30
+Version: 2.0.0
Release: 0%{?dist}
Summary: A Python library for building configuration shells
License: Apache-2.0
Group: Development/Libraries/Python
URL: https://github.com/open-iscsi/configshell-fb
-Source: %{name}-%{version}.tar.xz
-#PATCH-FIX-UPSTREAM https://github.com/open-iscsi/configshell-fb/pull/74 six is unneeded
-Patch: no-six.patch
+Source: %{name}-%{version}-%{configshell_service_tag}.tar.xz
+BuildRequires: %{python_module hatch_vcs}
+BuildRequires: %{python_module hatchling}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyparsing}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{pythons}
-BuildRequires: fdupes
+BuildRequires: %{python_module wheel}
+BuildRequires: git
BuildRequires: python-rpm-macros
Requires: %{_bindir}/env
Requires: python-pyparsing
@@ -65,19 +69,18 @@ rtslib, and configshell, or stick with all non-fb versions, since they are
no longer strictly compatible.
%prep
-%autosetup -p1 -n %{name}-%{version}
+%autosetup -p1 -n %{name}-%{version}-%{configshell_service_tag}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install --skip-build
-%fdupes %{buildroot}
+%pyproject_install
%files %{python_files}
-%{python_sitelib}/configshell
-%{python_sitelib}/configshell_fb
-%{python_sitelib}/configshell_fb-%{version}*info
+%license COPYING
%doc README.md
+%{python_sitelib}/configshell*
+%pycache_only %{python_sitelib}/__pycache__
%changelog