From 1c61d4799438677c7cfaaccf281312bfb1aee9b3 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 8 Jan 2025 17:13:27 +0000 Subject: [PATCH 1/2] Add news fragments for PEP 643 --- newsfragments/4698.feature.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 newsfragments/4698.feature.rst diff --git a/newsfragments/4698.feature.rst b/newsfragments/4698.feature.rst new file mode 100644 index 0000000000..955624ed4c --- /dev/null +++ b/newsfragments/4698.feature.rst @@ -0,0 +1,3 @@ +Implemented ``Dynamic`` field for core metadata (as introduced in PEP 643). +The existing implementation is currently experimental and the exact approach +may change in future releases. From 72c422261b40f2b95a8be6605cc7dd93cec81794 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 8 Jan 2025 17:15:33 +0000 Subject: [PATCH 2/2] Avoid using Any in function --- setuptools/_static.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/_static.py b/setuptools/_static.py index 4ddac2c08e..075a0bcddf 100644 --- a/setuptools/_static.py +++ b/setuptools/_static.py @@ -1,5 +1,5 @@ from functools import wraps -from typing import Any, TypeVar +from typing import TypeVar import packaging.specifiers @@ -170,7 +170,7 @@ def attempt_conversion(value: T) -> T: return _CONVERSIONS.get(type(value), noop)(value) # type: ignore[call-overload] -def is_static(value: Any) -> bool: +def is_static(value: object) -> bool: """ >>> is_static(a := Dict({'a': 1})) True