Date: Thu, 11 Jun 2026 20:57:05 +0000 From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: c3689921ca52 - main - devel/py-traittypes: update 0.=?utf-8?Q?2.1 =E2=86=92?= 0.2.3 Message-ID: <6a2b2121.2432a.3b301878@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=c3689921ca52d37e54b11952832cc4e3dc8394fe commit c3689921ca52d37e54b11952832cc4e3dc8394fe Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2026-06-11 20:43:49 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2026-06-11 20:56:55 +0000 devel/py-traittypes: update 0.2.1 → 0.2.3 --- devel/py-traittypes/Makefile | 13 +++++++++---- devel/py-traittypes/distinfo | 6 +++--- .../patch-traittypes_tests_test__traittypes.py | 16 ++++++++++++++++ .../files/patch-traittypes_traittypes.py | 22 ++++++++++++++++++++++ 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/devel/py-traittypes/Makefile b/devel/py-traittypes/Makefile index 672cb0b7d7bd..6740953c7b7f 100644 --- a/devel/py-traittypes/Makefile +++ b/devel/py-traittypes/Makefile @@ -1,6 +1,5 @@ PORTNAME= traittypes -DISTVERSION= 0.2.1 -PORTREVISION= 1 +DISTVERSION= 0.2.3 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,12 +11,18 @@ WWW= https://github.com/jupyter-widgets/traittypes LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}traitlets>=4.2.2:devel/py-traitlets@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xarray>0:devel/py-xarray@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=0:math/py-numpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pandas>=0:math/py-pandas@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xarray>0:devel/py-xarray@${PY_FLAVOR} USES= python -USE_PYTHON= distutils autoplist pytest # 1 test fails due to nose issues: ModuleNotFoundError: No module named 'ConfigParser +USE_PYTHON= autoplist pep517 pytest NO_ARCH= yes +# tests as of 0.2.3: 28 passed + .include <bsd.port.mk> diff --git a/devel/py-traittypes/distinfo b/devel/py-traittypes/distinfo index 28218b56045d..bd4eff5d3954 100644 --- a/devel/py-traittypes/distinfo +++ b/devel/py-traittypes/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1673222668 -SHA256 (traittypes-0.2.1.tar.gz) = be6fa26294733e7489822ded4ae25da5b4824a8a7a0e0c2dccfde596e3489bd6 -SIZE (traittypes-0.2.1.tar.gz) = 13544 +TIMESTAMP = 1781204221 +SHA256 (traittypes-0.2.3.tar.gz) = 212feed38d566d772648768b78d3347c148ef23915b91c02078188e631316c86 +SIZE (traittypes-0.2.3.tar.gz) = 16003 diff --git a/devel/py-traittypes/files/patch-traittypes_tests_test__traittypes.py b/devel/py-traittypes/files/patch-traittypes_tests_test__traittypes.py new file mode 100644 index 000000000000..5e222fe12585 --- /dev/null +++ b/devel/py-traittypes/files/patch-traittypes_tests_test__traittypes.py @@ -0,0 +1,16 @@ +-- Fix compatibility with newer versions of pandas in tests +-- +--- traittypes/tests/test_traittypes.py.orig 2026-06-11 19:38:02 UTC ++++ traittypes/tests/test_traittypes.py +@@ -166,9 +166,9 @@ class TestSeries(TestCase): + c = Series([]) + d = Series(Undefined) + foo = Foo() +- self.assertTrue(foo.a.equals(pd.Series())) ++ self.assertTrue(foo.a.equals(pd.Series(dtype=foo.a.dtype))) + self.assertTrue(foo.b is None) +- self.assertTrue(foo.c.equals(pd.Series([]))) ++ self.assertTrue(foo.c.equals(pd.Series([], dtype=foo.c.dtype))) + self.assertTrue(foo.d is Undefined) + + def test_allow_none(self): diff --git a/devel/py-traittypes/files/patch-traittypes_traittypes.py b/devel/py-traittypes/files/patch-traittypes_traittypes.py new file mode 100644 index 000000000000..ff836efad1e0 --- /dev/null +++ b/devel/py-traittypes/files/patch-traittypes_traittypes.py @@ -0,0 +1,22 @@ +-- Fix compatibility with newer versions of pandas and xarray +-- +--- traittypes/traittypes.py.orig 2026-06-11 19:36:11 UTC ++++ traittypes/traittypes.py +@@ -141,7 +141,7 @@ class PandasType(SciType): + if value is None or value is Undefined: + return super(PandasType, self).validate(obj, value) + try: +- value = self.klass(value) ++ if not isinstance(value, self.klass): value = self.klass(value) + except (ValueError, TypeError) as e: + raise TraitError(e) + return super(PandasType, self).validate(obj, value) +@@ -226,7 +226,7 @@ class XarrayType(SciType): + if value is None or value is Undefined: + return super(XarrayType, self).validate(obj, value) + try: +- value = self.klass(value) ++ if not isinstance(value, self.klass): value = self.klass(value) + except (ValueError, TypeError) as e: + raise TraitError(e) + return super(XarrayType, self).validate(obj, value)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a2b2121.2432a.3b301878>
