import python-iniparse-0.5-9.el10

i10cs changed/i10cs/python-iniparse-0.5-9.el10
MSVSphere Packaging Team 4 months ago
commit 1b737fb732
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/python-iniparse-0.5.tar.gz

@ -0,0 +1 @@
28dea3508ca5d08b9f9a5e018bf9000414b1e67b SOURCES/python-iniparse-0.5.tar.gz

@ -0,0 +1,29 @@
From 033c0aa3e1a51cb70a97762252059e70cc2f671c Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
Date: Wed, 20 Dec 2023 12:40:14 +0100
Subject: [PATCH] Fix tests with python 3.11.7
---
Backported to 0.5 (s/six/io/ below)
tests/test_compat.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/test_compat.py b/tests/test_compat.py
index 8d7c785..86d0524 100644
--- a/tests/test_compat.py
+++ b/tests/test_compat.py
@@ -1,3 +1,4 @@
+import os
from iniparse import compat as ConfigParser
from six import StringIO
try:
@@ -263,6 +264,8 @@ class mystr(str):
def test_read_returns_file_list(self):
file1 = test_support.findfile("cfgparser.1")
+ if not os.path.exists(file1):
+ file1 = test_support.findfile("configdata/cfgparser.1")
# check when we pass a mix of readable and non-readable files:
cf = self.newconfig()
parsed_files = cf.read([file1, "nonexistant-file"])

@ -0,0 +1,96 @@
From d9a083bafaa2df338a3176ee9f1433718b3a1090 Mon Sep 17 00:00:00 2001
From: Jiri Hnidek <jhnidek@redhat.com>
Date: Wed, 11 May 2022 14:29:27 +0200
Subject: [PATCH 06/13] Fix compatibility issues with Python 3.11
* Fixes: https://github.com/candlepin/python-iniparse/issues/23
* BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2019017
* Replaced few deprecated methods with new methods
---
tests/test_compat.py | 20 ++++++++++----------
tests/test_fuzz.py | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/test_compat.py b/tests/test_compat.py
index ad36683..c8e6aca 100644
--- a/tests/test_compat.py
+++ b/tests/test_compat.py
@@ -96,16 +96,16 @@ class TestCaseBase(unittest.TestCase):
eq(cf.get('Spaces', 'key with spaces'), 'value')
eq(cf.get('Spaces', 'another with spaces'), 'splat!')
- self.failIf('__name__' in cf.options("Foo Bar"),
+ self.assertFalse('__name__' in cf.options("Foo Bar"),
'__name__ "option" should not be exposed by the API!')
# Make sure the right things happen for remove_option();
# added to include check for SourceForge bug #123324:
- self.failUnless(cf.remove_option('Foo Bar', 'foo'),
+ self.assertTrue(cf.remove_option('Foo Bar', 'foo'),
"remove_option() failed to report existance of option")
- self.failIf(cf.has_option('Foo Bar', 'foo'),
+ self.assertFalse(cf.has_option('Foo Bar', 'foo'),
"remove_option() failed to remove option")
- self.failIf(cf.remove_option('Foo Bar', 'foo'),
+ self.assertFalse(cf.remove_option('Foo Bar', 'foo'),
"remove_option() failed to report non-existance of option"
" that was removed")
@@ -127,10 +127,10 @@ class TestCaseBase(unittest.TestCase):
eq(cf.options("a"), ["b"])
eq(cf.get("a", "b"), "value",
"could not locate option, expecting case-insensitive option names")
- self.failUnless(cf.has_option("a", "b"))
+ self.assertTrue(cf.has_option("a", "b"))
cf.set("A", "A-B", "A-B value")
for opt in ("a-b", "A-b", "a-B", "A-B"):
- self.failUnless(
+ self.assertTrue(
cf.has_option("A", opt),
"has_option() returned false for option which should exist")
eq(cf.options("A"), ["a-b"])
@@ -147,7 +147,7 @@ class TestCaseBase(unittest.TestCase):
# SF bug #561822:
cf = self.fromstring("[section]\nnekey=nevalue\n",
defaults={"key":"value"})
- self.failUnless(cf.has_option("section", "Key"))
+ self.assertTrue(cf.has_option("section", "Key"))
def test_default_case_sensitivity(self):
cf = self.newconfig({"foo": "Bar"})
@@ -182,7 +182,7 @@ class TestCaseBase(unittest.TestCase):
cf = self.newconfig()
self.assertEqual(cf.sections(), [],
"new ConfigParser should have no defined sections")
- self.failIf(cf.has_section("Foo"),
+ self.assertFalse(cf.has_section("Foo"),
"new ConfigParser should have no acknowledged sections")
self.assertRaises(ConfigParser.NoSectionError,
cf.options, "Foo")
@@ -221,8 +221,8 @@ class TestCaseBase(unittest.TestCase):
"E5=FALSE AND MORE"
)
for x in range(1, 5):
- self.failUnless(cf.getboolean('BOOLTEST', 't%d' % x))
- self.failIf(cf.getboolean('BOOLTEST', 'f%d' % x))
+ self.assertTrue(cf.getboolean('BOOLTEST', 't%d' % x))
+ self.assertFalse(cf.getboolean('BOOLTEST', 'f%d' % x))
self.assertRaises(ValueError,
cf.getboolean, 'BOOLTEST', 'e%d' % x)
diff --git a/tests/test_fuzz.py b/tests/test_fuzz.py
index df568bb..874ef2e 100644
--- a/tests/test_fuzz.py
+++ b/tests/test_fuzz.py
@@ -102,7 +102,7 @@ class TestFuzz(unittest.TestCase):
cc = compat.RawConfigParser()
cc.readfp(StringIO(s))
cc_py = configparser.RawConfigParser()
- cc_py.readfp(StringIO(s))
+ cc_py.read_file(StringIO(s))
# compare the two configparsers
self.assertEqualConfig(cc_py, cc)
# check that tidy does not change semantics
--
2.41.0

@ -0,0 +1,312 @@
# Use the same directory of the main package for subpackage licence and docs
%global _docdir_fmt %{name}
Name: python-iniparse
Version: 0.5
Release: 9%{?dist}
Summary: Accessing and Modifying INI files
# From LICENSE:
# iniparse/compat.py and tests/test_compat.py contain code derived from
# lib/python-2.3/ConfigParser.py and lib/python-2.3/test/test_cfgparse.py
# respectively. Other code may contain small snippets from those two files
# as well. The Python license (LICENSE-PSF) applies to that code.
License: MIT and Python
URL: https://github.com/candlepin/python-iniparse
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# https://github.com/candlepin/python-iniparse/pull/24
Patch6: 0006-Fix-compatibility-issues-with-Python-3.11.patch
# https://github.com/candlepin/python-iniparse/pull/29
Patch7: 0001-Fix-tests-with-python-3.12.1.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-test
%global _description %{expand: \
iniparse is an INI parser for Python which is API compatible with the standard
librarys ConfigParser, preserves structure of INI files (order of sections &
options, indentation, comments, and blank lines are preserved when data is
updated), and is more convenient to use.}
%description
%{_description}
%package -n python3-iniparse
Summary: %{summary}
%description -n python3-iniparse
%{_description}
%prep
%autosetup -p1
chmod -c -x html/index.html
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
rm -vfr %{buildroot}%{_docdir}/*
%pyproject_save_files iniparse
%check
%{py3_test_envvars} %{python3} ./runtests.py
%files -n python3-iniparse -f %{pyproject_files}
# pyproject_files handles both license files; verify with “rpm -qL -p …”
%doc README.md Changelog html/
%changelog
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.5-9
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.5-9
- Bump release for June 2024 mass rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.5-5
- Rebuilt for Python 3.12
- Fixes: rhbz#2176142
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.5-2
- Port to pyproject-rpm-macros
- Mention license breakdown in a spec file comment
- Update summary and description from upstream
* Mon Jun 13 2022 Jiri Hnidek <jhnidek@redhat.com> - 0.5-1
- Release 0.5
- Moved project to https://github.com/candlepin/python-iniparse
- Added support for Python 3 to upstream project
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.4-47
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.4-44
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4-41
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Nov 18 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4-39
- Subpackage python2-iniparse has been removed
See https://fedoraproject.org/wiki/Changes/RetirePython2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4-38
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sat Aug 31 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4-37
- Drop build dependency on python2-test
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4-36
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4-31
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.4-29
- Fix ambiguous Python 2 dependency declarations
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-28
- Use better Obsoletes for platform-python
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-27
- Remove platform-python subpackage
* Thu Aug 10 2017 Miro Hrončok <mhroncok@redhat.com> - 0.4-26
- Add platform-python package
- Add bconds
- Remove %%{?system_python_abi}
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Dec 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.4-23
- Add patch to update setup.py to use setuptools and declare install dependencies
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22
- Rebuild for Python 3.6
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-21
- Cleanups
- Add %%{?system_python_abi}
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-20
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-19
- Make python3 builds conditionally
- Adopt to new packaging guidelines
- Remove setuptools from BRs as it's not needed
- Cleanup spec
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.4-17
- Rebuilt for Python3.5 rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 0.4-15
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-13
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-12
- added python3-test to buildreq for python3
- run unittest with python3 also
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-11
- added python-test to buildreq, for unittests
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-10
- added %%check to run unittests when build
- updated fix-issue-28.patch, so test cases dont fail
* Fri Sep 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-9
- Introduce python3 subpackage.
- Use %%__python2 instead of %%__python.
* Mon Jul 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4-8
- Install docs to %%{_pkgdocdir} where available.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-6
- fix for upstream issue 28
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-1
- Release 0.4
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-2
- removed patch
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-1
- Release 0.3.1
- Fix empty-line handling bugs introduced in 0.3.0
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Mar 2 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-2
- added patch from upstream to fix regrestion :
* Sat Feb 28 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-1
- Release 0.3.0
- Fix handling of continuation lines
- Fix DEFAULT handling
- Fix picking/unpickling
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sun Dec 7 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.4-1
- Release 0.2.4:
- Updated to work with Python-2.6 (Python-2.4 and 2.5 are still supported)
- Support for files opened in unicode mode
- Fixed Python-3.0 compatibility warnings
- Minor API cleanup
* Fri Nov 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.3-5
- Rebuild for Python 2.6
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
- own the %%{_docdir}/python-iniparse-%%{version} directory
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
- handle egg-info too
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
- removed patch source line
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-1
- Updates to release 0.2.3
- removed empty ini file patch, it is included in 0.2.3
* Mon Nov 19 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-2
- Added upstream patch to fix problems with empty ini files.
* Tue Sep 25 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-1
- Updated to release 0.2.2
- removed patch to to fix problems with out commented lines, included in upstream source
* Wed Sep 12 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-4
- Added some logic to get the right python-setuptools buildrequeres
- based on the fedora version, to make the same spec file useful in
- all fedora releases.
* Mon Sep 10 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-3
- Added patch from upstream svn to fix problems with out commented lines.
* Tue Aug 28 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-2
- Changed BuildRequires python-setuptools to python-setuptools-devel
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
- Release 0.2.1
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
- relocated doc to %%{_docdir}/python-iniparse-%%{version}
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
- changed name from iniparse to python-iniparse
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
- Release 0.2
- Added html/* to %%doc
* Fri Jul 13 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.1-1
- Initial build.
Loading…
Cancel
Save