* Add type hints to importinfo.py and add repr to ImportInfo * Introduce the preferred_import_style configuration * Add explicit sphinx.configuration key * Python3.13 compat * Adapt conditional for Python 3.14 * Isolate tests that uses external_fixturepkg into a venv * Check for ast.Attributes when finding occurrences in fstrings * add validation to refuse Rename refactoring to a python keyword * Match on module aliases for autoimport suggestions * Remove dependency on build package being installed while running tests * Improved function parser to use ast parser instead of Worder - Add patch use-venv-executable-for-uninstall.patch: * Do not system pip to uninstall external_fixturepkg. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rope?expand=0&rev=65
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From bd57ab3c2fd6052d10a0000e80009bdb3df54b68 Mon Sep 17 00:00:00 2001
|
|
From: Steve Kowalik <steven@wedontsleep.org>
|
|
Date: Thu, 6 Nov 2025 14:38:59 +1100
|
|
Subject: [PATCH] Do not use sys.executable for pip uninstall
|
|
|
|
The system executable might be an externally managed environment[1],
|
|
which means pip then refuses to uninstall the installed package, and it
|
|
bubbles up as a teardown error. Use the venv to avoid that.
|
|
|
|
1: https://packaging.python.org/en/latest/specifications/externally-managed-environments/
|
|
---
|
|
ropetest/conftest.py | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ropetest/conftest.py b/ropetest/conftest.py
|
|
index 30af57e8..819c70ab 100644
|
|
--- a/ropetest/conftest.py
|
|
+++ b/ropetest/conftest.py
|
|
@@ -105,4 +105,11 @@ def external_fixturepkg(session_venv, session_venv_python_executable):
|
|
"ropetest-package-fixtures/external_fixturepkg/dist/external_fixturepkg-1.0.0-py3-none-any.whl",
|
|
])
|
|
yield
|
|
- check_call([sys.executable, "-m", "pip", "uninstall", "--yes", "external-fixturepkg"])
|
|
+ check_call([
|
|
+ session_venv_python_executable,
|
|
+ "-m",
|
|
+ "pip",
|
|
+ "uninstall",
|
|
+ "--yes",
|
|
+ "external-fixturepkg"
|
|
+ ])
|