sage.features: Remove dependency on sage.misc.lazy_string
Closed this issue · 11 comments
mkoeppe commented
This allows us to package sage.features in a distribution without any dependencies in #29941.
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 9b5535b
Reviewer: Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/32977
mkoeppe commented
mkoeppe commented
Author: Matthias Koeppe
mkoeppe commented
mkoeppe commented
Description changed:
---
+++
@@ -1 +1,2 @@
+This allows us to package `sage.features` in a distribution without any dependencies in #29941.
kwankyu commented
comment:3
Perhaps
diff --git a/src/sage/features/__init__.py b/src/sage/features/__init__.py
index 73511b91a7..2617a13ebc 100644
--- a/src/sage/features/__init__.py
+++ b/src/sage/features/__init__.py
@@ -293,7 +293,7 @@ class FeatureNotPresentError(RuntimeError):
lines.append(self.reason)
resolution = self.resolution
if resolution:
- lines.append(str(resolution))
+ lines.append(resolution)
return "\n".join(lines)mkoeppe commented
comment:4
I kept the str in case some user-defined Feature uses lazy strings
kwankyu commented
Reviewer: Kwankyu Lee
kwankyu commented
comment:5
Replying to @mkoeppe:
I kept the
strin case some user-definedFeatureuses lazy strings
Okay if you intended, though I doubt user-defined Feature is realistic.
Anyway, the branch looks good.
mkoeppe commented
comment:6
Thanks!
vbraun commented
Changed branch from u/mkoeppe/sage_features__remove_dependency_on_sage_misc_lazy_string to 9b5535b