Skip to content

Commit 49c2cd3

Browse files
author
Release Manager
committed
gh-35107: sage.{finance,interacts,libs,numerical,stats,tests}: Replace imports from sage.*.all for namespace packages
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description Fixes #34957 <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> URL: #35107 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik, Tobias Diez
2 parents b82f457 + a123603 commit 49c2cd3

30 files changed

+84
-67
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=81dde9cfffd7aab81def87cdb9df95d68df3a7e0
3-
md5=6c7050003c660cecb9363b802a8a7f63
4-
cksum=658724891
2+
sha1=d593e6b130ad78162b7efaf18f9be312ca49fc8f
3+
md5=5bae34229686080975fd118ef2deff08
4+
cksum=3618148381
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c36342c98a8b9a82feb84759676d74d6815a4840
1+
fcbf5470c0bdd7ae51eff141bb3961a2a73b293e

src/sage/finance/fractal.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ AUTHOR:
2121
- William Stein (2008)
2222
"""
2323

24-
from sage.rings.all import RDF, CDF, Integer
24+
from sage.rings.real_double import RDF
25+
from sage.rings.complex_double import CDF
26+
from sage.rings.integer import Integer
2527
from sage.modules.free_module_element import vector
2628
I = CDF.gen()
2729

src/sage/interacts/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def html(obj):
161161
sage: html("<h1>Hello world</h1>")
162162
<h1>Hello world</h1>
163163
"""
164-
from sage.all import html
164+
from sage.misc.html import html
165165
pretty_print(html(obj))
166166

167167

@@ -1301,7 +1301,7 @@ def simpson_integration(
13011301
else:
13021302
interval = interval_g[0]
13031303
def parabola(a, b, c):
1304-
from sage.all import solve
1304+
from sage.symbolic.relation import solve
13051305
A, B, C = SR.var("A, B, C")
13061306
K = solve([A*a[0]**2+B*a[0]+C==a[1], A*b[0]**2+B*b[0]+C==b[1], A*c[0]**2+B*c[0]+C==c[1]], [A, B, C], solution_dict=True)[0]
13071307
f = K[A]*x**2+K[B]*x+K[C]

src/sage/libs/arb/arb_version.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8
2-
from sage.libs.arb.arb cimport arb_version
2+
from sage.libs.arb.arb cimport arb_version
33
from sage.cpython.string cimport char_to_str
44

55
def version():

src/sage/libs/coxeter3/coxeter_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from sage.structure.unique_representation import UniqueRepresentation
1616
from sage.structure.element_wrapper import ElementWrapper
1717
from sage.structure.richcmp import richcmp
18-
from sage.categories.all import CoxeterGroups
18+
from sage.categories.coxeter_groups import CoxeterGroups
1919
from sage.structure.parent import Parent
2020

2121
from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix
@@ -37,7 +37,7 @@ def __classcall__(cls, cartan_type, *args, **options):
3737
Coxeter group of type ['B', 3] relabelled by {1: 3, 2: 2, 3: 1} implemented by Coxeter3
3838
3939
"""
40-
from sage.combinat.all import CartanType
40+
from sage.combinat.root_system.cartan_type import CartanType
4141
ct = CartanType(cartan_type)
4242
return super().__classcall__(cls, ct, *args, **options)
4343

src/sage/libs/eclib/homspace.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ from libcpp.map cimport map
88
from ..eclib cimport vec, svec, mat, smat
99
from .mat cimport MatrixFactory
1010

11-
from sage.matrix.all import MatrixSpace
11+
from sage.matrix.matrix_space import MatrixSpace
1212
from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
1313
from sage.rings.integer_ring import ZZ
1414
from sage.rings.integer cimport Integer

src/sage/libs/eclib/mat.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Cremona matrices
44

55
from ..eclib cimport scalar, addscalar
66

7-
from sage.matrix.all import MatrixSpace
7+
from sage.matrix.matrix_space import MatrixSpace
88
from sage.rings.integer_ring import ZZ
99

1010
from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse

src/sage/libs/eclib/mwrank.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -593,20 +593,20 @@ cdef class _mw:
593593
Reducing saturation bound from given value 20 to computed index bound 3
594594
Tamagawa index primes are [ 2 ]
595595
Checking saturation at [ 2 3 ]
596-
Checking 2-saturation
596+
Checking 2-saturation
597597
Points were proved 2-saturated (max q used = 7)
598-
Checking 3-saturation
598+
Checking 3-saturation
599599
Points were proved 3-saturated (max q used = 7)
600600
done
601601
P2 = [-2:3:1] is generator number 2
602602
saturating up to 20...Saturation index bound (for points of good reduction) = 4
603603
Reducing saturation bound from given value 20 to computed index bound 4
604604
Tamagawa index primes are [ 2 ]
605605
Checking saturation at [ 2 3 ]
606-
Checking 2-saturation
606+
Checking 2-saturation
607607
possible kernel vector = [1,1]
608608
This point may be in 2E(Q): [14:-52:1]
609-
...and it is!
609+
...and it is!
610610
Replacing old generator #1 with new generator [1:-1:1]
611611
Reducing index bound from 4 to 2
612612
Points have successfully been 2-saturated (max q used = 7)
@@ -618,9 +618,9 @@ cdef class _mw:
618618
Reducing saturation bound from given value 20 to computed index bound 3
619619
Tamagawa index primes are [ 2 ]
620620
Checking saturation at [ 2 3 ]
621-
Checking 2-saturation
621+
Checking 2-saturation
622622
Points were proved 2-saturated (max q used = 11)
623-
Checking 3-saturation
623+
Checking 3-saturation
624624
Points were proved 3-saturated (max q used = 13)
625625
done, index = 1.
626626
P4 = [-1:3:1] = -1*P1 + -1*P2 + -1*P3 (mod torsion)

src/sage/libs/gap/element.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ from sage.cpython.string cimport str_to_bytes, char_to_str
2727
from sage.misc.cachefunc import cached_method
2828
from sage.structure.sage_object cimport SageObject
2929
from sage.structure.parent import Parent
30-
from sage.rings.all import ZZ, QQ, RDF
30+
from sage.rings.integer_ring import ZZ
31+
from sage.rings.rational_field import QQ
32+
from sage.rings.real_double import RDF
3133

3234
from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement
3335
from sage.combinat.permutation import Permutation

0 commit comments

Comments
 (0)