To my mind, this is not the problem. The first command does generate a
warning (fine)

sage: E = Graph([('A','B'),(1,2)]).edges()
<ipython-input-1-28a7859d6cf7>:1: DeprecationWarning: parameter 'sort'
will be set to False by default in the future
See https://github.com/sagemath/sage/issues/27408 for details.

But the EdgesView.__repr__ is buggy (bad)

sage: E
<repr(<sage.graphs.views.EdgesView at 0x7fd82c935720>) failed:
TypeError: unsupported operand parent(s) for <: 'Integer Ring' and
'<class 'str'>'>

I think that either E is broken from start and an error should have
been raised in the first stage or everything is fine and we should
have a proper string representation.

On Wed, 5 Jul 2023 at 08:33, David Coudert <david.coud...@gmail.com> wrote:
>
> There is an active deprecation warning in method edges(). Parameter sort will 
> be set to False in the future. I'm surprised you don't see it.
>
> sage: Graph([('A','B'),(1,2)]).edges()
> <ipython-input-1-266d02e19563>:1: DeprecationWarning: parameter 'sort' will 
> be set to False by default in the future See 
> https://github.com/sagemath/sage/issues/27408 for details.
> Graph([('A','B'),(Integer(1),Integer(2))]).edges() 
> <repr(<sage.graphs.views.EdgesView at 0x1511698a0>) failed: TypeError: 
> unsupported operand parent(s) for <: 'Integer Ring' and '<class 'str'>'>
>
>
> On Tuesday, July 4, 2023 at 4:29:21 PM UTC+2 Vincent Delecroix wrote:
>>
>> https://github.com/sagemath/sage/issues/35897
>>
>> On Tue, 4 Jul 2023 at 16:25, Vincent Delecroix
>> <20100.d...@gmail.com> wrote:
>> >
>> > This is a bug in the __repr__ method of EdgesView. Thanks for your report.
>> >
>> > On Tue, 4 Jul 2023 at 10:52, Georgi Guninski <ggun...@gmail.com> wrote:
>> > >
>> > > Graph([('A','B'),(1,2)]).edges()
>> > > <repr(<sage.graphs.views.EdgesView at 0x7fe9a43c0a00>) failed:
>> > > TypeError: unsupported operand parent(s) for <: 'Integer Ring' and
>> > > '<class 'str'>'>
>> > >
>> > > I think this is related to sorting the edges.
>> > >
>> > > The following works:
>> > > sage: Graph([("A",1),("B",2)]).edges()
>> > > [(1, 'A', None), (2, 'B', None)]
>> > >
>> > > --
>> > > You received this message because you are subscribed to the Google 
>> > > Groups "sage-devel" group.
>> > > To unsubscribe from this group and stop receiving emails from it, send 
>> > > an email to sage-devel+...@googlegroups.com.
>> > > To view this discussion on the web visit 
>> > > https://groups.google.com/d/msgid/sage-devel/CAGUWgD9zHPdu2ifxaMOc%3DEaUN5B9A_v6RmDXMLkFLCvc-Etc0w%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/1ec8c4cf-c0d5-4682-8d10-8e74d0779dfdn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAkSVhbSP7-_HT13NmkNJRdOrp%2B5Zq00p4RH9XQQ1A1Gwg%40mail.gmail.com.

Reply via email to