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

multi_polynomial_ideal.py:2557: DeprecationWarning: non-integer arguments to randrange() have been deprecated since Python 3.10 #34202

Closed
maxale opened this issue Jul 20, 2022 · 3 comments

Comments

@maxale
Copy link
Contributor

maxale commented Jul 20, 2022

The following code results in

multi_polynomial_ideal.py:2557: DeprecationWarning: non-integer arguments to randrange() have been deprecated since Python 3.10 and will be removed in a subsequent version

R.<x,y,z> = PolynomialRing(AA)
J = R.ideal([ x+y^2+z^3-8, 2*x^2+y^3+z^4-8, 4*x^3+y^4+z^5-8] )
J.variety()

Component: algebra

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

@maxale maxale added this to the sage-9.7 milestone Jul 20, 2022
@DaveWitteMorris
Copy link
Member

comment:1

What version of sage are you using? (And what is your operating system?) The problem may have been fixed by #33234, which I think was merged in version 9.7.beta1.

@maxale
Copy link
Contributor Author

maxale commented Jul 23, 2022

comment:2

I see it in Sage 9.6 and at https://sagecell.sagemath.org

The fix in #33234 seems to apply only to real_roots.pyx but not to multi_polynomial_ideal.py

@DaveWitteMorris
Copy link
Member

comment:3

Thanks for the additional information. I was able reproduce the error in 9.6, and also verify that it does not occur in 9.7.beta5. The full deprecation message makes it pretty clear that the one-variable function f.univariate_polynomial().roots is being called:

<snip>/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py:2557:
DeprecationWarning: non-integer arguments to randrange() have been deprecated 
since Python 3.10 and will be removed in a subsequent version
  roots = f.univariate_polynomial().roots(ring=ring, multiplicities=False)

So this is a duplicate of #33234.

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