#14146: Warn when creating number fields with non-monic-integral polynomials
----------------------------------------------------------------+-----------
Reporter: Bouillaguet |
Owner: davidloeffler
Type: defect |
Status: needs_review
Priority: major |
Milestone: sage-5.9
Component: number fields |
Resolution:
Keywords: pari, number field, monic, integral, integer | Work
issues:
Report Upstream: N/A |
Reviewers: Marco Streng
Authors: Charles Bouillaguet | Merged
in:
Dependencies: |
Stopgaps:
----------------------------------------------------------------+-----------
Comment (by mstreng):
I know why the warning is printed twice: the line that caused the warning
is printed, after the warning is printed. You can specify how deep in the
stack this line needs to be found:
Without specifying stacklevel or when giving stacklevel=1:
{{{
/Users/marcostreng/sage-5.9.beta1/local/lib/python2.7/site-
packages/sage/rings/number_field/number_field_rel.py:310: UserWarning:
PARI only handles integral absolute polynomials. Computations in this
field might trigger PARI errors
warn("PARI only handles integral absolute polynomials. Computations in
this field might trigger PARI errors", stacklevel=1)
}}}
stacklevel=2:
{{{
/Users/marcostreng/sage-5.9.beta1/local/lib/python2.7/site-
packages/sage/rings/number_field/number_field.py:4116: UserWarning: PARI
only handles integral absolute polynomials. Computations in this field
might trigger PARI errors
return NumberField_relative(self, poly, str(name), check=check,
embedding=embedding)
}}}
stacklevel=3:
{{{
/Users/marcostreng/sage-5.9.beta1/local/bin/sage-ipython:1: UserWarning:
PARI only handles integral absolute polynomials. Computations in this
field might trigger PARI errors
#!/usr/bin/env python
}}}
Anyway, no value of stacklevel seemed to provide me with anything useful
for .py or .sage files or the IPython console, so we might as well keep it
as it is.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14146#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.