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

phitigra error with hold_canvas #33928

Closed
sagetrac-tmonteil mannequin opened this issue May 28, 2022 · 14 comments
Closed

phitigra error with hold_canvas #33928

sagetrac-tmonteil mannequin opened this issue May 28, 2022 · 14 comments

Comments

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented May 28, 2022

While testing 9.6 for the next release of SDL, phitigra shows errors involving the hold_canvas method. It should probably be fixed upstream (the upstream developer is in cc).

sagemath@debian:/opt/sagemath/sage-9.6$ ./sage -t --long --random-seed=220977816658885637174790555079465548143 src/sage/graphs/graph_editor.py 
Running doctests with ID 2022-05-28-15-03-40-6305bdae.
Git branch: develop
Using --optional=4ti2,barvinok,benzene,bliss,buckygen,ccache,coxeter3,cryptominisat,csdp,cunningham_tables,cylp,d3js,debian,debugpy,dot2tex,e_antic,fricas,frobby,gap_jupyter,gap_packages,glucose,igraph,info,jupymake,kenzo,latte_int,libogg,libsemigroups,lidia,mathics,mathics_scanner,mcqd,meataxe,mpfrcx,normaliz,notedown,palettable,pandoc_attributes,pari_elldata,pari_galpol,pari_jupyter,pari_nftables,pari_seadata,pint,pip,plantri,polylib,polymake,pycosat,pycryptosat,pynormaliz,pysingular,python_igraph,rst2ipynb,rubiks,saclib,sage,sage_numerical_backends_coin,sage_spkg,singular_jupyter,sip,sirocco,symengine,symengine_py,tdlib,texttable,tides,topcom
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,gfan,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,nauty,palp,pandoc,pdf2svg,pdftocairo,phitigra,plantri,polytopes_db,polytopes_db_4d,pynormaliz,python_igraph,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.plot,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib
Doctesting 1 file.
sage -t --long --warn-long 60.1 --random-seed=220977816658885637174790555079465548143 src/sage/graphs/graph_editor.py
**********************************************************************
File "src/sage/graphs/graph_editor.py", line 48, in sage.graphs.graph_editor.graph_editor
Failed example:
    e = graph_editor()            # optional - phitigra
Expected nothing
Got:
    doctest:warning
      File "/opt/sagemath/sage-9.6/src/bin/sage-runtests", line 151, in <module>
        err = DC.run()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/control.py", line 1347, in run
        self.run_doctests()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/control.py", line 1048, in run_doctests
        self.dispatcher.dispatch()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 2019, in dispatch
        self.parallel_dispatch()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1914, in parallel_dispatch
        w.start()  # This might take some time
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 2188, in start
        super(DocTestWorker, self).start()
      File "/usr/lib/python3.9/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
      File "/usr/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/lib/python3.9/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
        self._launch(process_obj)
      File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71, in _launch
        code = process_obj._bootstrap(parent_sentinel=child_r)
      File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 2160, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 2490, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 2542, in _run
        result = runner.run(test)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 866, in run
        return self._run(test, compileflags, out)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.graph_editor.graph_editor[0]>", line 1, in <module>
        e = graph_editor()            # optional - phitigra
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/graphs/graph_editor.py", line 81, in graph_editor
        return GraphEditor(graph, **display_options)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/phitigra/graph_editor.py", line 495, in __init__
        self.refresh()
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/phitigra/graph_editor.py", line 1465, in refresh
        with hold_canvas(self._multi_canvas):
      File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
        return next(self.gen)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/ipycanvas/canvas.py", line 1783, in hold_canvas
        warnings.warn(
      File "/usr/lib/python3.9/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: hold_canvas does not take a canvas as parameter anymore, please use hold_canvas() instead.
**********************************************************************
1 item had failures:
   1 of   9 in sage.graphs.graph_editor.graph_editor
    [8 tests, 1 failure, 0.41 s]
----------------------------------------------------------------------
sage -t --long --warn-long 60.1 --random-seed=220977816658885637174790555079465548143 src/sage/graphs/graph_editor.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.5 seconds
    cpu time: 0.4 seconds
    cumulative wall time: 0.4 seconds
Features detected for doctesting: phitigra

Upstream: Reported upstream. Developers acknowledge bug.

CC: @jfraymond @dcoudert @mkoeppe @kwankyu @kcrisman

Component: packages: optional

Keywords: sdl

Author: Jean-Florent Raymond

Branch/Commit: 1f37f39

Reviewer: Travis Scrimshaw

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

@sagetrac-tmonteil sagetrac-tmonteil mannequin added this to the sage-9.7 milestone May 28, 2022
@sagetrac-tmonteil

This comment has been minimized.

@sagetrac-tmonteil
Copy link
Mannequin Author

sagetrac-tmonteil mannequin commented May 28, 2022

Upstream: Reported upstream. No feedback yet.

@sagetrac-tmonteil
Copy link
Mannequin Author

sagetrac-tmonteil mannequin commented May 31, 2022

Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

@jfraymond
Copy link

comment:3

The problem was due to a change in one of the libraries that I was using and was easy to fix.
The test in the description of the ticket passed successfully on my computer with the new version of phitigra (0.2.6) that I just uploaded on pypi.

@tscrim
Copy link
Collaborator

tscrim commented Jun 22, 2022

comment:4

We will also need a branch that tells Sage to use the newer version IIRC.

@jfraymond
Copy link

Commit: 1f37f39

@jfraymond
Copy link

Author: Jean-Florent Raymond

@jfraymond
Copy link

@jfraymond
Copy link

comment:5

I added a version requirement in
build/pkgs/phitigra/requirements.txt.


New commits:

1f37f3933928: added version requirement for optional package phitigra

@videlec
Copy link
Contributor

videlec commented Jun 25, 2022

comment:6

Is the component really padics!?

@sagetrac-tmonteil
Copy link
Mannequin Author

sagetrac-tmonteil mannequin commented Jun 25, 2022

comment:8

Replying to @videlec:

Is the component really padics!?

Of course not, i slipped when clicking on "packages optional".

@tscrim
Copy link
Collaborator

tscrim commented Jun 27, 2022

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Jun 27, 2022

comment:9

LGTM.

@vbraun
Copy link
Member

vbraun commented Jul 9, 2022

Changed branch from u/gh-jfraymond/33928_phitigra_version_requirement to 1f37f39

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

4 participants