- 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`

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli-w?expand=0&rev=10
This commit is contained in:
Dirk Mueller 2025-02-24 10:45:16 +00:00 committed by Git OBS Bridge
commit cdf241375e
7 changed files with 160 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

66
python-tomli-w.changes Normal file
View File

@ -0,0 +1,66 @@
-------------------------------------------------------------------
Mon Feb 24 10:44:59 UTC 2025 - Dirk Müller <dmueller@suse.com>
- 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 22:22:46 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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 12:37:35 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:45:26 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Wed Jul 13 14:15:14 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Remove pytest-randomly from requirements for easier inclusion
into Ring1
-------------------------------------------------------------------
Fri Feb 25 11:48:21 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
- 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 17:48:29 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Initial specfile for version 0.3.0
- Requirement of full flit (not flit-core)

61
python-tomli-w.spec Normal file
View File

@ -0,0 +1,61 @@
#
# 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: 0
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

BIN
tomli-w-1.0.0-gh.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

3
tomli-w-1.1.0-gh.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf9a4ccddb0b03cf2538479ac2210827ef5d5ff77de576f07147042b903bfb32
size 64682

3
tomli-w-1.2.0-gh.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b423098831faf35be897c5018c93e7c67eabf95d3359e1d5e97e5a4c0265ace
size 65320