# # spec file for package python-configobj # # 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-configobj Version: 5.0.9 Release: 1.3 Summary: Config file reading, writing and validation License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/DiffSK/configobj # No tests in PyPI sdist Source: https://github.com/DiffSK/configobj/archive/refs/tags/v%{version}.tar.gz#/configobj-%{version}-gh.tar.gz BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch # SECTION test BuildRequires: %{python_module pytest} # /SECTION %python_subpackages %description ConfigObj is a simple but powerful config file reader and writer: an ini file round tripper. Its main feature is that it is very easy to use, with a straightforward programmer's interface and a simple syntax for config files. It has lots of other features though: * Nested sections (subsections), to any level * List values * Multiple line values * Full Unicode support * String interpolation (substitution) * Integrated with a powerful validation system - including automatic type checking/conversion - and allowing default values - repeated sections * All comments in the file are preserved * The order of keys/sections is preserved * Powerful ``unrepr`` mode for storing/retrieving Python data-types %prep %autosetup -p1 -n configobj-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest %files %{python_files} %{python_sitelib}/configobj %{python_sitelib}/validate %{python_sitelib}/configobj-%{version}.dist-info %changelog * Tue Feb 4 2025 John Paul Adrian Glaubitz - Update to 5.0.9 * Drop support for Python 2 and <3.7 * Fix CVE-2023-26112, ReDoS attack - Drop CVE-2023-26112.patch, merged upstream - Drop remove_six.patch, fixed upstream * Wed Sep 11 2024 Matej Cepl - Refresh CVE-2023-26112.patch according to the last state of gh#DiffSK/configobj!236. * Wed Jan 3 2024 Ben Greiner - Remove six from the rpm requirements. Why would we have remove_six.patch in the first place if we still require it? - Enable unit tests * Wed Jan 3 2024 Dirk Müller - require setuptools - remove python2 logic, this makes no sense after "remove_six.patch" * Wed Jul 5 2023 Matej Cepl - Add remove_six.patch (gh#DiffSK/configobj#239) removing the need for six. * Tue Jul 4 2023 Markéta Machová - Add CVE-2023-26112.patch (bsc#1210070) * Thu May 4 2023 Dirk Müller - update to 5.0.8: * 5.0.7 originally did this work, but 5.0.8 fixes a regression * update testing to validate against python version 2.7 and 3.5-3.11 * update broken links / non-existent services and references * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Mon Jan 16 2023 Dirk Müller - require setuptools * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Wed May 24 2017 toddrme2178@gmail.com - Implement single-spec version. - Fix source URL. * Thu Sep 11 2014 toddrme2178@gmail.com - Update to version 5.0.6 * Improves error messages in certain edge cases * Thu Jul 24 2014 fcastelli@suse.com - Added runtime depedency: python-six * Wed Jul 23 2014 fcastelli@suse.com - Update to version 5.0.5: * BUGFIX: error in writing out config files to disk with non-ascii characters * BUGFIX: correcting that the code path fixed in 5.0.3 didn’t cover reading in config files * BUGFIX: not handling unicode encoding well, especially with respect to writing out files * Specific error message for installing version this version on Python versions older than 2.5 * Documentation corrections * BUGFIX: Fixed regression on python 2.x where passing an encoding parameter did not convert a bytestring config file (which is the most common) to unicode. Added unit tests for this and related cases * BUGFIX: A particular error message would fail to display with a type error on python 2.6 only * Python 3 single-source compatibility at the cost of a more restrictive set of versions: 2.6, 2.7, 3.2, 3.3 (otherwise unchanged) * Tue May 29 2012 cfarrell@suse.com - license update: BSD-3-Clause Refers only to the license available at http://www.voidspace.org.uk/python/license.shtml (which is BSD-3-Clause) * Fri May 25 2012 toddrme2178@gmail.com - Spec file cleanups * Sun Feb 5 2012 dimstar@opensuse.org - Really make the obsoletes sane: The package was called python-configobj-docs before, so that's what we need to obsolete (not -doc). - The Obsoletes tag is for <= %%{version}, as the package existed in version 4.7.2, which is also when it was merged back. Obsoleting only < 4.7.2 would cause conflicts when installing the newly merged package. * Tue Jan 24 2012 bwiedemann@suse.com - fix Obsoletes * Fri Dec 9 2011 saschpe@suse.de - Spec file cleanup: * Use upstream tarball * Obsoleted empty doc package * Fix SLE-11 build * Use upstream description * Thu Dec 8 2011 coolo@suse.com - fix license to be in spdx.org format * Mon Sep 13 2010 dimstar@opensuse.org - Update to version 4.7.2: + BUGFIX: Restore Python 2.3 compatibility + BUGFIX: Members that were lists were being returned as copies due to interpolation introduced in 4.7. Lists are now only copies if interpolation changes a list member. + BUGFIX: pop now does interpolation in list values as well. + BUGFIX: where interpolation matches a section name rather than a value it is ignored instead of raising an exception on fetching the item. + BUGFIX: values that use interpolation to reference members that don't exist can now be repr'd. + BUGFIX: Fix to avoid writing '\r\r\n' on Windows when given a file opened in text write mode ('w'). * Tue Jul 20 2010 pascal.bleser@opensuse.org - update to 4.7.1 - split out -docs subpackage * Sun May 27 2007 peter+rpmspam@suntel.com.tr - add "unzip" as a builddep so it builds on Factory - 4.4.0 * Fri May 11 2007 poeml@suse.de - package created (copy from packman package) - 4.4.0