public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Nowa Ammerlaan" <nowa@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/rope/, dev-python/rope/files/
Date: Thu, 02 Jan 2025 15:20:47 +0000 (UTC)	[thread overview]
Message-ID: <1735831192.9eca25c48c05a415754882e34bf88d5961006bd5.nowa@gentoo> (raw)

commit:     9eca25c48c05a415754882e34bf88d5961006bd5
Author:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  2 14:26:16 2025 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> 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 <nowa <AT> 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
+)


             reply	other threads:[~2025-01-02 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 15:20 Nowa Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-26  8:36 [gentoo-commits] repo/gentoo:master commit in: dev-python/rope/, dev-python/rope/files/ Michał Górny
2021-04-06  7:22 Michał Górny
2020-02-17 15:55 Matt Turner
2015-11-10 16:08 Ian Delaney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1735831192.9eca25c48c05a415754882e34bf88d5961006bd5.nowa@gentoo \
    --to=nowa@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox