From 247bad98a19f9c8ea03e292a32741ca26ca8eb71 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 16:23:38 -0800 Subject: [PATCH 1/3] src/.relint.yml (namespace_pkg_all_import): Skip all.py, upgrade from warning to error again --- src/.relint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/.relint.yml b/src/.relint.yml index 617c086c109..87356f436e8 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -50,5 +50,6 @@ Hint: or use 'sage --fiximports' to fix automatically in the source file. # Keep in sync with SAGE_ROOT/src/sage/misc/replace_dot_all.py pattern: 'from\s+sage(|[.](arith|categories|combinat|ext|graphs(|[.]decompositions)|interfaces|libs|matrix|misc|numerical(|[.]backends)|rings(|[.]finite_rings)|sets))[.]all\s+import' - filePattern: '.*[.](py|pyx|pxi)$' + # imports from .all are allowed in all.py + filePattern: '(.*/|)(?!all)[^/.]*[.](py|pyx|pxi)$' error: false # Make this a warning instead of an error for now From d2be51938d9f5a39e62276cc05cfefc01a5bc58a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 19:54:08 -0800 Subject: [PATCH 2/3] src/.relint.yml: Allow .all imports in some modules src/.relint.yml: Allow .all imports in some more modules fixup --- src/.relint.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/.relint.yml b/src/.relint.yml index 87356f436e8..2c9faa323a7 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -50,6 +50,5 @@ Hint: or use 'sage --fiximports' to fix automatically in the source file. # Keep in sync with SAGE_ROOT/src/sage/misc/replace_dot_all.py pattern: 'from\s+sage(|[.](arith|categories|combinat|ext|graphs(|[.]decompositions)|interfaces|libs|matrix|misc|numerical(|[.]backends)|rings(|[.]finite_rings)|sets))[.]all\s+import' - # imports from .all are allowed in all.py - filePattern: '(.*/|)(?!all)[^/.]*[.](py|pyx|pxi)$' - error: false # Make this a warning instead of an error for now + # imports from .all are allowed in all.py; also allow in some modules that need sage.all + filePattern: '(.*/|)(?!(all|benchmark|dev_tools|parsing|sage_eval))[^/.]*[.](py|pyx|pxi)$' From 34586accd3539a0e7550d730cc35cf89900e4204 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Mar 2023 19:38:25 -0700 Subject: [PATCH 3/3] src/sage/rings/polynomial/integer_valued_polynomials.py: Replace .all import --- src/sage/rings/polynomial/integer_valued_polynomials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/integer_valued_polynomials.py b/src/sage/rings/polynomial/integer_valued_polynomials.py index 603cdbf2e38..3df5a101dbc 100644 --- a/src/sage/rings/polynomial/integer_valued_polynomials.py +++ b/src/sage/rings/polynomial/integer_valued_polynomials.py @@ -13,8 +13,8 @@ # https://www.gnu.org/licenses/ # *************************************************************************** from sage.arith.misc import (binomial, factorial) +from sage.categories.algebras import Algebras from sage.categories.rings import Rings -from sage.categories.all import Algebras from sage.categories.realizations import Category_realization_of_parent from sage.combinat.free_module import CombinatorialFreeModule from sage.matrix.constructor import matrix