Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-27 Thread Georgi Guninski
On Tue, Jun 27, 2023 at 8:48 AM John H Palmieri wrote: > > Just do a global search-and-replace: change ".vertices()" to > ".vertices(sort=True, key=id)" or ".vertices(sort=True, key=str)". > Thanks for this. You are right that I knew about the problems with sort(), and sage 9.6 is OK for me

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread John H Palmieri
Just do a global search-and-replace: change ".vertices()" to ".vertices(sort=True, key=id)" or ".vertices(sort=True, key=str)". This is not a new change; the deprecation warning has been in place almost a year, and there was discussion leading up to it. See

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Georgi Guninski
Thanks. In my code, this backwards incompatibility breaks over 150 calls to Graph.vertices() and I suspect I am not the only one. I think the root of the problem is the change from python2 to python3. In python2 |["A",1].sort()| works fine, while it doesn't work in python3. My recommendation is

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Nils Bruin
On Monday, 26 June 2023 at 16:30:20 UTC+2 Georgi Guninski wrote: > As of https://github.com/sagemath/sage/issues/22349, this argument must be explicitly specified (unless a "key" is given); otherwise a warning is printed and "sort=True" is used. The default will eventually be changed to

Re: [sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread Georgi Guninski
On Mon, Jun 26, 2023 at 4:40 PM kcrisman wrote: > As of https://github.com/sagemath/sage/issues/22349, this argument must be > explicitly specified (unless a "key" is given); otherwise a warning is > printed and "sort=True" is used. The default will eventually be changed to > "False". > I

[sage-devel] Re: DeprecationWarning on sagecell in Graph([(0,1)]).vertices()

2023-06-26 Thread kcrisman
On Saturday, June 24, 2023 at 9:20:39 AM UTC-4 Georgi Guninski wrote: https://sagecell.sagemath.org/ Graph([(0,1)]).vertices() /tmp/ipykernel_1853928/1298164553.py:1: DeprecationWarning: parameter 'sort' will be set to False by default in the future See