Compare commits
10 Commits
eb6967bf37
...
4f3b448091
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f3b448091 | ||
|
|
772e76a303 | ||
|
|
6632cad0a5 | ||
|
|
bfb5575120 | ||
|
|
b359b8c5a0 | ||
|
|
f8a1441ec9 | ||
|
|
ccbc0724cd | ||
|
|
3443472103 | ||
|
|
3d24f96318 | ||
|
|
ac97bdc845 |
39
0001-Add-citation.patch
Normal file
39
0001-Add-citation.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 0e9a101fc0414a53d72684a053818da96cbe4e6f Mon Sep 17 00:00:00 2001
|
||||
From: Hynek Schlawack <hs@ox.cx>
|
||||
Date: Thu, 28 Jul 2022 15:54:39 +0200
|
||||
Subject: [PATCH] Add citation
|
||||
|
||||
---
|
||||
CITATION.cff | 9 +++++++++
|
||||
MANIFEST.in | 2 +-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
create mode 100644 CITATION.cff
|
||||
|
||||
diff --git a/CITATION.cff b/CITATION.cff
|
||||
new file mode 100644
|
||||
index 0000000..83718ad
|
||||
--- /dev/null
|
||||
+++ b/CITATION.cff
|
||||
@@ -0,0 +1,9 @@
|
||||
+cff-version: 1.2.0
|
||||
+message: If you use this software, please cite it as below.
|
||||
+title: attrs
|
||||
+type: software
|
||||
+authors:
|
||||
+ - given-names: Hynek
|
||||
+ family-names: Schlawack
|
||||
+ email: hs@ox.cx
|
||||
+doi: 10.5281/zenodo.6925130
|
||||
diff --git a/MANIFEST.in b/MANIFEST.in
|
||||
index 3d68bf9..6dbe985 100644
|
||||
--- a/MANIFEST.in
|
||||
+++ b/MANIFEST.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-include LICENSE *.rst *.toml *.yml *.yaml *.ini
|
||||
+include LICENSE *.rst *.toml *.yml *.yaml *.ini CITATION.cff
|
||||
graft .github
|
||||
|
||||
# Stubs
|
||||
--
|
||||
2.33.0
|
||||
|
||||
60
0001-Fix-minor-stub-issues-1072.patch
Normal file
60
0001-Fix-minor-stub-issues-1072.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From b9f35eb2f25fa835ce61af067c20029216a0aeeb Mon Sep 17 00:00:00 2001
|
||||
From: Hynek Schlawack <hs@ox.cx>
|
||||
Date: Tue, 20 Dec 2022 15:10:12 +0100
|
||||
Subject: [PATCH] Fix minor stub issues (#1072)
|
||||
|
||||
---
|
||||
src/attr/__init__.pyi | 8 ++++----
|
||||
src/attr/converters.pyi | 2 +-
|
||||
src/attr/setters.pyi | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/attr/__init__.pyi b/src/attr/__init__.pyi
|
||||
index baa5b2a..42a2ee2 100644
|
||||
--- a/src/attr/__init__.pyi
|
||||
+++ b/src/attr/__init__.pyi
|
||||
@@ -48,17 +48,17 @@ _T = TypeVar("_T")
|
||||
_C = TypeVar("_C", bound=type)
|
||||
|
||||
_EqOrderType = Union[bool, Callable[[Any], Any]]
|
||||
-_ValidatorType = Callable[[Any, Attribute[_T], _T], Any]
|
||||
+_ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any]
|
||||
_ConverterType = Callable[[Any], Any]
|
||||
-_FilterType = Callable[[Attribute[_T], _T], bool]
|
||||
+_FilterType = Callable[["Attribute[_T]", _T], bool]
|
||||
_ReprType = Callable[[Any], str]
|
||||
_ReprArgType = Union[bool, _ReprType]
|
||||
-_OnSetAttrType = Callable[[Any, Attribute[Any], Any], Any]
|
||||
+_OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any]
|
||||
_OnSetAttrArgType = Union[
|
||||
_OnSetAttrType, List[_OnSetAttrType], setters._NoOpType
|
||||
]
|
||||
_FieldTransformer = Callable[
|
||||
- [type, List[Attribute[Any]]], List[Attribute[Any]]
|
||||
+ [type, List["Attribute[Any]"]], List["Attribute[Any]"]
|
||||
]
|
||||
# FIXME: in reality, if multiple validators are passed they must be in a list
|
||||
# or tuple, but those are invariant and so would prevent subtypes of
|
||||
diff --git a/src/attr/converters.pyi b/src/attr/converters.pyi
|
||||
index 0f58088..5abb49f 100644
|
||||
--- a/src/attr/converters.pyi
|
||||
+++ b/src/attr/converters.pyi
|
||||
@@ -1,4 +1,4 @@
|
||||
-from typing import Callable, Optional, TypeVar, overload
|
||||
+from typing import Callable, TypeVar, overload
|
||||
|
||||
from . import _ConverterType
|
||||
|
||||
diff --git a/src/attr/setters.pyi b/src/attr/setters.pyi
|
||||
index 3f5603c..72f7ce4 100644
|
||||
--- a/src/attr/setters.pyi
|
||||
+++ b/src/attr/setters.pyi
|
||||
@@ -1,4 +1,4 @@
|
||||
-from typing import Any, NewType, NoReturn, TypeVar, cast
|
||||
+from typing import Any, NewType, NoReturn, TypeVar
|
||||
|
||||
from . import Attribute, _OnSetAttrType
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
26
0001-Fix-type-docstring.patch
Normal file
26
0001-Fix-type-docstring.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 6b73e8e01564ca60f4c6d8c79d7e5904bef52163 Mon Sep 17 00:00:00 2001
|
||||
From: Hynek Schlawack <hs@ox.cx>
|
||||
Date: Wed, 28 Sep 2022 09:25:16 +0200
|
||||
Subject: [PATCH] Fix type docstring
|
||||
|
||||
Fixes #1031
|
||||
---
|
||||
src/attr/validators.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/attr/validators.py b/src/attr/validators.py
|
||||
index f1f6f24..852ae96 100644
|
||||
--- a/src/attr/validators.py
|
||||
+++ b/src/attr/validators.py
|
||||
@@ -128,7 +128,7 @@ def instance_of(type):
|
||||
`isinstance` therefore it's also valid to pass a tuple of types).
|
||||
|
||||
:param type: The type to check for.
|
||||
- :type type: type or tuple of types
|
||||
+ :type type: type or tuple of type
|
||||
|
||||
:raises TypeError: With a human readable error message, the attribute
|
||||
(of type `attrs.Attribute`), the expected type, and the value it
|
||||
--
|
||||
2.33.0
|
||||
|
||||
25
0001-Fix-typo.patch
Normal file
25
0001-Fix-typo.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 92ef1421b62cd7edcea8980f717b8758a51ac931 Mon Sep 17 00:00:00 2001
|
||||
From: Hynek Schlawack <hs@ox.cx>
|
||||
Date: Thu, 11 Aug 2022 07:11:18 +0200
|
||||
Subject: [PATCH] Fix typo
|
||||
|
||||
---
|
||||
CHANGELOG.rst | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
|
||||
index c61aeb5..6a8d02f 100644
|
||||
--- a/CHANGELOG.rst
|
||||
+++ b/CHANGELOG.rst
|
||||
@@ -312,7 +312,7 @@ Backward-incompatible Changes
|
||||
Changes
|
||||
^^^^^^^
|
||||
|
||||
-- ``attr.define()`` et al now correct detect ``__eq__`` and ``__ne__``.
|
||||
+- ``attr.define()`` et al now correctly detect ``__eq__`` and ``__ne__``.
|
||||
`#671 <https://github.com/python-attrs/attrs/issues/671>`_
|
||||
- ``attr.define()`` et al's hybrid behavior now also works correctly when arguments are passed.
|
||||
`#675 <https://github.com/python-attrs/attrs/issues/675>`_
|
||||
--
|
||||
2.33.0
|
||||
|
||||
33
0001-Update-.gitignore.patch
Normal file
33
0001-Update-.gitignore.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 95e0c423ca31123a9537405fd2de5a1ee9f01b7c Mon Sep 17 00:00:00 2001
|
||||
From: Hynek Schlawack <hs@ox.cx>
|
||||
Date: Sat, 30 Jul 2022 13:23:03 +0200
|
||||
Subject: [PATCH] Update .gitignore
|
||||
|
||||
---
|
||||
.gitignore | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index d054dc6..f5c97f1 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -2,12 +2,16 @@
|
||||
*.pyc
|
||||
.cache
|
||||
.coverage*
|
||||
+.direnv
|
||||
+.envrc
|
||||
.hypothesis
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
.tox
|
||||
+.vscode
|
||||
build
|
||||
dist
|
||||
docs/_build/
|
||||
htmlcov
|
||||
pip-wheel-metadata
|
||||
+tmp
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -9,11 +9,17 @@ object protocols. \
|
||||
Name: python-attrs
|
||||
Summary: Python attributes without boilerplate
|
||||
Version: 22.1.0
|
||||
Release: 1
|
||||
Release: 6
|
||||
License: MIT
|
||||
URL: http://www.attrs.org/
|
||||
Source0: https://github.com/hynek/attrs/archive/%{version}/attrs-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-Update-.gitignore.patch
|
||||
Patch1: 0001-Fix-typo.patch
|
||||
Patch2: 0001-Fix-type-docstring.patch
|
||||
Patch3: 0001-Fix-minor-stub-issues-1072.patch
|
||||
Patch6000: 0001-Add-citation.patch
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
|
||||
@ -57,6 +63,22 @@ PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib} py.test-3 -v
|
||||
%doc AUTHORS.rst README.rst
|
||||
|
||||
%changelog
|
||||
* Tue Jul 18 2023 caofei <caofei@xfusion.com> - 22.1.0-6
|
||||
- Add citation
|
||||
|
||||
* Fri Jan 13 2023 caofei <caofei@xfusion.com> - 22.1.0-5
|
||||
- Fix minor stub issues
|
||||
|
||||
|
||||
* Fri Jan 13 2023 caofei <caofei@xfusion.com> - 22.1.0-4
|
||||
- Fix type docstring
|
||||
|
||||
* Mon Jan 9 2023 caofei <caofei@xfusion.com> - 22.1.0-3
|
||||
- Fix typo
|
||||
|
||||
* Sat Jan 7 2023 caofei <caofei@xfusion.com> - - 22.1.0-2
|
||||
- Update .gitignore
|
||||
|
||||
* Sat Oct 29 2022 zhuofeng <zhuofeng2@huawei.com> - 22.1.0-1
|
||||
- update to 22.1.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user