pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/py-inflect



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Oct 26 05:29:27 UTC 2026

Modified Files:
        pkgsrc/lang/py-inflect: Makefile PLIST distinfo

Log Message:
py-inflect: updated to 7.6.0

v7.6.0

Features

- Added ``number_to_currency``, which writes an amount in words with the cents as a fraction of one hundred, as on checks and money orders (``number_to_currency(100020.56)`` is ``"one hundred 
thousand and twenty and 56/100"``).
- ``defnoun`` now accepts a keyword-only ``case`` parameter. Pass ``case="preserve"`` to retain the literal case of an uppercase noun's custom plural (such as ``defnoun("URL", "URLs", 
case="preserve")``) rather than normalizing it to the case of the input.

Bugfixes

- Pluralizing a multi-word phrase whose word count changes during inflection (such as when a leading article is dropped) no longer raises an ``IndexError``. ``postprocess`` now restores word-wise 
capitalization by pairing original and inflected words rather than by index.
- ``number_to_words`` now honors a custom ``comma`` separator across the word-spelling, grouped, and threshold code paths rather than only the default ``", "``.
- ``ordinal`` now handles negative numbers: it no longer raises a ``TypeError`` on negative integers and returns a suffix based on the last digit (e.g. ``ordinal(-1)`` is ``-1st``).
- ``singular_noun`` now recognizes words ending in "-ss" (such as "class", "boss", and "address") as already singular and returns ``False`` instead of stripping the trailing "s".
- ``number_to_words`` now groups digits from the right, so ``123`` with ``group=2`` reads as ``one, twenty-three`` instead of ``twelve, three``.
- Avoid a ``TypeError`` when singularizing long compounds whose leading noun is
  already singular.
- ``number_to_words`` now expands floats expressed in scientific notation (such as ``1e20`` or ``0.000001``) instead of mis-parsing the exponent.
- ``number_to_words`` no longer emits a stray space before a punctuation ``andword`` (such as ``number_to_words(541140, andword=",")``).
- In classical "names" mode, a capitalized multi-word phrase whose final noun is lowercase and ends in a consonant plus "y" now pluralizes that noun (e.g. "Old technology" -> "Old technologies") 
instead of treating the whole phrase as a proper name.
- Numeric count values equal to ``1`` (such as ``1.0``) are now treated as singular.
- ``Word`` arguments are now exposed as ``str`` to static type checkers (such as Pylance and mypy) while still enforcing the non-empty-string check at runtime.
- Common uncountable mass nouns (such as "equipment", "luggage", "baggage", "jewelry", "machinery", "cutlery", and "livestock") are now left unchanged by ``plural_noun`` instead of being incorrectly 
pluralized.
- ``number_to_words`` now raises the documented ``NumOutOfRangeError`` for numbers whose magnitude exceeds the largest known scale word, instead of leaking an uncaught ``IndexError``.
- ``present_participle`` now returns "being" for the verb "be" (and its forms "is", "are", "were") instead of the malformed "bing".
- ``num`` now raises ``BadNumValueError`` instead of leaking an ``OverflowError`` for non-finite counts such as ``float("inf")``.
- ``plural_noun`` no longer drops the trailing prepositional phrase when the head of a compound has an irregular plural (e.g. "brother-in-law" now pluralizes to "brothers-in-law").
- ``ordinal`` now raises ``BadNumValueError`` for malformed numeric input such as "11 11" instead of leaking a bare ``ValueError``.
- Handle signed numeric literals in inflect() interpolation arguments.
- Restore the persistent count when an interpolated function in ``inflect()`` raises an exception.
- ``compare`` and the related ``compare_nouns``/``compare_verbs``/``compare_adjs`` no longer leave the engine in classical mode as a side effect of the comparison.
- ``present_participle`` now inserts a ``k`` before ``-ing`` for verbs ending in a vowel followed by ``c`` (for example "panics" becomes "panicking").


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/lang/py-inflect/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/py-inflect/PLIST
cvs rdiff -u -r1.10 -r1.11 pkgsrc/lang/py-inflect/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/py-inflect/Makefile
diff -u pkgsrc/lang/py-inflect/Makefile:1.16 pkgsrc/lang/py-inflect/Makefile:1.17
--- pkgsrc/lang/py-inflect/Makefile:1.16        Mon Apr 14 10:04:42 2025
+++ pkgsrc/lang/py-inflect/Makefile     Mon Oct 26 05:29:27 2026
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.16 2025/04/14 10:04:42 adam Exp $
+# $NetBSD: Makefile,v 1.17 2026/10/26 05:29:27 adam Exp $
 
-DISTNAME=      inflect-7.5.0
+DISTNAME=      inflect-7.6.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   1
 CATEGORIES=    lang python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=i/inflect/}
 
@@ -13,10 +12,11 @@ LICENSE=    mit
 
 TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools
 TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm>=7.0.0:../../devel/py-setuptools_scm
+DEPENDS+=      ${PYPKGPREFIX}-jaraco.functools>=0:../../devel/py-jaraco.functools
 DEPENDS+=      ${PYPKGPREFIX}-more-itertools>=8.5.0:../../devel/py-more-itertools
 DEPENDS+=      ${PYPKGPREFIX}-typeguard>=4.0.1:../../devel/py-typeguard
-TEST_DEPENDS+= ${PYPKGPREFIX}-pygments-[0-9]*:../../textproc/py-pygments
-TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
+TEST_DEPENDS+= ${PYPKGPREFIX}-pygments>=0:../../textproc/py-pygments
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov>=0:../../devel/py-test-cov
 
 USE_LANGUAGES= # none
 

Index: pkgsrc/lang/py-inflect/PLIST
diff -u pkgsrc/lang/py-inflect/PLIST:1.7 pkgsrc/lang/py-inflect/PLIST:1.8
--- pkgsrc/lang/py-inflect/PLIST:1.7    Mon Apr 14 10:04:42 2025
+++ pkgsrc/lang/py-inflect/PLIST        Mon Oct 26 05:29:27 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2025/04/14 10:04:42 adam Exp $
+@comment $NetBSD: PLIST,v 1.8 2026/10/26 05:29:27 adam Exp $
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
 ${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
@@ -7,10 +7,7 @@ ${PYSITELIB}/${WHEEL_INFODIR}/top_level.
 ${PYSITELIB}/inflect/__init__.py
 ${PYSITELIB}/inflect/__init__.pyc
 ${PYSITELIB}/inflect/__init__.pyo
-${PYSITELIB}/inflect/compat/__init__.py
-${PYSITELIB}/inflect/compat/__init__.pyc
-${PYSITELIB}/inflect/compat/__init__.pyo
-${PYSITELIB}/inflect/compat/py38.py
-${PYSITELIB}/inflect/compat/py38.pyc
-${PYSITELIB}/inflect/compat/py38.pyo
+${PYSITELIB}/inflect/_types.py
+${PYSITELIB}/inflect/_types.pyc
+${PYSITELIB}/inflect/_types.pyo
 ${PYSITELIB}/inflect/py.typed

Index: pkgsrc/lang/py-inflect/distinfo
diff -u pkgsrc/lang/py-inflect/distinfo:1.10 pkgsrc/lang/py-inflect/distinfo:1.11
--- pkgsrc/lang/py-inflect/distinfo:1.10        Sun Dec 29 09:07:53 2024
+++ pkgsrc/lang/py-inflect/distinfo     Mon Oct 26 05:29:27 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.10 2024/12/29 09:07:53 adam Exp $
+$NetBSD: distinfo,v 1.11 2026/10/26 05:29:27 adam Exp $
 
-BLAKE2s (inflect-7.5.0.tar.gz) = 2381bf57597b346f22c8d44b4f9b39f350c8743d3f728e6b074ac3415e3f4b28
-SHA512 (inflect-7.5.0.tar.gz) = ee9f69dff451017a2aad2226d8c6ae02b4b7b4bc4d4c49f3efee50d85eeef43c49c6c6ef3e7f30fa2c5ef21e065ff5242140d5a98bc71af17c7e70d9e75e54c1
-Size (inflect-7.5.0.tar.gz) = 73751 bytes
+BLAKE2s (inflect-7.6.0.tar.gz) = a1b9bf38b89ef87c2177afe4b132aba289578b5efaaeb579868a287d173c63ba
+SHA512 (inflect-7.6.0.tar.gz) = 8a768c5a096548c4b7cbde75a07ead131813d4ed5478ecdb6e722cee9ed6e073afaf171d353096872362017e4854aba02400a8e9af05590cc2e4770f4d21d44a
+Size (inflect-7.6.0.tar.gz) = 83035 bytes



Home | Main Index | Thread Index | Old Index