From 09bfe05024c9fbe633e2279a912e09847ac7b7eb09b80d3144e8e4eacfcf7a8b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 Dec 2025 09:16:15 +0000 Subject: [PATCH 1/4] - Update to 2.3.0 * add IniConfig.parse() classmethod with strip_inline_comments parameter (fixes #55) - by default (strip_inline_comments=True), inline comments are properly stripped from values - set strip_inline_comments=False to preserve old behavior if needed * IniConfig() constructor maintains backward compatibility (does not strip inline comments) * users should migrate to IniConfig.parse() for correct comment handling * add strip_section_whitespace parameter to IniConfig.parse() (regarding #4) - opt-in parameter to strip Unicode whitespace from section names - when True, strips Unicode whitespace (U+00A0, U+2000, U+3000, etc.) from section names - when False (default), preserves existing behavior for backward compatibility * clarify Unicode whitespace handling (regarding #4) - since iniconfig 2.0.0 (Python 3 only), all strings are Unicode by default - Python 3's str.strip() has handled Unicode whitespace since Python 3.0 (2008) - iniconfig automatically benefits from this in all supported versions (Python >= 3.10) - key names and values have Unicode whitespace properly stripped using Python's built-in methods - from version 2.2.0 * drop Python 3.8 and 3.9 support (now requires Python >= 3.10) * add Python 3.14 classifier * migrate from hatchling to setuptools 77 with setuptools_scm * adopt PEP 639 license specifiers and PEP 740 build attestations * migrate from black + pyupgrade to ruff * migrate CI to uv and unified test workflow * automate GitHub releases and PyPI publishing via Trusted Publishing * include tests in sdist * modernize code for Python 3.10+ (remove __future__ annotations, TYPE_CHECKING guards) * rename _ParsedLine to ParsedLine - Update BuildRequires from pyproject.toml OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iniconfig?expand=0&rev=22 --- .gitattributes | 23 +++++++++ .gitignore | 1 + _multibuild | 3 ++ iniconfig-2.1.0-tests.tar.gz | 3 ++ iniconfig-2.1.0.tar.gz | 3 ++ iniconfig-2.3.0-tests.tar.gz | 3 ++ iniconfig-2.3.0.tar.gz | 3 ++ python-iniconfig.changes | 92 ++++++++++++++++++++++++++++++++++++ python-iniconfig.spec | 88 ++++++++++++++++++++++++++++++++++ 9 files changed, 219 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 iniconfig-2.1.0-tests.tar.gz create mode 100644 iniconfig-2.1.0.tar.gz create mode 100644 iniconfig-2.3.0-tests.tar.gz create mode 100644 iniconfig-2.3.0.tar.gz create mode 100644 python-iniconfig.changes create mode 100644 python-iniconfig.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/iniconfig-2.1.0-tests.tar.gz b/iniconfig-2.1.0-tests.tar.gz new file mode 100644 index 0000000..61938b7 --- /dev/null +++ b/iniconfig-2.1.0-tests.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bbd2d27f7fc26cb01bf52bc99e7efd56a5a3f4e62c551aed2c9fb0cf4226153 +size 8195 diff --git a/iniconfig-2.1.0.tar.gz b/iniconfig-2.1.0.tar.gz new file mode 100644 index 0000000..7f37c99 --- /dev/null +++ b/iniconfig-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7 +size 4793 diff --git a/iniconfig-2.3.0-tests.tar.gz b/iniconfig-2.3.0-tests.tar.gz new file mode 100644 index 0000000..3fda3a4 --- /dev/null +++ b/iniconfig-2.3.0-tests.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b485a7f6c060b2e758b6e58fd1bf7349a6f99954110ca61ceb59af25cf4ff458 +size 17914 diff --git a/iniconfig-2.3.0.tar.gz b/iniconfig-2.3.0.tar.gz new file mode 100644 index 0000000..94d7a9c --- /dev/null +++ b/iniconfig-2.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730 +size 20503 diff --git a/python-iniconfig.changes b/python-iniconfig.changes new file mode 100644 index 0000000..ae3bcab --- /dev/null +++ b/python-iniconfig.changes @@ -0,0 +1,92 @@ +------------------------------------------------------------------- +Thu Dec 4 10:02:05 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 2.3.0 + * add IniConfig.parse() classmethod with strip_inline_comments parameter (fixes #55) + - by default (strip_inline_comments=True), inline comments are properly stripped from values + - set strip_inline_comments=False to preserve old behavior if needed + * IniConfig() constructor maintains backward compatibility (does not strip inline comments) + * users should migrate to IniConfig.parse() for correct comment handling + * add strip_section_whitespace parameter to IniConfig.parse() (regarding #4) + - opt-in parameter to strip Unicode whitespace from section names + - when True, strips Unicode whitespace (U+00A0, U+2000, U+3000, etc.) from section names + - when False (default), preserves existing behavior for backward compatibility + * clarify Unicode whitespace handling (regarding #4) + - since iniconfig 2.0.0 (Python 3 only), all strings are Unicode by default + - Python 3's str.strip() has handled Unicode whitespace since Python 3.0 (2008) + - iniconfig automatically benefits from this in all supported versions (Python >= 3.10) + - key names and values have Unicode whitespace properly stripped using Python's built-in methods +- from version 2.2.0 + * drop Python 3.8 and 3.9 support (now requires Python >= 3.10) + * add Python 3.14 classifier + * migrate from hatchling to setuptools 77 with setuptools_scm + * adopt PEP 639 license specifiers and PEP 740 build attestations + * migrate from black + pyupgrade to ruff + * migrate CI to uv and unified test workflow + * automate GitHub releases and PyPI publishing via Trusted Publishing + * include tests in sdist + * modernize code for Python 3.10+ (remove __future__ annotations, TYPE_CHECKING guards) + * rename _ParsedLine to ParsedLine +- Update BuildRequires from pyproject.toml + +------------------------------------------------------------------- +Tue Jun 3 14:18:36 UTC 2025 - Nico Krapp + +- Update to 2.1.0 + * fix #26 - list individuals in license file by @RonnyPfannschmidt in #52 + * Run tests in CI by @nicoddemus in #53 + * Use pypa/gh-action-pypi-publish@release/v1 @ GHA by @webknjaz in #54 + * Add support for Python 3.12-3.13 and drop EOL 3.7 by @hugovk in #56 + +------------------------------------------------------------------- +Mon May 1 19:02:20 UTC 2023 - Benjamin Greiner + +- Don't catchall filelist +- Clean dependencies + +------------------------------------------------------------------- +Fri Apr 21 12:26:56 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:42:05 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Sun Jan 29 18:27:24 UTC 2023 - Dirk Müller + +- update to 2.0.0: + * Drop Python 3.6 + * Add Python 3.11 support + * type hints added +- use gh tarball for tests + +------------------------------------------------------------------- +Mon Dec 5 12:45:15 UTC 2022 - Daniel Garcia + +- Add python-py as test dependency + +------------------------------------------------------------------- +Wed Jul 20 12:01:45 UTC 2022 - Steve Kowalik + +- BuildRequire itself when building test flavour. + +------------------------------------------------------------------- +Mon Mar 14 10:47:56 UTC 2022 - John Paul Adrian Glaubitz + +- Include in SLE-15 (bsc#1195916, bsc#1196696, jsc#PM-3356, jsc#SLE-23972) + +------------------------------------------------------------------- +Tue Nov 10 08:00:10 UTC 2020 - Dirk Mueller + +- update to 1.1.1: + * fix version determination (thanks @florimondmanca) + * typing stubs (thanks @bluetech) + +------------------------------------------------------------------- +Mon Aug 24 13:03:36 UTC 2020 - Marketa Calabkova + +- Initial packaging (v1.0.1) +- Build the tests separately because it deadlocks with pytest diff --git a/python-iniconfig.spec b/python-iniconfig.spec new file mode 100644 index 0000000..cd33128 --- /dev/null +++ b/python-iniconfig.spec @@ -0,0 +1,88 @@ +# +# spec file for package python-iniconfig +# +# 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -%{flavor} +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-iniconfig%{psuffix} +Version: 2.3.0 +Release: 0 +Summary: iniconfig: brain-dead simple config-ini parsing +License: MIT +Group: Development/Languages/Python +URL: https://github.com/RonnyPfannschmidt/iniconfig +Source: https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz +Source1: https://github.com/pytest-dev/iniconfig/archive/refs/tags/v%{version}.tar.gz#/iniconfig-%{version}-tests.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 77} +BuildRequires: %{python_module setuptools-scm >= 8} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module iniconfig} +BuildRequires: %{python_module pytest} +%endif +%python_subpackages + +%description +iniconfig is a small and simple INI-file parser module +having a unique set of features: + +* tested against Python2.4 across to Python3.2, Jython, PyPy +* maintains order of sections and entries +* supports multi-line values with or without line-continuations +* supports "#" comments everywhere +* raises errors with proper line-numbers +* no bells and whistles like automatic substitutions +* iniconfig raises an Error if two sections have the same name. + +%prep +%setup -q -n iniconfig-%{version} -a1 + +%if !%{with test} +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +%pytest +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/iniconfig +%{python_sitelib}/iniconfig-%{version}.dist-info +%endif + +%changelog From 049dbe02fdb5ec7bc16ea222ce4becebe1fa7e5dda489a2a6030e7063622f355 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 Dec 2025 09:54:00 +0000 Subject: [PATCH 2/4] Eliminate the need for setuptools_scm by adding no-setuptools_scm.patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iniconfig?expand=0&rev=23 --- no-setuptools_scm.patch | 27 +++++++++++++++++++++++++++ python-iniconfig.changes | 6 ++++++ python-iniconfig.spec | 9 +++++---- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 no-setuptools_scm.patch diff --git a/no-setuptools_scm.patch b/no-setuptools_scm.patch new file mode 100644 index 0000000..615215c --- /dev/null +++ b/no-setuptools_scm.patch @@ -0,0 +1,27 @@ +--- + pyproject.toml | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +Index: iniconfig-2.3.0/pyproject.toml +=================================================================== +--- iniconfig-2.3.0.orig/pyproject.toml 2025-12-10 10:43:39.982953641 +0100 ++++ iniconfig-2.3.0/pyproject.toml 2025-12-10 10:52:41.551397217 +0100 +@@ -2,7 +2,6 @@ + build-backend = "setuptools.build_meta" + requires = [ + "setuptools>=77", +- "setuptools-scm>=8", + ] + + [project] +@@ -49,8 +48,8 @@ + [tool.setuptools.package-data] + iniconfig = [ "py.typed" ] + +-[tool.setuptools_scm] +-write_to = "src/iniconfig/_version.py" ++[tool.setuptools.dynamic] ++version = { attr = "iniconfig._version.__version__" } + + [tool.ruff] + diff --git a/python-iniconfig.changes b/python-iniconfig.changes index ae3bcab..28525bc 100644 --- a/python-iniconfig.changes +++ b/python-iniconfig.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 10 09:30:44 UTC 2025 - Matej Cepl + +- Eliminate the need for setuptools_scm by adding + no-setuptools_scm.patch. + ------------------------------------------------------------------- Thu Dec 4 10:02:05 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-iniconfig.spec b/python-iniconfig.spec index cd33128..644d16e 100644 --- a/python-iniconfig.spec +++ b/python-iniconfig.spec @@ -1,7 +1,7 @@ # # spec file for package python-iniconfig # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -%{flavor} @@ -35,10 +34,12 @@ Group: Development/Languages/Python URL: https://github.com/RonnyPfannschmidt/iniconfig Source: https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz Source1: https://github.com/pytest-dev/iniconfig/archive/refs/tags/v%{version}.tar.gz#/iniconfig-%{version}-tests.tar.gz +# PATCH-FIX-OPENSUSE no-setuptools_scm.patch mcepl@suse.com +# don't use setuptools_scm +Patch0: no-setuptools_scm.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 77} -BuildRequires: %{python_module setuptools-scm >= 8} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -61,7 +62,7 @@ having a unique set of features: * iniconfig raises an Error if two sections have the same name. %prep -%setup -q -n iniconfig-%{version} -a1 +%autosetup -p1 -n iniconfig-%{version} -a1 %if !%{with test} %build From 9e5980c088b5af2bc76edcc678e37a1bf1d362cd4698acd03a23a4f0ffa2f1e0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 Dec 2025 09:59:34 +0000 Subject: [PATCH 3/4] Remove patch again. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iniconfig?expand=0&rev=24 --- python-iniconfig.changes | 3 +-- python-iniconfig.spec | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python-iniconfig.changes b/python-iniconfig.changes index 28525bc..7c6427b 100644 --- a/python-iniconfig.changes +++ b/python-iniconfig.changes @@ -1,8 +1,7 @@ ------------------------------------------------------------------- Wed Dec 10 09:30:44 UTC 2025 - Matej Cepl -- Eliminate the need for setuptools_scm by adding - no-setuptools_scm.patch. +- Clean the SPEC file. ------------------------------------------------------------------- Thu Dec 4 10:02:05 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-iniconfig.spec b/python-iniconfig.spec index 644d16e..822fc5f 100644 --- a/python-iniconfig.spec +++ b/python-iniconfig.spec @@ -34,12 +34,10 @@ Group: Development/Languages/Python URL: https://github.com/RonnyPfannschmidt/iniconfig Source: https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz Source1: https://github.com/pytest-dev/iniconfig/archive/refs/tags/v%{version}.tar.gz#/iniconfig-%{version}-tests.tar.gz -# PATCH-FIX-OPENSUSE no-setuptools_scm.patch mcepl@suse.com -# don't use setuptools_scm -Patch0: no-setuptools_scm.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 77} +BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch From 75b39dbcce8814d7e4d7e6fd294fd65423f124df9e5d1388c1a191f9be4a16af Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 Dec 2025 09:59:47 +0000 Subject: [PATCH 4/4] Remove patch again. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iniconfig?expand=0&rev=25 --- no-setuptools_scm.patch | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 no-setuptools_scm.patch diff --git a/no-setuptools_scm.patch b/no-setuptools_scm.patch deleted file mode 100644 index 615215c..0000000 --- a/no-setuptools_scm.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- - pyproject.toml | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -Index: iniconfig-2.3.0/pyproject.toml -=================================================================== ---- iniconfig-2.3.0.orig/pyproject.toml 2025-12-10 10:43:39.982953641 +0100 -+++ iniconfig-2.3.0/pyproject.toml 2025-12-10 10:52:41.551397217 +0100 -@@ -2,7 +2,6 @@ - build-backend = "setuptools.build_meta" - requires = [ - "setuptools>=77", -- "setuptools-scm>=8", - ] - - [project] -@@ -49,8 +48,8 @@ - [tool.setuptools.package-data] - iniconfig = [ "py.typed" ] - --[tool.setuptools_scm] --write_to = "src/iniconfig/_version.py" -+[tool.setuptools.dynamic] -+version = { attr = "iniconfig._version.__version__" } - - [tool.ruff] -