update version to 22.2.0

This commit is contained in:
zhuofeng 2023-07-29 09:53:35 +08:00
parent eef8c2a515
commit 40be9832e9
7 changed files with 6 additions and 152 deletions

View File

@ -1,60 +0,0 @@
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

View File

@ -1,26 +0,0 @@
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

View File

@ -1,25 +0,0 @@
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

View File

@ -1,33 +0,0 @@
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

Binary file not shown.

BIN
attrs-22.2.0.tar.gz Normal file

Binary file not shown.

View File

@ -8,17 +8,12 @@ object protocols. \
%bcond_without tests %bcond_without tests
Name: python-attrs Name: python-attrs
Summary: Python attributes without boilerplate Summary: Python attributes without boilerplate
Version: 22.1.0 Version: 22.2.0
Release: 6 Release: 1
License: MIT License: MIT
URL: http://www.attrs.org/ URL: http://www.attrs.org/
Source0: https://github.com/hynek/attrs/archive/%{version}/attrs-%{version}.tar.gz 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
BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
@ -59,9 +54,12 @@ PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib} py.test-3 -v
%{python3_sitelib}/* %{python3_sitelib}/*
%files help %files help
%doc AUTHORS.rst README.rst %doc README.md
%changelog %changelog
* Sat Jul 29 2023 zhuofeng <zhuofeng2@huawei.com> - 22.2.0-1
- update version to 22.2.0
* Thu Feb 16 2023 tanyulong <tanyulong@kylinos.cn> - 22.1.0-6 * Thu Feb 16 2023 tanyulong <tanyulong@kylinos.cn> - 22.1.0-6
- enable check - enable check