diff options
author | robot-piglet <[email protected]> | 2025-07-06 11:50:52 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-07-06 12:00:04 +0300 |
commit | bce30d95e1d6b1a48c2286ea60ae1e7e339268c9 (patch) | |
tree | 5ff3ff87730a1b93d4bd3b86980d0035a0d71251 | |
parent | e6b47c2d2eb3f12a51e228ac6378e709b647b186 (diff) |
Intermediate changes
commit_hash:642455dbf37edabddc91aef03c4ff4cff9256a96
-rw-r--r-- | contrib/python/jaraco.collections/.dist-info/METADATA | 41 | ||||
-rw-r--r-- | contrib/python/jaraco.collections/LICENSE | 31 | ||||
-rw-r--r-- | contrib/python/jaraco.collections/README.rst | 4 | ||||
-rw-r--r-- | contrib/python/jaraco.collections/jaraco/collections/__init__.py | 23 | ||||
-rw-r--r-- | contrib/python/jaraco.collections/ya.make | 2 |
5 files changed, 61 insertions, 40 deletions
diff --git a/contrib/python/jaraco.collections/.dist-info/METADATA b/contrib/python/jaraco.collections/.dist-info/METADATA index fe6ca5ad880..dbba5df9a7b 100644 --- a/contrib/python/jaraco.collections/.dist-info/METADATA +++ b/contrib/python/jaraco.collections/.dist-info/METADATA @@ -1,36 +1,37 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: jaraco.collections -Version: 5.1.0 +Version: 5.2.1 Summary: Collection objects similar to those in stdlib by jaraco Author-email: "Jason R. Coombs" <[email protected]> +License-Expression: MIT Project-URL: Source, https://github.com/jaraco/jaraco.collections Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE Requires-Dist: jaraco.text +Provides-Extra: test +Requires-Dist: pytest!=8.1.*,>=6; extra == "test" +Provides-Extra: doc +Requires-Dist: sphinx>=3.5; extra == "doc" +Requires-Dist: jaraco.packaging>=9.3; extra == "doc" +Requires-Dist: rst.linker>=1.9; extra == "doc" +Requires-Dist: furo; extra == "doc" +Requires-Dist: sphinx-lint; extra == "doc" +Requires-Dist: jaraco.tidelift>=1.4; extra == "doc" Provides-Extra: check -Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'check' -Requires-Dist: pytest-ruff >=0.2.1 ; (sys_platform != "cygwin") and extra == 'check' +Requires-Dist: pytest-checkdocs>=2.4; extra == "check" +Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check" Provides-Extra: cover -Requires-Dist: pytest-cov ; extra == 'cover' -Provides-Extra: doc -Requires-Dist: sphinx >=3.5 ; extra == 'doc' -Requires-Dist: jaraco.packaging >=9.3 ; extra == 'doc' -Requires-Dist: rst.linker >=1.9 ; extra == 'doc' -Requires-Dist: furo ; extra == 'doc' -Requires-Dist: sphinx-lint ; extra == 'doc' -Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'doc' +Requires-Dist: pytest-cov; extra == "cover" Provides-Extra: enabler -Requires-Dist: pytest-enabler >=2.2 ; extra == 'enabler' -Provides-Extra: test -Requires-Dist: pytest !=8.1.*,>=6 ; extra == 'test' +Requires-Dist: pytest-enabler>=2.2; extra == "enabler" Provides-Extra: type -Requires-Dist: pytest-mypy ; extra == 'type' +Requires-Dist: pytest-mypy; extra == "type" +Dynamic: license-file .. image:: https://img.shields.io/pypi/v/jaraco.collections.svg :target: https://pypi.org/project/jaraco.collections @@ -41,14 +42,14 @@ Requires-Dist: pytest-mypy ; extra == 'type' :target: https://github.com/jaraco/jaraco.collections/actions?query=workflow%3A%22tests%22 :alt: tests -.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json +.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff .. image:: https://readthedocs.org/projects/jaracocollections/badge/?version=latest :target: https://jaracocollections.readthedocs.io/en/latest/?badge=latest -.. image:: https://img.shields.io/badge/skeleton-2024-informational +.. image:: https://img.shields.io/badge/skeleton-2025-informational :target: https://blog.jaraco.com/skeleton .. image:: https://tidelift.com/badges/package/pypi/jaraco.collections diff --git a/contrib/python/jaraco.collections/LICENSE b/contrib/python/jaraco.collections/LICENSE index 1bb5a44356f..f60bd572013 100644 --- a/contrib/python/jaraco.collections/LICENSE +++ b/contrib/python/jaraco.collections/LICENSE @@ -1,17 +1,18 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +MIT License -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Copyright (c) 2025 <copyright holders> -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/contrib/python/jaraco.collections/README.rst b/contrib/python/jaraco.collections/README.rst index 5043d6a6033..aef23866996 100644 --- a/contrib/python/jaraco.collections/README.rst +++ b/contrib/python/jaraco.collections/README.rst @@ -7,14 +7,14 @@ :target: https://github.com/jaraco/jaraco.collections/actions?query=workflow%3A%22tests%22 :alt: tests -.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json +.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff .. image:: https://readthedocs.org/projects/jaracocollections/badge/?version=latest :target: https://jaracocollections.readthedocs.io/en/latest/?badge=latest -.. image:: https://img.shields.io/badge/skeleton-2024-informational +.. image:: https://img.shields.io/badge/skeleton-2025-informational :target: https://blog.jaraco.com/skeleton .. image:: https://tidelift.com/badges/package/pypi/jaraco.collections diff --git a/contrib/python/jaraco.collections/jaraco/collections/__init__.py b/contrib/python/jaraco.collections/jaraco/collections/__init__.py index 0d501cf9e9c..43c6f6f6072 100644 --- a/contrib/python/jaraco.collections/jaraco/collections/__init__.py +++ b/contrib/python/jaraco.collections/jaraco/collections/__init__.py @@ -8,7 +8,7 @@ import operator import random import re from collections.abc import Container, Iterable, Mapping -from typing import TYPE_CHECKING, Any, Callable, Dict, TypeVar, Union, overload +from typing import TYPE_CHECKING, Any, Callable, TypeVar, Union, overload import jaraco.text @@ -135,7 +135,7 @@ def dict_map(function, dictionary): return dict((key, function(value)) for key, value in dictionary.items()) -class RangeMap(Dict[_RangeMapKT, _VT]): +class RangeMap(dict[_RangeMapKT, _VT]): """ A dictionary-like object that uses the keys as bounds for a range. Inclusion of the value for that range is determined by the @@ -1089,3 +1089,22 @@ class WeightedLookup(RangeMap): lower, upper = self.bounds() selector = random.random() * upper return self[selector] + + +def set_defaults(__anon_self: dict[str, object], /, **defaults) -> None: + """ + Sets values on target in source not already in target. + + Like :meth:`dict.setdefault`, but applies to all keys. + + >>> target = dict(a=1, c=3) + >>> set_defaults(target, b=2, c=4) + >>> target + {'a': 1, 'c': 3, 'b': 2} + + The first parameter is bound to a name that's unlikely to + collide with the keys in defaults. + + >>> set_defaults(target, target=999) + """ + __anon_self.update(Mask(__anon_self.__contains__, defaults)) diff --git a/contrib/python/jaraco.collections/ya.make b/contrib/python/jaraco.collections/ya.make index bcaca3b8183..0348eaaf587 100644 --- a/contrib/python/jaraco.collections/ya.make +++ b/contrib/python/jaraco.collections/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(5.1.0) +VERSION(5.2.1) LICENSE(MIT) |