From 5d3f0aadc5d85b90666bfabfc53aec182de34c22 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 22 Aug 2023 17:05:27 -0400 Subject: [PATCH] python3-inflect: update to 7.0.0. --- .../python3-inflect/patches/fix-test.patch | 28 +++++++++++++++++++ srcpkgs/python3-inflect/template | 9 +++--- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/python3-inflect/patches/fix-test.patch diff --git a/srcpkgs/python3-inflect/patches/fix-test.patch b/srcpkgs/python3-inflect/patches/fix-test.patch new file mode 100644 index 00000000000..45770502cc3 --- /dev/null +++ b/srcpkgs/python3-inflect/patches/fix-test.patch @@ -0,0 +1,28 @@ +From f6177e1b30c7cda6e73b6a0aa7437fe5a16fd0aa Mon Sep 17 00:00:00 2001 +From: Jaremy Hatler +Date: Sat, 23 Dec 2023 21:37:41 -0500 +Subject: [PATCH] fix: compare validation now expects singular noun + +On pydantic-code >= 2.12, the validation error messages use the singular +of the word "character" when the number 1 is specified in a condition. +This breaks the engine.compare validation, which expected the plural. + +Refs: #204 +Signed-off-by: Jaremy Hatler +--- + inflect/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/inflect/__init__.py b/inflect/__init__.py +index ccef776..fcb3d01 100644 +--- a/inflect/__init__.py ++++ b/inflect/__init__.py +@@ -2466,7 +2466,7 @@ def compare(self, word1: Word, word2: Word) -> Union[str, bool]: + ... + pydantic...ValidationError: ... + ... +- ...at least 1 characters... ++ ...at least 1 character... + """ + norms = self.plural_noun, self.plural_verb, self.plural_adj + results = (self._plequal(word1, word2, norm) for norm in norms) diff --git a/srcpkgs/python3-inflect/template b/srcpkgs/python3-inflect/template index 15b16a0da04..e83b21c359d 100644 --- a/srcpkgs/python3-inflect/template +++ b/srcpkgs/python3-inflect/template @@ -1,7 +1,7 @@ # Template file for 'python3-inflect' pkgname=python3-inflect -version=6.0.4 -revision=2 +version=7.0.0 +revision=1 build_style=python3-pep517 hostmakedepends="python3-wheel python3-setuptools_scm" depends="python3-pydantic" @@ -10,9 +10,10 @@ short_desc="Correctly generate plurals, ordinals; convert numbers to words" maintainer="icp " license="MIT" homepage="https://github.com/jaraco/inflect" -changelog="https://raw.githubusercontent.com/jaraco/inflect/main/CHANGES.rst" +changelog="https://raw.githubusercontent.com/jaraco/inflect/main/NEWS.rst" distfiles="${PYPI_SITE}/i/inflect/inflect-${version}.tar.gz" -checksum=1842649a17b6cad66812a5c9bdfacb6310e1e7b6dd8a31f026766df1b62612eb +checksum=63da9325ad29da81ec23e055b41225795ab793b4ecb483be5dc1fa363fd4717e +make_check_pre="env PY_IGNORE_IMPORTMISMATCH=1" post_install() { vlicense LICENSE