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
Warn when creating number fields with non-monic-integral polynomials #14146
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Duplicate of #252. |
comment:4
Jeroen, I suggest the following : let's keep #252 open, because the problem is not fixed (I will take a look at it). In the meantime, let me post a patch here which at least prints a warning when the user runs into this problem (i.e. when a number field with a non-monic or non-integral polynomial is created). I am not the first one to hit this problem, and just printing a warning (or failing more gracefully) would help users. |
This comment has been minimized.
This comment has been minimized.
comment:7
Thanks Charles, this is very good to have! A comment and a question:
I prefer the |
comment:8
I agree with Marco's comments. And don't forget to add your names as Author/Reviewer. |
Author: Charles Bouillaguet |
Reviewer: Marco Streng |
Changed keywords from pari to pari, monic, integral, integer |
comment:11
Replying to @sagetrac-Bouillaguet:
Fine with me. I looked at this in a bit more detail, and have some questions:
|
comment:12
Replying to @mstreng:
And one more: do you have a reason for keeping the commented warning in there? |
Attachment: 14146_number_fields.patch.gz |
comment:14
Replying to @sagetrac-Bouillaguet:
Thanks! And what about the earlier questions? |
This comment has been minimized.
This comment has been minimized.
comment:15
Attachment: 14146_reviewer.patch.gz I did some of the corrections myself that I did not get an answer to:
However, I still don't understand why I get the warning printed twice:
|
comment:16
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:
stacklevel=2:
stacklevel=3:
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. |
comment:17
All tests pass. Positive review to attachment: 14146_number_fields.patch except for what I changed in the reviewer patch. Could someone (Charles?) review my reviewer patch? Thanks! |
comment:18
The reviewer patch is fine. Still, the example given above by Marco is now disallowed. This one :
|
comment:19
Thanks! Replying to @sagetrac-Bouillaguet:
I know, it is too bad. I justified it to myself by noting that it is in line with the absolute case. |
comment:20
This causes a |
Attachment: 14146-doctest.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:22
Replying to @jdemeyer:
Sorry about that. Is testing the whole sage library on shared machines safe again? I relied on patchbot ever since the warnings on sage-devel, and patchbot does not do long tests. |
comment:25
Yes, that has been fixed a while ago. |
comment:26
Replying to @jdemeyer:
Thanks, sorry for not running long tests. I did now, and all tests pass. Only attachment: 14146-doctest.patch needs review. |
Merged: sage-5.10.beta2 |
Add warnings for the problem at #252.
Apply:
Component: number fields
Keywords: pari, monic, integral, integer
Author: Charles Bouillaguet
Reviewer: Marco Streng
Merged: sage-5.10.beta2
Issue created by migration from https://trac.sagemath.org/ticket/14146
The text was updated successfully, but these errors were encountered: