Skip to content

Commit bce30d9

Browse files
committed
Intermediate changes
commit_hash:642455dbf37edabddc91aef03c4ff4cff9256a96
1 parent e6b47c2 commit bce30d9

File tree

5 files changed

+61
-40
lines changed

5 files changed

+61
-40
lines changed

contrib/python/jaraco.collections/.dist-info/METADATA

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
Metadata-Version: 2.1
1+
Metadata-Version: 2.4
22
Name: jaraco.collections
3-
Version: 5.1.0
3+
Version: 5.2.1
44
Summary: Collection objects similar to those in stdlib by jaraco
55
Author-email: "Jason R. Coombs" <jaraco@jaraco.com>
6+
License-Expression: MIT
67
Project-URL: Source, https://github.com/jaraco/jaraco.collections
78
Classifier: Development Status :: 5 - Production/Stable
89
Classifier: Intended Audience :: Developers
9-
Classifier: License :: OSI Approved :: MIT License
1010
Classifier: Programming Language :: Python :: 3
1111
Classifier: Programming Language :: Python :: 3 :: Only
12-
Requires-Python: >=3.8
12+
Requires-Python: >=3.9
1313
Description-Content-Type: text/x-rst
1414
License-File: LICENSE
1515
Requires-Dist: jaraco.text
16+
Provides-Extra: test
17+
Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
18+
Provides-Extra: doc
19+
Requires-Dist: sphinx>=3.5; extra == "doc"
20+
Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
21+
Requires-Dist: rst.linker>=1.9; extra == "doc"
22+
Requires-Dist: furo; extra == "doc"
23+
Requires-Dist: sphinx-lint; extra == "doc"
24+
Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
1625
Provides-Extra: check
17-
Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'check'
18-
Requires-Dist: pytest-ruff >=0.2.1 ; (sys_platform != "cygwin") and extra == 'check'
26+
Requires-Dist: pytest-checkdocs>=2.4; extra == "check"
27+
Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check"
1928
Provides-Extra: cover
20-
Requires-Dist: pytest-cov ; extra == 'cover'
21-
Provides-Extra: doc
22-
Requires-Dist: sphinx >=3.5 ; extra == 'doc'
23-
Requires-Dist: jaraco.packaging >=9.3 ; extra == 'doc'
24-
Requires-Dist: rst.linker >=1.9 ; extra == 'doc'
25-
Requires-Dist: furo ; extra == 'doc'
26-
Requires-Dist: sphinx-lint ; extra == 'doc'
27-
Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'doc'
29+
Requires-Dist: pytest-cov; extra == "cover"
2830
Provides-Extra: enabler
29-
Requires-Dist: pytest-enabler >=2.2 ; extra == 'enabler'
30-
Provides-Extra: test
31-
Requires-Dist: pytest !=8.1.*,>=6 ; extra == 'test'
31+
Requires-Dist: pytest-enabler>=2.2; extra == "enabler"
3232
Provides-Extra: type
33-
Requires-Dist: pytest-mypy ; extra == 'type'
33+
Requires-Dist: pytest-mypy; extra == "type"
34+
Dynamic: license-file
3435

3536
.. image:: https://img.shields.io/pypi/v/jaraco.collections.svg
3637
:target: https://pypi.org/project/jaraco.collections
@@ -41,14 +42,14 @@ Requires-Dist: pytest-mypy ; extra == 'type'
4142
:target: https://github.com/jaraco/jaraco.collections/actions?query=workflow%3A%22tests%22
4243
:alt: tests
4344

44-
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
45+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
4546
:target: https://github.com/astral-sh/ruff
4647
:alt: Ruff
4748

4849
.. image:: https://readthedocs.org/projects/jaracocollections/badge/?version=latest
4950
:target: https://jaracocollections.readthedocs.io/en/latest/?badge=latest
5051

51-
.. image:: https://img.shields.io/badge/skeleton-2024-informational
52+
.. image:: https://img.shields.io/badge/skeleton-2025-informational
5253
:target: https://blog.jaraco.com/skeleton
5354

5455
.. image:: https://tidelift.com/badges/package/pypi/jaraco.collections
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
Permission is hereby granted, free of charge, to any person obtaining a copy
2-
of this software and associated documentation files (the "Software"), to
3-
deal in the Software without restriction, including without limitation the
4-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
5-
sell copies of the Software, and to permit persons to whom the Software is
6-
furnished to do so, subject to the following conditions:
1+
MIT License
72

8-
The above copyright notice and this permission notice shall be included in
9-
all copies or substantial portions of the Software.
3+
Copyright (c) 2025 <copyright holders>
104

11-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
17-
IN THE SOFTWARE.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6+
associated documentation files (the "Software"), to deal in the Software without restriction, including
7+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9+
following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all copies or substantial
12+
portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18+
USE OR OTHER DEALINGS IN THE SOFTWARE.

contrib/python/jaraco.collections/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
:target: https://github.com/jaraco/jaraco.collections/actions?query=workflow%3A%22tests%22
88
:alt: tests
99

10-
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
10+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
1111
:target: https://github.com/astral-sh/ruff
1212
:alt: Ruff
1313

1414
.. image:: https://readthedocs.org/projects/jaracocollections/badge/?version=latest
1515
:target: https://jaracocollections.readthedocs.io/en/latest/?badge=latest
1616

17-
.. image:: https://img.shields.io/badge/skeleton-2024-informational
17+
.. image:: https://img.shields.io/badge/skeleton-2025-informational
1818
:target: https://blog.jaraco.com/skeleton
1919

2020
.. image:: https://tidelift.com/badges/package/pypi/jaraco.collections

contrib/python/jaraco.collections/jaraco/collections/__init__.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import random
99
import re
1010
from collections.abc import Container, Iterable, Mapping
11-
from typing import TYPE_CHECKING, Any, Callable, Dict, TypeVar, Union, overload
11+
from typing import TYPE_CHECKING, Any, Callable, TypeVar, Union, overload
1212

1313
import jaraco.text
1414

@@ -135,7 +135,7 @@ def dict_map(function, dictionary):
135135
return dict((key, function(value)) for key, value in dictionary.items())
136136

137137

138-
class RangeMap(Dict[_RangeMapKT, _VT]):
138+
class RangeMap(dict[_RangeMapKT, _VT]):
139139
"""
140140
A dictionary-like object that uses the keys as bounds for a range.
141141
Inclusion of the value for that range is determined by the
@@ -1089,3 +1089,22 @@ def random(self):
10891089
lower, upper = self.bounds()
10901090
selector = random.random() * upper
10911091
return self[selector]
1092+
1093+
1094+
def set_defaults(__anon_self: dict[str, object], /, **defaults) -> None:
1095+
"""
1096+
Sets values on target in source not already in target.
1097+
1098+
Like :meth:`dict.setdefault`, but applies to all keys.
1099+
1100+
>>> target = dict(a=1, c=3)
1101+
>>> set_defaults(target, b=2, c=4)
1102+
>>> target
1103+
{'a': 1, 'c': 3, 'b': 2}
1104+
1105+
The first parameter is bound to a name that's unlikely to
1106+
collide with the keys in defaults.
1107+
1108+
>>> set_defaults(target, target=999)
1109+
"""
1110+
__anon_self.update(Mask(__anon_self.__contains__, defaults))

contrib/python/jaraco.collections/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PY3_LIBRARY()
44

5-
VERSION(5.1.0)
5+
VERSION(5.2.1)
66

77
LICENSE(MIT)
88

0 commit comments

Comments
 (0)