Compare commits

..

16 commits

Author SHA1 Message Date
Brian C. Lane
c325dd3440 - rhsm: Add Flatpak registry option for RHEL10 (bciconel)
- commands: bootc: remove 'experimental' warning (k.koukiou)
2025-12-02 10:17:46 -08:00
Python Maint
c7e2413c81 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:39:22 +02:00
Brian C. Lane
fd0acbd83a - spec: Add python3-pytest to BuildRequires (bcl)
- tests: Use pytest module instead of unittest (bcl)
- workflows: Use py3.14 rc.1 (bcl)
- Add Fedora 44 support (bcl)
- spec: drop python3-build dependency (yselkowi)
2025-08-18 09:26:39 -07:00
Python Maint
29b32f1468 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:08:44 +02:00
Fedora Release Engineering
b52e5c7a4c Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 06:21:38 +00:00
Brian C. Lane
133e7c6a58 - Drop python3-build, it is not needed to install the package 2025-07-22 16:16:08 -07:00
Brian C. Lane
64bcfab34f - workflows: Use py3.14 beta.4 (bcl)
- pylint: Ignore files in .git (bcl)
- pyproject: Bump setuptools to 77 or later (bcl)
- Makefile: Stop running setup.py directly (bcl)
2025-07-15 11:59:51 -07:00
Brian C. Lane
46e508d728 - workflows: Add python 3.14 to the test matrix (bcl)
- Add support for RDP (jkonecny)
- Deprecate VNC (jkonecny)
- docs: Fix chapter numbering after adding certificate (bcl)
2025-06-16 11:57:06 -07:00
Python Maint
c558b3697f Rebuilt for Python 3.14 2025-06-03 11:02:10 +02:00
Brian C. Lane
423c9f4fb5 - workflow: Add python 3.13 testing (bcl)
- tests: Remove unused import of constants (bcl)
- realm: Clean up documentation (bcl)
- Add support for new bootc kickstart command (ppolawsk)
- Update documentation for clearpart --initlabel option. (rvykydal)
- Update the %certificate section documentation (rvykydal)
2025-04-25 10:54:54 -07:00
Brian C. Lane
5d8a1dda00 - Do not remove "md" prefix from RAID names (vtrefny)
- Add Fedora 43 support (bcl)
- workflows: Switch to ubuntu-latest (bcl)
- Update formatting of certificate section documentation (rvykydal)
- Update %certificate documentation with not about bundles (rvykydal)
- Fix formatting of %certificate documentation example (rvykydal)
- Update %certificate section documentation (rvykydal)
2025-02-24 13:27:00 -08:00
Brian C. Lane
cdc1bcb504 - Make %certificate section option --dir mandatory. (rvykydal)
Resolves: rhbz#2342762
2025-01-29 13:43:23 -08:00
Fedora Release Engineering
741be6bf10 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 11:14:50 +00:00
Brian C. Lane
3ad5529cda - runpylint: Log astroid version (bcl)
- tests: Limit the python versions used in testing (bcl)
- Add support for inline certificates with `%certificate` section (k.koukiou)
2025-01-09 13:56:34 -08:00
Brian C. Lane
5c0091fa77 - module: Remove unused warnings import (bcl)
- tox: Add py313 to tox and 3.12.7 to workflow (bcl)
- Fix the fix for _parse_optional changing (awilliam)
2024-10-03 12:04:12 -07:00
Brian C. Lane
9dfc6b1d33 - options: adjust to behavior change in upstream _parse_optional (awilliam)
- Add Fedora 42 support (jkonecny)
2024-10-02 14:01:18 -07:00
5 changed files with 100 additions and 107 deletions

20
.gitignore vendored
View file

@ -270,3 +270,23 @@ pykickstart-1.78.tar.gz
/pykickstart-3.57.tar.gz.asc
/pykickstart-3.58.tar.gz
/pykickstart-3.58.tar.gz.asc
/pykickstart-3.59.tar.gz
/pykickstart-3.59.tar.gz.asc
/pykickstart-3.60.tar.gz
/pykickstart-3.60.tar.gz.asc
/pykickstart-3.61.tar.gz
/pykickstart-3.61.tar.gz.asc
/pykickstart-3.62.tar.gz
/pykickstart-3.62.tar.gz.asc
/pykickstart-3.63.tar.gz
/pykickstart-3.63.tar.gz.asc
/pykickstart-3.64.tar.gz
/pykickstart-3.64.tar.gz.asc
/pykickstart-3.65.tar.gz
/pykickstart-3.65.tar.gz.asc
/pykickstart-3.66.tar.gz
/pykickstart-3.66.tar.gz.asc
/pykickstart-3.67.tar.gz
/pykickstart-3.67.tar.gz.asc
/pykickstart-3.68.tar.gz
/pykickstart-3.68.tar.gz.asc

View file

@ -1,28 +0,0 @@
From faf6a88a1be4558ebd26f5d52c0990f5dd3ca592 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 2 Oct 2024 17:54:33 -0700
Subject: [PATCH] Fix the fix for _parse_optional changing
Whoops. Don't know how this slipped through testing.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pykickstart/options.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pykickstart/options.py b/pykickstart/options.py
index ca0e18af..f0803039 100644
--- a/pykickstart/options.py
+++ b/pykickstart/options.py
@@ -185,7 +185,7 @@ class KSOptionParser(ArgumentParser):
# deprecated. we can only safely do this if there's exactly
# one matching action
if isinstance(option_tuple_or_tuples, list):
- if len(option_tuple_or_tuples == 1):
+ if len(option_tuple_or_tuples) == 1:
option_tuple = option_tuple_or_tuples[0]
else:
return option_tuple_or_tuples
--
2.46.2

View file

@ -1,67 +0,0 @@
From f753d4d6ad1f4846d14735beb3d1b157b9914b51 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 2 Oct 2024 09:48:39 -0700
Subject: [PATCH] options: adjust to behavior change in upstream
_parse_optional
In Python 3.13 and 3.12.7, the behavior of _parse_optional has
changed. It used to raise an error on multiple matching actions
itself, and only ever return None or an option tuple. Now the
"raise error on multiple matching actions" code was moved out
into consume_optional, and _parse_optional returns either None
or a *list* of option tuples, which contains more than one if
multiple actions match. See:
https://github.com/python/cpython/pull/124631
https://github.com/python/cpython/issues/58573
This adapts to the change in a way that should work on both older
and newer Pythons.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pykickstart/options.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/pykickstart/options.py b/pykickstart/options.py
index 2e3a0721..ca0e18af 100644
--- a/pykickstart/options.py
+++ b/pykickstart/options.py
@@ -177,9 +177,23 @@ class KSOptionParser(ArgumentParser):
self.lineno = None
def _parse_optional(self, arg_string):
- option_tuple = ArgumentParser._parse_optional(self, arg_string)
+ # Before 3.13 and 3.12.7, this returned None or a single
+ # option tuple. From 3.13 / 3.12.7 onwards it returns None
+ # or a *list* of option tuples
+ option_tuple_or_tuples = ArgumentParser._parse_optional(self, arg_string)
+ # all we want to do here is a custom warning if the action is
+ # deprecated. we can only safely do this if there's exactly
+ # one matching action
+ if isinstance(option_tuple_or_tuples, list):
+ if len(option_tuple_or_tuples == 1):
+ option_tuple = option_tuple_or_tuples[0]
+ else:
+ return option_tuple_or_tuples
+ else:
+ option_tuple = option_tuple_or_tuples
+
if option_tuple is None or option_tuple[0] is None:
- return option_tuple
+ return option_tuple_or_tuples
action = option_tuple[0]
option = action.option_strings[0]
@@ -191,7 +205,7 @@ class KSOptionParser(ArgumentParser):
"kickstart. Please modify your kickstart file to remove this option.")
% {"lineno": self.lineno, "option": option}, KickstartDeprecationWarning)
- return option_tuple
+ return option_tuple_or_tuples
def add_argument(self, *args, **kwargs):
if "introduced" in kwargs:
--
2.46.2

View file

@ -4,8 +4,8 @@
%bcond_with signed
Name: pykickstart
Version: 3.58
Release: 3%{?dist}
Version: 3.68
Release: 1%{?dist}
License: GPL-2.0-only
Summary: Python utilities for manipulating kickstart files.
Url: http://fedoraproject.org/wiki/pykickstart
@ -14,17 +14,15 @@ Source0: https://github.com/pykickstart/%{name}/releases/download/r%{version}/
Source1: https://github.com/pykickstart/%{name}/releases/download/r%{version}/%{name}-%{version}.tar.gz.asc
%endif
# Fix for python 3.12.7 and 3.13
Patch0001: 0001-options-adjust-to-behavior-change-in-upstream-_parse.patch
Patch0002: 0001-Fix-the-fix-for-_parse_optional-changing.patch
BuildArch: noarch
BuildRequires: gettext
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-requests
BuildRequires: python3-setuptools
BuildRequires: make
BuildRequires: python3-pytest
# Only required when building with runtests
%if %{with runtests}
@ -45,7 +43,7 @@ Python 3 library for manipulating kickstart files. The binaries are found in
the pykickstart package.
%prep
%autosetup -p1
%setup -q
%build
make PYTHON=%{__python3}
@ -76,14 +74,84 @@ LC_ALL=C make PYTHON=%{__python3} test-no-coverage
%doc docs/programmers-guide
%doc docs/kickstart-docs.txt
%{python3_sitelib}/pykickstart
%{python3_sitelib}/pykickstart*.egg-info
%{python3_sitelib}/pykickstart-%{version}.dist-info
%changelog
* Wed Oct 02 2024 Adam Williamson <awilliam@redhat.com> - 3.58-3
* Tue Dec 02 2025 Brian C. Lane <bcl@redhat.com> - 3.68-1
- rhsm: Add Flatpak registry option for RHEL10 (bciconel)
- commands: bootc: remove 'experimental' warning (k.koukiou)
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 3.67-2
- Rebuilt for Python 3.14.0rc3 bytecode
* Mon Aug 18 2025 Brian C. Lane <bcl@redhat.com> - 3.67-1
- spec: Add python3-pytest to BuildRequires (bcl)
- tests: Use pytest module instead of unittest (bcl)
- workflows: Use py3.14 rc.1 (bcl)
- Add Fedora 44 support (bcl)
- spec: drop python3-build dependency (yselkowi)
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 3.66-4
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.66-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jul 22 2025 Brian C. Lane <bcl@redhat.com> - 3.66-2
- Drop python3-build, it is not needed to install the package
* Tue Jul 15 2025 Brian C. Lane <bcl@redhat.com> - 3.66-1
- workflows: Use py3.14 beta.4 (bcl)
- pylint: Ignore files in .git (bcl)
- pyproject: Bump setuptools to 77 or later (bcl)
- Makefile: Stop running setup.py directly (bcl)
* Mon Jun 16 2025 Brian C. Lane <bcl@redhat.com> - 3.65-1
- workflows: Add python 3.14 to the test matrix (bcl)
- Add support for RDP (jkonecny)
- Deprecate VNC (jkonecny)
- docs: Fix chapter numbering after adding certificate (bcl)
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 3.64-2
- Rebuilt for Python 3.14
* Fri Apr 25 2025 Brian C. Lane <bcl@redhat.com> - 3.64-1
- workflow: Add python 3.13 testing (bcl)
- tests: Remove unused import of constants (bcl)
- realm: Clean up documentation (bcl)
- Add support for new bootc kickstart command (ppolawsk)
- Update documentation for clearpart --initlabel option. (rvykydal)
- Update the %certificate section documentation (rvykydal)
* Mon Feb 24 2025 Brian C. Lane <bcl@redhat.com> - 3.63-1
- Do not remove "md" prefix from RAID names (vtrefny)
- Add Fedora 43 support (bcl)
- workflows: Switch to ubuntu-latest (bcl)
- Update formatting of certificate section documentation (rvykydal)
- Update %certificate documentation with not about bundles (rvykydal)
- Fix formatting of %certificate documentation example (rvykydal)
- Update %certificate section documentation (rvykydal)
* Wed Jan 29 2025 Brian C. Lane <bcl@redhat.com> - 3.62-1
- Make %%certificate section option --dir mandatory. (rvykydal)
Resolves: rhbz#2342762
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.61-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jan 09 2025 Brian C. Lane <bcl@redhat.com> - 3.61-1
- runpylint: Log astroid version (bcl)
- tests: Limit the python versions used in testing (bcl)
- Add support for inline certificates with `%certificate` section (k.koukiou)
* Thu Oct 03 2024 Brian C. Lane <bcl@redhat.com> - 3.60-1
- module: Remove unused warnings import (bcl)
- tox: Add py313 to tox and 3.12.7 to workflow (bcl)
- Fix the fix for _parse_optional changing (awilliam)
* Wed Oct 02 2024 Brian C. Lane <bcl@redhat.com> - 3.58-2
* Wed Oct 02 2024 Brian C. Lane <bcl@redhat.com> - 3.59-1
- options: adjust to behavior change in upstream _parse_optional (awilliam)
- Add Fedora 42 support (jkonecny)
* Mon Aug 19 2024 Brian C. Lane <bcl@redhat.com> - 3.58-1
- DeprecatedCommand: Return empty list for dataList (bcl)

View file

@ -1,2 +1,2 @@
SHA512 (pykickstart-3.58.tar.gz) = e52d77c9cac3958eaa2d6cf238f885f2ca5ca9e0a1cf8d5a990adbf07d45c9abb789c08713a7e68f4256af8b2f2feb4bd76240bd8dce9080d518e7cd4051f26f
SHA512 (pykickstart-3.58.tar.gz.asc) = 3ed3f4aa962e88b4c52651c6da12e039b3eaaa951dfc05db656088176f3a630cb0bf07fdeed76d9ee4509be1ad243027c805ad7fa979704b1219a549c47df3da
SHA512 (pykickstart-3.68.tar.gz) = 103034f2ad47afa470066b4c98092ac634c5c5ed21c1c98a65170c78cc86e95f5565bb4c29a24a890836e45d2094b529fcdb02f8a004875cc13db505bd2ba51e
SHA512 (pykickstart-3.68.tar.gz.asc) = 33d2e3ea50bdffdb7bc4939b68c3069d6fce6087cd186ac57773981928a090608f7509fd8f63bacbbd6544d828da3eb1e1fb785f5ff7e547364c9cd360eaf106