Opened 6 weeks ago

Last modified 4 weeks ago

#27435 new enhancement

py3: failing doctest in with interactive_query

Reported by: dcoudert Owned by:
Priority: major Milestone: sage-8.8
Component: graph theory Keywords: py3, graph
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


sage -t --long src/sage/graphs/
File "src/sage/graphs/", line 1081, in sage.graphs.graph_database.GraphDatabase.interactive_query
Failed example:
    D.interactive_query(display_cols=['graph6', 'num_vertices', 'degree_sequence'], num_edges=5, max_degree=3)
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/", line 1119, in getfullargspec
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/", line 2186, in _signature_from_callable
        raise TypeError('{!r} is not a callable object'.format(obj))
    TypeError: 0 is not a callable object

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/site-packages/sage/doctest/", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/site-packages/sage/doctest/", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.graph_database.GraphDatabase.interactive_query[1]>", line 1, in <module>
        D.interactive_query(display_cols=['graph6', 'num_vertices', 'degree_sequence'], num_edges=Integer(5), max_degree=Integer(3))
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/site-packages/sage/graphs/", line 1087, in interactive_query
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/site-packages/sage/misc/", line 343, in my_wrap
        return func(*args)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/site-packages/sagenb/notebook/", line 2636, in interact
        (args, varargs, varkw, defaults) = inspect.getargspec(f)
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/", line 1073, in getargspec
      File "/Users/dcoudert/sage3/sage/local/lib/python3.6/", line 1125, in getfullargspec
        raise TypeError('unsupported callable') from ex
    TypeError: unsupported callable

Change History (4)

comment:1 Changed 6 weeks ago by dcoudert

I don't know how to fix it.

comment:2 Changed 6 weeks ago by gh-sheldoncooper07

Hi, I am Piyush, I am new to sage, I was wondering if I could be of some help here.

I am not able to replicate this test. Is there something that I am missing? I am using Ubuntu 16.04

$ ./sage -t --long src/sage/graphs/
Running doctests with ID 2019-03-08-11-03-04-40b4d48a.
Git branch: develop
Using --optional=dochtml,memlimit,mpir,python2,sage
Doctesting 1 file.
sage -t --long src/sage/graphs/
    [50 tests, 0.49 s]
All tests passed!
Total time for all tests: 0.6 seconds
    cpu time: 0.5 seconds
    cumulative wall time: 0.5 seconds

comment:3 Changed 6 weeks ago by dcoudert

The problem is with Python 3. We are working hard on the transition from Python 2 to Python 3.

comment:4 Changed 4 weeks ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

Note: See TracTickets for help on using tickets.