Changes between Initial Version and Version 1 of Ticket #28833


Ignore:
Timestamp:
12/02/19 18:28:10 (2 years ago)
Author:
vbraun
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28833

    • Property Component changed from PLEASE CHANGE to graphics
    • Property Type changed from PLEASE CHANGE to defect
  • Ticket #28833 – Description

    initial v1  
     1Python 3 now emits a !ResourceWarning if you use the quick'n dirty `open(...).read()` to read (or write) a file instead of a with context. This leads to lots and lots of test failures of the form:
     2{{{
     3File "src/doc/en/prep/Symbolics-and-Basic-Plotting.rst", line 487, in doc.en.prep.Symbolics-and-Basic-Plotting
     4Failed example:
     5    implicit_plot3d(p, (x, -r, r), (y, -r, r), (z, -r, r), plot_points=50, color='yellow')
     6Expected:
     7    Graphics3d Object
     8Got:
     9    doctest:warning
     10      File "/home/buildbot-sage/slave/sage_git/build/src/bin/sage-runtests", line 179, in <module>
     11        err = DC.run()
     12      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/control.py", line 1238, in run
     13        self.run_doctests()
     14      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/control.py", line 939, in run_do
     15ctests
     16        self.dispatcher.dispatch()
     17      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2033, in dispat
     18ch
     19        self.parallel_dispatch()
     20      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1925, in parall
     21el_dispatch
     22        w.start()  # This might take some time
     23      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2200, in start
     24        super(DocTestWorker, self).start()
     25      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/process.py", line 112, in start
     26        self._popen = self._Popen(self)
     27      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
     28        return _default_context.get_context().Process._Popen(process_obj)
     29      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
     30        return Popen(process_obj)
     31      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
     32        self._launch(process_obj)
     33      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
     34        code = process_obj._bootstrap()
     35      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
     36        self.run()
     37      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2172, in run
     38        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
     39      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2504, in __call
     40__
     41        doctests, extras = self._run(runner, options, results)
     42      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 2553, in _run
     43        result = runner.run(test)
     44      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 897, in run
     45        return self._run(test, compileflags, out)
     46      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
     47        self.compile_and_execute(example, compiler, test.globs)
     48      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compil
     49e_and_execute
     50        exec(compiled, globs)
     51      File "<doctest doc.en.prep.Symbolics-and-Basic-Plotting[45]>", line 1, in <module>
     52        implicit_plot3d(p, (x, -r, r), (y, -r, r), (z, -r, r), plot_points=Integer(50), color='yellow')
     53      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 811, in displayhook
     54        plain_text, rich_output = self._rich_output_formatter(obj, dict())
     55      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 625, in _rich_output_formatter
     56        rich_output = self._call_rich_repr(obj, rich_repr_kwds)
     57      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 585, in _call_rich_repr
     58        return obj._rich_repr_(self)
     59      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/sage/interfaces/tachyon.py", line 138, in __call__
     60        open(modelfile,'w').write(model)
     61      File "/home/buildbot-sage/slave/sage_git/build/local/lib/python3.7/warnings.py", line 110, in _showwarnmsg
     62        msg.file, msg.line)
     63    :
     64    ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/buildbot-sage/slave/sage_git/dot_sage/temp/zen/3222347/tmp_j8lfc7ax.dat' mode='w' encoding='UTF-8'>
     65    Graphics3d Object
     66}}}