Download raw body.
relax py-pydantic version requirement on py-pydantic-core
hi,
while working on an update to py-rio-cogeo, runtime testing blowed
strangely:
geo/py-rasterio/ $rio cogeo --help
Warning: entry point could not be loaded. Contact its author for help.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2775, in load
self.require(*args, **kwargs) # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2803, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pkg_resources/__init__.py", line 892, in resolve
dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pkg_resources/__init__.py", line 938, in _resolve_dist
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pydantic-core 2.27.0 (/usr/local/lib/python3.12/site-packages), Requirement.parse('pydantic-core==2.23.4'), {'pydantic'})
digging further i found the 'hard' requirement here:
/usr/local/lib/python3.12/site-packages/pydantic-2.9.2.dist-info/METADATA:Requires-Dist: pydantic-core==2.23.4
seems upstream sets hard requirements between both modules, and recently started enforcing it even more:
https://github.com/pydantic/pydantic/commit/ea3f18dea95e253d300c0a90095bb7005b1da90b
something to fix/comment in the port for forthcoming updates, but for release
maybe this is ok ? it fixes 'rio cogeo' here at least, and i dunno what other
ports having an RDEP on pydantic might be affected by that.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-pydantic/Makefile,v
diff -u -r1.10 Makefile
--- Makefile 21 Dec 2024 11:40:09 -0000 1.10
+++ Makefile 5 Apr 2025 16:24:53 -0000
@@ -3,7 +3,7 @@
MODPY_DISTV = 2.9.2
DISTNAME = pydantic-${MODPY_DISTV}
PKGNAME = py-${DISTNAME}
-REVISION = 0
+REVISION = 1
CATEGORIES = devel
Index: patches/patch-pyproject_toml
===================================================================
RCS file: patches/patch-pyproject_toml
diff -N patches/patch-pyproject_toml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-pyproject_toml 5 Apr 2025 16:24:53 -0000
@@ -0,0 +1,12 @@
+Index: pyproject.toml
+--- pyproject.toml.orig
++++ pyproject.toml
+@@ -50,7 +50,7 @@ dependencies = [
+ 'typing-extensions>=4.6.1; python_version < "3.13"',
+ 'typing-extensions>=4.12.2; python_version >= "3.13"',
+ 'annotated-types>=0.6.0',
+- "pydantic-core==2.23.4",
++ "pydantic-core>=2.23.4",
+ ]
+ dynamic = ['version', 'readme']
+
relax py-pydantic version requirement on py-pydantic-core