Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-dparse for openSUSE:Factory checked in at 2024-01-15 22:20:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-dparse (Old) and /work/SRC/openSUSE:Factory/.python-dparse.new.21961 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dparse" Mon Jan 15 22:20:02 2024 rev:7 rq:1138750 version:0.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-dparse/python-dparse.changes 2023-07-03 17:42:16.276536961 +0200 +++ /work/SRC/openSUSE:Factory/.python-dparse.new.21961/python-dparse.changes 2024-01-15 22:20:26.057501733 +0100 @@ -1,0 +2,8 @@ +Mon Jan 15 05:33:37 UTC 2024 - Steve Kowalik <[email protected]> + +- Switch to autosetup and pyproject macros. +- Stop using greedy globs in %files. +- Add patch fix-configparser-parsing.patch: + * Use non-deprecated/removed functions from ConfigParser. + +------------------------------------------------------------------- New: ---- fix-configparser-parsing.patch BETA DEBUG BEGIN: New:- Stop using greedy globs in %files. - Add patch fix-configparser-parsing.patch: * Use non-deprecated/removed functions from ConfigParser. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dparse.spec ++++++ --- /var/tmp/diff_new_pack.OqYkup/_old 2024-01-15 22:20:26.769527900 +0100 +++ /var/tmp/diff_new_pack.OqYkup/_new 2024-01-15 22:20:26.773528048 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-dparse # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,10 +22,13 @@ Release: 0 Summary: Python dependency file parser License: MIT -Group: Development/Languages/Python URL: https://github.com/jayfk/dparse Source: https://files.pythonhosted.org/packages/source/d/dparse/dparse-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#pyupio/dparse#a3d83e8bdfd694e873b5775881ab5aa62fdbb674 +Patch0: fix-configparser-parsing.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-PyYAML @@ -44,14 +47,14 @@ A parser for Python dependency files. %prep -%setup -q -n dparse-%{version} +%autosetup -p1 -n dparse-%{version} # Note vendor/toml.py could be unvendored %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} @@ -65,5 +68,6 @@ %files %{python_files} %license LICENSE %doc README.rst HISTORY.rst -%{python_sitelib}/* +%{python_sitelib}/dparse +%{python_sitelib}/dparse-%{version}.dist-info ++++++ fix-configparser-parsing.patch ++++++ >From a3d83e8bdfd694e873b5775881ab5aa62fdbb674 Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy <[email protected]> Date: Fri, 8 Sep 2023 11:49:00 +0200 Subject: [PATCH] replace ConfigParser's 'readfp' by 'read_string' fixes "DeprecationWarning: This method will be removed in Python 3.12. Use parser.read_file instead", and will marginally improve performance --- dparse/parser.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dparse/parser.py b/dparse/parser.py index f200607..923b362 100644 --- a/dparse/parser.py +++ b/dparse/parser.py @@ -3,8 +3,6 @@ import re import sys -from io import StringIO - from configparser import ConfigParser, NoOptionError from pathlib import PurePath @@ -305,7 +303,7 @@ def parse(self): :return: """ parser = ConfigParser() - parser.readfp(StringIO(self.obj.content)) + parser.read_string(self.obj.content) for section in parser.sections(): try: content = parser.get(section=section, option="deps") @@ -413,7 +411,7 @@ def parse(self): class SetupCfgParser(Parser): def parse(self): parser = ConfigParser() - parser.readfp(StringIO(self.obj.content)) + parser.read_string(self.obj.content) for section in parser.values(): if section.name == 'options': options = 'install_requires', 'setup_requires', 'test_require'
