Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ini2toml for openSUSE:Factory 
checked in at 2026-12-01 16:58:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ini2toml (Old)
 and      /work/SRC/openSUSE:Factory/.python-ini2toml.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ini2toml"

Tue Dec  1 16:58:02 2026 rev:15 rq:1401004 version:0.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ini2toml/python-ini2toml.changes  
2026-06-05 14:56:04.857837015 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-ini2toml.new.1340718/python-ini2toml.changes 
    2026-12-01 16:58:24.532698517 +0100
@@ -1,0 +2,6 @@
+Fri Nov 27 00:38:52 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-tomlkit-0.15.1.patch:
+  * Fix extra leading newlines in multiline strings with tomlkit >= 0.15.1.
+
+-------------------------------------------------------------------

New:
----
  support-tomlkit-0.15.1.patch

----------(New B)----------
  New:
- Add patch support-tomlkit-0.15.1.patch:
  * Fix extra leading newlines in multiline strings with tomlkit >= 0.15.1.
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ini2toml.spec ++++++
--- /var/tmp/diff_new_pack.NzjEa3/_old  2026-12-01 16:58:25.590742734 +0100
+++ /var/tmp/diff_new_pack.NzjEa3/_new  2026-12-01 16:58:25.597743026 +0100
@@ -60,6 +60,8 @@
 Source:         
https://files.pythonhosted.org/packages/source/i/ini2toml/ini2toml-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM gh#abravalheri/ini2toml#132
 Patch0:         support-tomlkit-0.15.0.patch
+# PATCH-FIX-UPSTREAM (closed) gh#abravalheri/ini2toml#134
+Patch1:         support-tomlkit-0.15.1.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools_scm}
 BuildRequires:  %{python_module setuptools}

++++++ support-tomlkit-0.15.1.patch ++++++
>From fe6e2432b47dd82dc713680d666de137ccf0695d Mon Sep 17 00:00:00 2001
From: Hulk <[email protected]>
Date: Sun, 11 Oct 2026 20:57:56 -0700
Subject: [PATCH] Fix extra leading newlines in multiline strings

---
 AUTHORS.rst                              |  1 +
 src/ini2toml/drivers/full_toml.py        | 10 ++++---
 tests/drivers/test_full_toml.py          | 36 ++++++++++++++++++++++++
 tests/examples/pyscaffold/pyproject.toml |  3 +-
 tests/examples/virtualenv/pyproject.toml |  3 +-
 5 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/AUTHORS.rst b/AUTHORS.rst
index 8c5210c..81128e7 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -4,3 +4,4 @@ Contributors
 
 * Anderson Bravalheri <[email protected]>
 * Michał Górny <[email protected]>
+* `hulkbig <https://github.com/hulkbig>`_
diff --git a/src/ini2toml/drivers/full_toml.py 
b/src/ini2toml/drivers/full_toml.py
index c3b9570..302c439 100644
--- a/src/ini2toml/drivers/full_toml.py
+++ b/src/ini2toml/drivers/full_toml.py
@@ -317,10 +317,12 @@ def _string(obj: str) -> String:
     single_line = "".join(x.strip().rstrip("\\") for x in obj.splitlines())
     literal = '"' in obj or "\\" in single_line
 
-    if multiline and not obj.startswith("\n"):
-        # TOML feature: during parsing a starting newline character in a 
multi-line
-        # string will be stripped away.
-        # So we are free to add it, since it is better for reading
+    # Preserve leading CRLF: unlike LF, it was padded by this driver before.
+    # Older tomlkit versions still need padding to avoid TOML newline trimming.
+    if (
+        obj.startswith("\r\n")
+        and string("\r\n", multiline=True).as_string() == '"""\r\n"""'
+    ):
         obj = "\n" + obj
 
     try:
diff --git a/tests/drivers/test_full_toml.py b/tests/drivers/test_full_toml.py
index c867cf7..32caad6 100644
--- a/tests/drivers/test_full_toml.py
+++ b/tests/drivers/test_full_toml.py
@@ -1,3 +1,6 @@
+import pytest
+import tomli
+
 from ini2toml.drivers import full_toml as lib
 from ini2toml.plugins.profile_independent_tasks import 
remove_empty_table_headers
 from ini2toml.types import Commented, CommentedKV, CommentedList, CommentKey
@@ -66,3 +69,36 @@
 def test_convert():
     converted = lib.convert(example_parsed)
     assert remove_empty_table_headers(converted) == example_toml.strip()
+
+
[email protected](
+    "value",
+    [
+        "first\nsecond",
+        'first "quoted"\nsecond',
+        "C:\\first\nC:\\second",
+        "first \"'''\nsecond",
+        "first\n\nsecond",
+        "first\n",
+        "single line",
+    ],
+)
+def test_convert_string_roundtrip(value):
+    converted = lib.convert(IR(value=value))
+    assert tomli.loads(converted)["value"] == value
+
+
[email protected](
+    "value",
+    [
+        "\r\n",
+        "\r\nfirst\r\nsecond",
+        "\r\nfirst\r\n\r\nsecond",
+        '\r\nfirst "quoted"\r\nsecond',
+        "\r\nC:\\first\r\nC:\\second",
+        "\r\nfirst \"'''\r\nsecond",
+    ],
+)
+def test_convert_crlf_string_roundtrip(value):
+    converted = lib.convert(IR(value=value))
+    assert tomli.loads(converted)["value"] == value.replace("\r\n", "\n")
diff --git a/tests/examples/pyscaffold/pyproject.toml 
b/tests/examples/pyscaffold/pyproject.toml
index 79d5ad9..6042c5c 100644
--- a/tests/examples/pyscaffold/pyproject.toml
+++ b/tests/examples/pyscaffold/pyproject.toml
@@ -122,8 +122,7 @@ namespaces = true
 # in order to write a coverage file that can be read by Jenkins.
 # CAUTION: --cov flags may prohibit setting breakpoints while debugging.
 # Comment those flags to avoid this pytest issue.
-addopts = """
---cov pyscaffold --cov-config .coveragerc --cov-report term-missing
+addopts = """--cov pyscaffold --cov-config .coveragerc --cov-report 
term-missing
 --verbose"""
 # In order to use xdist, the developer can add, for example, the following
 # arguments:
diff --git a/tests/examples/virtualenv/pyproject.toml 
b/tests/examples/virtualenv/pyproject.toml
index 2a2f256..d8df1f1 100644
--- a/tests/examples/virtualenv/pyproject.toml
+++ b/tests/examples/virtualenv/pyproject.toml
@@ -136,6 +136,5 @@ universal = true
 markers = ["slow"]
 junit_family = "xunit2"
 addopts = "--tb=auto -ra --showlocals --no-success-flaky-report"
-env = """
-PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
+env = """PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
 PYTHONIOENCODING=utf-8"""

Reply via email to