summaryrefslogtreecommitdiff
path: root/dev-python/lsprotocol
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-07-31 03:04:46 -0500
committerroot <root@alpha.trunkmasters.com>2026-07-31 03:04:46 -0500
commit3f283d6a71e35a9c6d89dc73d76f01aec1c1a6b3 (patch)
treebe269d99a452403d508fed631b1bdd5ebdc98d9f /dev-python/lsprotocol
parent0fb86e044f244e00302b1878b3e15e0db0e4b7e5 (diff)
downloadbaldeagleos-repo-3f283d6a71e35a9c6d89dc73d76f01aec1c1a6b3.tar.gz
baldeagleos-repo-3f283d6a71e35a9c6d89dc73d76f01aec1c1a6b3.tar.xz
baldeagleos-repo-3f283d6a71e35a9c6d89dc73d76f01aec1c1a6b3.zip
Adding metadata
Diffstat (limited to 'dev-python/lsprotocol')
-rw-r--r--dev-python/lsprotocol/Manifest1
-rw-r--r--dev-python/lsprotocol/files/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch36
-rw-r--r--dev-python/lsprotocol/lsprotocol-2025.0.0-r1.ebuild52
3 files changed, 89 insertions, 0 deletions
diff --git a/dev-python/lsprotocol/Manifest b/dev-python/lsprotocol/Manifest
index 14f03a15ea4b..11612a64b213 100644
--- a/dev-python/lsprotocol/Manifest
+++ b/dev-python/lsprotocol/Manifest
@@ -1 +1,2 @@
+DIST lsprotocol-2025.0.0.gh.tar.gz 280633 BLAKE2B 56071055d8c23f942ef74bb7e4138546d5d6723bbb4448cc8b91ad435a66c2a328beaa65026b604daf313aa45009b75bb0df4d87a1b11cd6183b270607fd6c97 SHA512 d8b003516aac34e9a78d42235879b38a218133bfd71a06ef5aa829ecbda756ebad1675e8581da7f1d5730a7ff4593e8ea14fa58cf837278f4b6ee9e10b7ad4ce
DIST lsprotocol-2025.0.0.tar.gz 74896 BLAKE2B 7e998352ed256455dc02ba1312ca9cb63ee6ad9cc77ca27f764037d249ce40a80e0860831b18930d399168840a21d86fefb8d443495e5909d76e7958304f889a SHA512 82d99f4176c85e8fcae0bb34d4fb6648d7212467b7b9d4edc108fab46e0b5e63c0e41c70a7d5d5888807115429d28cb59c17ce60abb16def09ec93605e95a6e1
diff --git a/dev-python/lsprotocol/files/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch b/dev-python/lsprotocol/files/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch
new file mode 100644
index 000000000000..1069f979dccc
--- /dev/null
+++ b/dev-python/lsprotocol/files/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch
@@ -0,0 +1,36 @@
+https://github.com/microsoft/lsprotocol/pull/443
+
+From 7b5d4f7422bfe4c597b8124f99861e751d47f153 Mon Sep 17 00:00:00 2001
+From: Aleksandr Dovydenkov <asd@altlinux.org>
+Date: Fri, 26 Sep 2025 10:29:26 +0300
+Subject: [PATCH] Add support cattrs>=25.0.0.
+
+Breaking on update to cattrs version 25.1.0. See: https://catt.rs/en/latest/migrations.html#the-default-structure-hook-fallback-factory
+--- a/packages/python/lsprotocol/converters.py
++++ b/packages/python/lsprotocol/converters.py
+@@ -1,6 +1,7 @@
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+ # Licensed under the MIT License.
+
++from importlib.metadata import version
+ from typing import Optional
+
+ import cattrs
+@@ -8,10 +9,16 @@
+ from . import _hooks
+
+
++def _get_default_converter():
++ if version("cattrs") >= "25.0.0":
++ return cattrs.Converter(structure_fallback_factory=lambda _: cattrs.fns.raise_error)
++ return cattrs.Converter()
++
++
+ def get_converter(
+ converter: Optional[cattrs.Converter] = None,
+ ) -> cattrs.Converter:
+ """Adds cattrs hooks for LSP lsp_types to the given converter."""
+ if converter is None:
+- converter = cattrs.Converter()
++ converter = _get_default_converter()
+ return _hooks.register_hooks(converter)
diff --git a/dev-python/lsprotocol/lsprotocol-2025.0.0-r1.ebuild b/dev-python/lsprotocol/lsprotocol-2025.0.0-r1.ebuild
new file mode 100644
index 000000000000..db1e4f96fe49
--- /dev/null
+++ b/dev-python/lsprotocol/lsprotocol-2025.0.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=flit
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit edo distutils-r1
+
+DESCRIPTION="Language Server Protocol types code generator packages"
+HOMEPAGE="
+ https://github.com/microsoft/lsprotocol
+ https://pypi.org/project/lsprotocol/
+"
+# no tests in sdist
+SRC_URI="
+ https://github.com/microsoft/lsprotocol/archive/refs/tags/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S="${S}/packages/python"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/cattrs[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/pyhamcrest[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/lsprotocol-2025.0.0-fix-against-cattrs-25.0.0.patch
+)
+
+src_prepare() {
+ pushd "${WORKDIR}/${P}" >/dev/null || die
+ default
+ popd >/dev/null || die
+}
+
+python_test() {
+ epytest ../../tests/python
+}