Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow some imports of RLF to fail #32777

Closed
mkoeppe opened this issue Oct 26, 2021 · 31 comments
Closed

Allow some imports of RLF to fail #32777

mkoeppe opened this issue Oct 26, 2021 · 31 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 26, 2021

The RealLazyField implementation is tied closely to real_mpfr.

We modify some imports for the purpose of modularization, in particular sagemath-polyhedra (#32432)

In particular for ... is RLF tests:

$ git grep 'is RLF'
src/sage/rings/complex_double.pyx:        if S is ZZ or S is QQ or S is RDF or S is RLF:
src/sage/rings/number_field/number_field_base.pyx:        if codomain is AA or codomain is RLF:
src/sage/rings/real_double.pyx:        if S is ZZ or S is QQ or S is RLF:
src/sage/schemes/plane_conics/con_number_field.py:                if not (isinstance(p, Map) and p.category_for().is_subcategory(Rings())) or p.codomain() is AA or p.codomain() is RLF:

Depends on #32742
Depends on #32750
Depends on #32733

CC: @kliem @tscrim @sagetrac-tmonteil

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: b49bbdf

Reviewer: Travis Scrimshaw

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

@mkoeppe mkoeppe added this to the sage-9.5 milestone Oct 26, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

Dependencies: #32742

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

Last 10 new commits:

b3c1667Merge #32758
ce8687bMerge #32612
15884f3src/sage/matrix/matrix_space.py: Import element classes on demand, fall back to generic on ImportError
ac58286Matrix.gram_schmidt: Use sage.rings.abc
6d4ee6eMatrix.gram_schmidt: Use sage.rings.abc (fixup)
a1362eeMerge #32635
c53d15dMerge #32742
26df548src/sage/rings/number_field/number_field_base.pyx: Handle failing import of AA, RLF
054a8a6src/sage/rings/real_double.pyx: Handle failing import of RLF, RR
5ff97b1src/sage/schemes/plane_conics/con_number_field.py: Move imports of RLF, AA into methods

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

Commit: 5ff97b1

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 28, 2021

comment:5

This failure is not from this ticket:

sage -t --long --random-seed=321172385432269463934777057410284981568 src/sage/rings/integer.pyx  # 1 doctest failed

This failure is likely from random seed fuzzing, not this ticket:

sage -t --long --random-seed=321172385432269463934777057410284981568 src/sage/rings/polynomial/multi_polynomial_ring_base.pyx  # 1 doctest failed

reported in #32544.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2021

Changed commit from 5ff97b1 to bda5ef8

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

bda5ef8Merge tag '9.5.beta5' into t/32777/allow_some_imports_of_rlf_to_fail

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 4, 2021

Changed commit from bda5ef8 to 59b67d3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 4, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

35cdcffsrc/sage/groups/misc_gps/argument_groups.py: Remove unused imports
59b67d3src/sage/schemes/projective/projective_morphism.py: Remove unused imports

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 4, 2021

comment:9

One green bot; one bot that's not feeling well

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Nov 4, 2021

comment:10

Replying to @mkoeppe:

One green bot; one bot that's not feeling well

I stopped all my patchbots.

@tscrim
Copy link
Collaborator

tscrim commented Nov 6, 2021

Reviewer: Travis Scrimshaw

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 6, 2021

comment:12

Thank you!

@vbraun
Copy link
Member

vbraun commented Nov 7, 2021

comment:13

Merge conflict

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 7, 2021

Changed dependencies from #32742 to #32742, #32750

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 7, 2021

Changed commit from 59b67d3 to c219c17

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 7, 2021

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

96a778bsrc/sage/schemes/elliptic_curves/constructor.py: Use sage.rings.abc.pAdicField
b672836src/sage/schemes/hyperelliptic_curves: Use sage.rings.abc.pAdicField
e1412c7src/sage/schemes/projective/projective_morphism.py: Use sage.rings.abc.pAdicField
fc7025asrc/sage/rings/padics/generic_nodes.py: Update doctests with deprecation warning output
070d05bsrc/sage/schemes/projective/projective_morphism.py: Avoid merge conflict
59271be32750: added missing imports
0a1b9acsrc/sage/rings/padics/generic_nodes.py: Remove unused imports
c46eb46Merge #32665
03b24bdsrc/sage/schemes/berkovich/berkovich_space.py: Whitespace fix
c219c17Merge #32750

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 7, 2021

comment:17

trivial merge

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 12, 2021

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

8b888e0Merge tag '9.5.beta6' into t/32777/allow_some_imports_of_rlf_to_fail

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 12, 2021

Changed commit from c219c17 to 8b888e0

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 12, 2021

comment:19

Trivial merge with 9.5.beta6

@vbraun
Copy link
Member

vbraun commented Nov 14, 2021

comment:20

It was already merged, but then the branch changed and now its a merge conflict

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2021

Changed commit from 8b888e0 to c219c17

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 14, 2021

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 14, 2021

comment:23

Sorry. Back to the previous commit.

@vbraun
Copy link
Member

vbraun commented Nov 15, 2021

comment:25

still merge conflict

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2021

Changed commit from c219c17 to b49bbdf

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 15, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

5fe8aa6src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx: Avoid imports from .all
6d5ec0agit grep -l 'all import cached' src/sage | xargs sed -E -i.bak $'s/^( *)from sage.*all import (cached_[a-z]*) *$/\1from sage.misc.cachefunc import \2/'
299bd0cgit grep -l 'all import .*Integer' src/sage | xargs sed -E -i.bak $'s/^( *)from sage.*all import Integer *$/\1from sage.rings.integer import Integer/'
54fa2eegit grep -l 'all import .*GF' src/sage | xargs sed -E -i.bak $'s/^( *)from sage.*all import GF *$/\1from sage.rings.finite_rings.finite_field_constructor import GF/'
f9182b4Merge tag '9.5.beta5' into t/32733/remove_more__all_imports
2ce2751src/sage/interacts/library.py: Remove unused imports
23d8441src/sage/interacts/library.py: suppress pyflakes warning
48360b7src/sage/libs/eclib/interface.py: Remove unused import
e2d1765Merge tag '9.5.beta6' into t/32733/remove_more__all_imports
b49bbdfMerge #32733

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 15, 2021

Changed dependencies from #32742, #32750 to #32742, #32750, #32733

@vbraun
Copy link
Member

vbraun commented Dec 5, 2021

Changed branch from u/mkoeppe/allow_some_imports_of_rlf_to_fail to b49bbdf

@vbraun vbraun closed this as completed in 0b5e454 Dec 5, 2021
mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants