# # spec file for package python-tomli-w # # 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-tomli-w Version: 1.2.0 Release: 1.3 Summary: A lil' TOML writer License: MIT URL: https://github.com/hukkin/tomli-w # prefer github archive over pypi sdist for pacakged tests Source: https://github.com/hukkin/tomli-w/archive/refs/tags/%{version}.tar.gz#/tomli-w-%{version}-gh.tar.gz BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module tomli} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages %description Tomli-W is a Python library for writing TOML. It is a write-only counterpart to Tomli, which is a read-only TOML parser. %prep %setup -q -n tomli-w-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %files %{python_files} %license LICENSE %doc README.md %{python_sitelib}/tomli_w %{python_sitelib}/tomli_w-%{version}*-info %check %pytest %changelog * Mon Feb 24 2025 Dirk Müller - update to 1.2.0: * Always preserve `decimal.Decimal` type in parse round trips * Improved * Better `TypeError` message on invalid mapping keys * Unify type representation in error messages * Performance * Improve import time by removing `typing` import * Improve import time by removing `string` import * Improve import time by lazy importing `decimal` * Tue Oct 29 2024 Dirk Müller - update to 1.1.0: * Removed Support for Python 3.7 and 3.8 * Accept generic `collections.abc.Mapping`, not just `dict`, as input. * `indent` keyword argument for customizing indent width of arrays. * Type annotations * Type annotate `dump` function's output stream object as `typing.IO[bytes]` (previously `typing.BinaryIO`) * 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. * Wed Jul 13 2022 Ben Greiner - Remove pytest-randomly from requirements for easier inclusion into Ring1 * Fri Feb 25 2022 Ferdinand Thiessen - Update to version 1.0.0 * Removed support for Python 3.6 * Positional arguments of dump and dumps can no longer be passed by keyword. * Revised logic for when the "Array of Tables" syntax will be used. AoT syntax is used when at least one of the tables needs multiple lines, or a single line wider than 100 chars, when rendered inline. * A nested structure no longer alone triggers the AoT syntax. - Update to version 0.4.0 * Added support for formatting Python tuples as TOML arrays. * Fixed formatting of decimal.Decimal("inf"), decimal.Decimal("-inf") and decimal.Decimal("nan"). * A list of dicts is now rendered using the "Array of Tables" syntax if at least one of the tables is a nested structure, or at least one of the tables would need a line wider than 100 chars when rendered inline. * Fri Oct 15 2021 Ben Greiner - Initial specfile for version 0.3.0 - Requirement of full flit (not flit-core)