sagemath/sage

sage.categories: Replace imports from sage.rings.all by more specific imports

Closed this issue · 14 comments

sage.rings.all has a mixture of generic classes and implementation classes. Some of the generic and/or basic ones will probably have to be included in sage-objects (#29865). We prepare this by getting rid of imports from sage.rings.all throughout sage.categories.

CC: @tscrim

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 82676e6

Reviewer: Travis Scrimshaw, Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/29881

comment:1

I have also run into import loops in a subtle way because of stuff importing from rings.all. Strong +1 on doing this broadly. There might be a slight bit of care needed for lazily important objects, but I don't remember if this was an actual issue or how big this is.

Changed dependencies from #29873, #29880 to #29880

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9346d1bsage.categories.*crystals: Replace imports from sage.rings.all by more specific imports
82676e6sage.categories: Replace imports from sage.rings.all by more specific imports

Description changed:

--- 
+++ 
@@ -1,2 +1,2 @@
-`sage.rings.all` has a mixture of generic classes and implementation classes. Some of the generic ones will probably have to be included in `sage-objects` (#29865). We prepare this by getting rid of imports from `sage.rings.all` throughout `sage.categories`.
+`sage.rings.all` has a mixture of generic classes and implementation classes. Some of the generic and/or basic ones will probably have to be included in `sage-objects` (#29865). We prepare this by getting rid of imports from `sage.rings.all` throughout `sage.categories`.
 

Author: Matthias Koeppe

Changed dependencies from #29880 to none

Reviewer: Travis Scrimshaw

comment:7

Green patchbot => positive review.

comment:8

bot is green

Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Frédéric Chapoton

comment:9

Thanks!