From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2CF3715813A for ; Thu, 02 Jan 2025 15:20:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE280E0823; Thu, 02 Jan 2025 15:20:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B1E38E0823 for ; Thu, 02 Jan 2025 15:20:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37C4733FE7D for ; Thu, 02 Jan 2025 15:20:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3CFFC1732 for ; Thu, 02 Jan 2025 15:20:47 +0000 (UTC) From: "Nowa Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nowa Ammerlaan" Message-ID: <1735831192.9eca25c48c05a415754882e34bf88d5961006bd5.nowa@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/rope/, dev-python/rope/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/rope/files/rope-1.13.0-python3.13.patch dev-python/rope/rope-1.13.0-r1.ebuild X-VCS-Directories: dev-python/rope/files/ dev-python/rope/ X-VCS-Committer: nowa X-VCS-Committer-Name: Nowa Ammerlaan X-VCS-Revision: 9eca25c48c05a415754882e34bf88d5961006bd5 X-VCS-Branch: master Date: Thu, 02 Jan 2025 15:20:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1648e124-6f62-415b-b9a3-cc95e5d250dd X-Archives-Hash: a69ca2c4dabef2f2d537191d74a39084 commit: 9eca25c48c05a415754882e34bf88d5961006bd5 Author: Nowa Ammerlaan gentoo org> AuthorDate: Thu Jan 2 14:26:16 2025 +0000 Commit: Nowa Ammerlaan gentoo org> CommitDate: Thu Jan 2 15:19:52 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eca25c4 dev-python/rope: patch and enable python3.13 Signed-off-by: Nowa Ammerlaan gentoo.org> dev-python/rope/files/rope-1.13.0-python3.13.patch | 55 ++++++++++++++++++++++ dev-python/rope/rope-1.13.0-r1.ebuild | 48 +++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/dev-python/rope/files/rope-1.13.0-python3.13.patch b/dev-python/rope/files/rope-1.13.0-python3.13.patch new file mode 100644 index 000000000000..6c1e6deb47a4 --- /dev/null +++ b/dev-python/rope/files/rope-1.13.0-python3.13.patch @@ -0,0 +1,55 @@ +diff --git a/rope/base/oi/type_hinting/utils.py b/rope/base/oi/type_hinting/utils.py +index b0a7aff97..2381c8472 100644 +--- a/rope/base/oi/type_hinting/utils.py ++++ b/rope/base/oi/type_hinting/utils.py +@@ -1,6 +1,7 @@ + from __future__ import annotations + + import logging ++import sys + from typing import TYPE_CHECKING, Optional, Union + + import rope.base.utils as base_utils +@@ -81,7 +82,10 @@ def resolve_type( + """ + Find proper type object from its name. + """ +- deprecated_aliases = {"collections": "collections.abc"} ++ if sys.version_info < (3, 13): ++ deprecated_aliases = {"collections": "collections.abc"} ++ else: ++ deprecated_aliases = {"collections": "_collections_abc"} + ret_type = None + logging.debug("Looking for %s", type_name) + if "." not in type_name: + +diff --git a/rope/contrib/autoimport/sqlite.py b/rope/contrib/autoimport/sqlite.py +index 54a6d03cf..f06fdaca3 100644 +--- a/rope/contrib/autoimport/sqlite.py ++++ b/rope/contrib/autoimport/sqlite.py +@@ -569,14 +569,17 @@ def filter_folders(folder: Path) -> bool: + return list(OrderedDict.fromkeys(folder_paths)) + + def _safe_iterdir(self, folder: Path): +- dirs = folder.iterdir() +- while True: +- try: +- yield next(dirs) +- except PermissionError: +- pass +- except StopIteration: +- break ++ try: ++ dirs = folder.iterdir() ++ while True: ++ try: ++ yield next(dirs) ++ except PermissionError: ++ pass ++ except StopIteration: ++ break ++ except PermissionError: ++ pass + + def _get_available_packages(self) -> List[Package]: + packages: List[Package] = [ diff --git a/dev-python/rope/rope-1.13.0-r1.ebuild b/dev-python/rope/rope-1.13.0-r1.ebuild new file mode 100644 index 000000000000..33e3ad7738ee --- /dev/null +++ b/dev-python/rope/rope-1.13.0-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python refactoring library" +HOMEPAGE=" + https://pypi.org/project/rope/ + https://github.com/python-rope/rope/ +" + +LICENSE="LGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="doc" + +RDEPEND=" + >=dev-python/pytoolconfig-1.2.2[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/build[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + # https://github.com/python-rope/rope/pull/809 + "${FILESDIR}/${PN}-1.13.0-python3.13.patch" +) + +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # our venv style confuses this comparison + ropetest/contrib/autoimport/utilstest.py::test_get_package_source_typing + ropetest/contrib/autoimport/utilstest.py::test_get_package_tuple_typing + ropetest/contrib/autoimport/utilstest.py::test_get_package_tuple_compiled + # TODO + ropetest/contrib/autoimport/autoimporttest.py::TestQueryUsesIndexes::test_search_by_name_like_uses_index + ropetest/contrib/autoimport/autoimporttest.py::TestQueryUsesIndexes::test_search_module_like_uses_index +)