sagemath/sage

sage.symbolic.ring: Remove direct use of cimports from pynac

mkoeppe opened this issue · 15 comments

... by moving functions that need pynac functions or objects to other modules such as sage.symbolic.expression and similar refactoring.

This is preparation for #32386.

CC: @kliem @tscrim @egourgoulhon

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 7618295

Reviewer: Travis Scrimshaw

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

Description changed:

--- 
+++ 
@@ -1,3 +1,4 @@
 ... by moving functions that need pynac functions or objects to other modules such as `sage.symbolic.expression` and similar refactoring.
 
+This is preparation for #32386.
 
comment:2

The symbols are:

GEx, GExprSeq, GExVector, GSymbol,
g_Infinity, g_mInfinity, g_UnsignedInfinity, g_wild,
ex_to_symbol, ginac_new_symbol, ginac_symbol, is_a_symbol,
domain_complex, domain_real, domain_positive, domain_integer,
GEx_to_str_latex

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

414352csage.symbolic.ring: Just import, not cimport the new helper function _latex_Expression
5f39f2bsage.symbolic.ring.is_SymbolicVariable: Import implementation from sage.symbolic.expression
c86ad88sage.symbolic.ring.SymbolicRing._element_constructor_, _force_pyobject: Import implementation from sage.symbolic.expression
73fd88dsage.symbolic.ring.SymbolicRing.wild: Import implementation from sage.symbolic.expression
6a62fa5sage.symbolic.ring.SymbolicRing.symbol: Import implementation from sage.symbolic.expression
7618295sage.symbolic.ring.SymbolicRing._repr_element_: Import implementation from sage.symbolic.expression, remove 'cimport Expression'

Author: Matthias Koeppe

Reviewer: Travis Scrimshaw

comment:6

Green bot => positive review.

kliem commented

Changed commit from 7618295 to none

kliem commented
comment:8

Wrong ticket, sorry.


New commits:

3a954ddSymbolicRing._latex_element_: Go through new function _latex_Expression
414352csage.symbolic.ring: Just import, not cimport the new helper function _latex_Expression
5f39f2bsage.symbolic.ring.is_SymbolicVariable: Import implementation from sage.symbolic.expression
c86ad88sage.symbolic.ring.SymbolicRing._element_constructor_, _force_pyobject: Import implementation from sage.symbolic.expression
73fd88dsage.symbolic.ring.SymbolicRing.wild: Import implementation from sage.symbolic.expression
6a62fa5sage.symbolic.ring.SymbolicRing.symbol: Import implementation from sage.symbolic.expression
7618295sage.symbolic.ring.SymbolicRing._repr_element_: Import implementation from sage.symbolic.expression, remove 'cimport Expression'
kliem commented

Commit: 7618295

comment:9

Patchbot is green. Thanks for reviewing! (#32386 addresses a coverage issue that the patchbot plugin complains about; I hope that's OK.)