Sage: Ticket #9828: Upgrade to Cython 0.13
https://trac.sagemath.org/ticket/9828
<p>
<a class="ext-link" href="http://wiki.cython.org/ReleaseNotes-0.13"><span class="icon"></span>Here</a> are the release notes for <a class="ext-link" href="http://www.cython.org/"><span class="icon"></span>Cython</a> 0.13.
</p>
<p>
Apply
</p>
<ul><li><a class="ext-link" href="http://sage.math.washington.edu/home/robertwb/cython/cython-0.13.p1.spkg"><span class="icon"></span>http://sage.math.washington.edu/home/robertwb/cython/cython-0.13.p1.spkg</a>
</li></ul><ul><li><a class="ext-link" href="http://sage.math.washington.edu/home/mpatel/trac/10036/sagenb-0.8.5.spkg"><span class="icon"></span>http://sage.math.washington.edu/home/mpatel/trac/10036/sagenb-0.8.5.spkg</a> (<a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a>'s SageNB 0.8.5 package).
</li></ul><ul><li><a class="attachment" href="https://trac.sagemath.org/attachment/ticket/9828/trac_9828-cython_0_13.patch" title="Attachment 'trac_9828-cython_0_13.patch' in Ticket #9828">trac_9828-cython_0_13.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/9828/trac_9828-cython_0_13.patch" title="Download"></a> to the sage repository.
</li></ul><ul><li><a class="attachment" href="https://trac.sagemath.org/attachment/ticket/9828/trac_9828-scripts_hudson.patch" title="Attachment 'trac_9828-scripts_hudson.patch' in Ticket #9828">trac_9828-scripts_hudson.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/9828/trac_9828-scripts_hudson.patch" title="Download"></a> to the scripts repository.
</li></ul>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/9828
Trac 1.1.6leifWed, 15 Sep 2010 15:55:22 GMTcc changed
https://trac.sagemath.org/ticket/9828#comment:1
https://trac.sagemath.org/ticket/9828#comment:1
<ul>
<li><strong>cc</strong>
<em>leif</em> added
</li>
</ul>
TicketleifWed, 15 Sep 2010 16:56:34 GMT
https://trac.sagemath.org/ticket/9828#comment:2
https://trac.sagemath.org/ticket/9828#comment:2
<pre class="wiki">...
byte-compiling /home/leif/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/Cython/Compiler/Tests/TestBuffer.py to TestBuffer.pyc
running install_scripts
copying build/scripts-2.6/cython -> /home/leif/Sage/sage-4.6.alpha0/local/bin
changing mode of /home/leif/Sage/sage-4.6.alpha0/local/bin/cython to 755
running install_egg_info
Writing /home/leif/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/Cython-0.13-py2.6.egg-info
real 0m33.965s
user 0m28.080s
sys 0m0.800s
Successfully installed cython-0.13
Now cleaning up tmp files.
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing cython-0.13.spkg
$ ./sage -ba-force
*** TOUCHING ALL CYTHON (.pyx) FILES ***
scons: `install' is up to date.
----------------------------------------------------------
sage: Building and installing modified Sage library files.
Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Building modified file sage/algebras/quatalg/quaternion_algebra_element.pyx.
Building modified file sage/algebras/quatalg/quaternion_algebra_cython.pyx.
Building modified file sage/calculus/var.pyx.
Building modified file sage/calculus/riemann.pyx.
Building modified file sage/calculus/interpolators.pyx.
Building modified file sage/categories/action.pyx.
Building modified file sage/categories/functor.pyx.
Building modified file sage/categories/map.pyx.
Building modified file sage/categories/morphism.pyx.
Building modified file sage/categories/examples/semigroups_cython.pyx.
Building modified file sage/coding/binary_code.pyx.
Building modified file sage/combinat/expnums.pyx.
Building modified file sage/combinat/matrices/dancing_links.pyx.
Building modified file sage/combinat/partitions.pyx.
Building modified file sage/combinat/words/word_datatypes.pyx.
Building modified file sage/combinat/permutation_cython.pyx.
Building modified file sage/crypto/boolean_function.pyx.
Building modified file sage/ext/fast_callable.pyx.
Building modified file sage/ext/fast_eval.pyx.
Building modified file sage/ext/interactive_constructors_c.pyx.
Building modified file sage/ext/multi_modular.pyx.
Building modified file sage/ext/sig.pyx.
Building modified file sage/finance/fractal.pyx.
Building modified file sage/finance/markov_multifractal_cython.pyx.
Building modified file sage/finance/time_series.pyx.
Building modified file sage/functions/prime_pi.pyx.
Building modified file sage/games/sudoku_backtrack.pyx.
Building modified file sage/geometry/toric_lattice_element.pyx.
Building modified file sage/graphs/chrompoly.pyx.
Building modified file sage/graphs/cliquer.pyx.
Building modified file sage/graphs/generic_graph_pyx.pyx.
Building modified file sage/graphs/modular_decomposition/modular_decomposition.pyx.
Building modified file sage/graphs/planarity.pyx.
Building modified file sage/graphs/trees.pyx.
Building modified file sage/graphs/genus.pyx.
Building modified file sage/graphs/base/c_graph.pyx.
Building modified file sage/graphs/base/sparse_graph.pyx.
Building modified file sage/graphs/base/dense_graph.pyx.
Building modified file sage/groups/group.pyx.
Building modified file sage/groups/perm_gps/permgroup_element.pyx.
Building modified file sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx.
Building modified file sage/groups/perm_gps/partn_ref/double_coset.pyx.
Building modified file sage/groups/perm_gps/partn_ref/refinement_binary.pyx.
Building modified file sage/groups/perm_gps/partn_ref/refinement_graphs.pyx.
Building modified file sage/groups/perm_gps/partn_ref/refinement_lists.pyx.
Building modified file sage/groups/perm_gps/partn_ref/refinement_matrices.pyx.
Building modified file sage/groups/perm_gps/partn_ref/refinement_python.pyx.
Building modified file sage/gsl/callback.pyx.
Building modified file sage/gsl/dwt.pyx.
Building modified file sage/gsl/fft.pyx.
Building modified file sage/gsl/gsl_array.pyx.
Building modified file sage/gsl/integration.pyx.
Building modified file sage/gsl/interpolation.pyx.
Building modified file sage/gsl/ode.pyx.
Building modified file sage/gsl/probability_distribution.pyx.
Building modified file sage/libs/ecl.pyx.
Building modified file sage/libs/flint/flint.pyx.
Building modified file sage/libs/flint/fmpz_poly.pyx.
Building modified file sage/libs/fplll/fplll.pyx.
Building modified file sage/libs/linbox/linbox.pyx.
Building modified file sage/libs/lcalc/lcalc_Lfunction.pyx.
Building modified file sage/libs/libecm.pyx.
Building modified file sage/libs/mwrank/mwrank.pyx.
Building modified file sage/libs/pari/gen.pyx.
Building modified file sage/libs/ratpoints.pyx.
Building modified file sage/libs/singular/singular.pyx.
Building modified file sage/libs/singular/polynomial.pyx.
Building modified file sage/libs/singular/ring.pyx.
Building modified file sage/libs/singular/groebner_strategy.pyx.
Building modified file sage/libs/singular/function.pyx.
Building modified file sage/libs/singular/option.pyx.
Building modified file sage/libs/symmetrica/symmetrica.pyx.
Building modified file sage/libs/mpmath/utils.pyx.
Building modified file sage/libs/mpmath/ext_impl.pyx.
Building modified file sage/libs/mpmath/ext_main.pyx.
Building modified file sage/libs/mpmath/ext_libmp.pyx.
Building modified file sage/libs/cremona/homspace.pyx.
Building modified file sage/libs/cremona/mat.pyx.
Building modified file sage/libs/cremona/newforms.pyx.
Building modified file sage/libs/ntl/ntl_GF2.pyx.
Building modified file sage/libs/ntl/ntl_GF2E.pyx.
Building modified file sage/libs/ntl/ntl_GF2EContext.pyx.
Building modified file sage/libs/ntl/ntl_GF2EX.pyx.
Building modified file sage/libs/ntl/ntl_GF2X.pyx.
Building modified file sage/libs/ntl/ntl_lzz_p.pyx.
Building modified file sage/libs/ntl/ntl_lzz_pContext.pyx.
Building modified file sage/libs/ntl/ntl_lzz_pX.pyx.
Building modified file sage/libs/ntl/ntl_mat_GF2.pyx.
Building modified file sage/libs/ntl/ntl_mat_GF2E.pyx.
Building modified file sage/libs/ntl/ntl_mat_ZZ.pyx.
Building modified file sage/libs/ntl/ntl_ZZ.pyx.
Building modified file sage/libs/ntl/ntl_ZZX.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_p.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_pContext.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_pE.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_pEContext.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_pEX.pyx.
Building modified file sage/libs/ntl/ntl_ZZ_pX.pyx.
Building modified file sage/matrix/action.pyx.
Building modified file sage/matrix/change_ring.pyx.
Building modified file sage/matrix/matrix.pyx.
Building modified file sage/matrix/matrix0.pyx.
Building modified file sage/matrix/matrix1.pyx.
Building modified file sage/matrix/matrix2.pyx.
Building modified file sage/matrix/matrix_complex_double_dense.pyx.
Building modified file sage/matrix/matrix_cyclo_dense.pyx.
Building modified file sage/matrix/matrix_dense.pyx.
Building modified file sage/matrix/matrix_double_dense.pyx.
Building modified file sage/matrix/matrix_generic_dense.pyx.
Building modified file sage/matrix/matrix_generic_sparse.pyx.
Building modified file sage/matrix/matrix_integer_2x2.pyx.
Building modified file sage/matrix/matrix_integer_dense.pyx.
Building modified file sage/matrix/matrix_integer_sparse.pyx.
Building modified file sage/matrix/matrix_mod2_dense.pyx.
Building modified file sage/matrix/matrix_modn_dense.pyx.
Building modified file sage/matrix/matrix_modn_sparse.pyx.
Building modified file sage/matrix/matrix_mpolynomial_dense.pyx.
Building modified file sage/matrix/matrix_rational_dense.pyx.
Building modified file sage/matrix/matrix_rational_sparse.pyx.
Building modified file sage/matrix/matrix_real_double_dense.pyx.
Building modified file sage/matrix/matrix_sparse.pyx.
Building modified file sage/matrix/matrix_symbolic_dense.pyx.
Building modified file sage/matrix/matrix_window.pyx.
Building modified file sage/matrix/matrix_window_modn_dense.pyx.
Building modified file sage/matrix/misc.pyx.
Building modified file sage/matrix/strassen.pyx.
Building modified file sage/media/channels.pyx.
Building modified file sage/misc/allocator.pyx.
Building modified file sage/misc/bitset.pyx.
Building modified file sage/misc/citation.pyx.
Building modified file sage/misc/cython_c.pyx.
Building modified file sage/misc/derivative.pyx.
Building modified file sage/misc/fpickle.pyx.
Building modified file sage/misc/misc_c.pyx.
Building modified file sage/misc/parser.pyx.
Building modified file sage/misc/pickle_old.pyx.
Building modified file sage/misc/randstate.pyx.
Building modified file sage/misc/refcount.pyx.
Building modified file sage/misc/reset.pyx.
Building modified file sage/misc/sage_timeit_class.pyx.
Building modified file sage/misc/sagex_ds.pyx.
Building modified file sage/misc/search.pyx.
Building modified file sage/misc/session.pyx.
Building modified file sage/modular/arithgroup/congroup_pyx.pyx.
Building modified file sage/modular/modform/eis_series_cython.pyx.
Building modified file sage/modular/modsym/apply.pyx.
Building modified file sage/modular/modsym/heilbronn.pyx.
Building modified file sage/modular/modsym/p1list.pyx.
Building modified file sage/modules/free_module_element.pyx.
Building modified file sage/modules/module.pyx.
Building modified file sage/modules/vector_complex_double_dense.pyx.
Building modified file sage/modules/vector_double_dense.pyx.
Building modified file sage/modules/vector_integer_dense.pyx.
Building modified file sage/modules/vector_modn_dense.pyx.
Building modified file sage/modules/vector_mod2_dense.pyx.
Building modified file sage/modules/vector_rational_dense.pyx.
Building modified file sage/modules/vector_real_double_dense.pyx.
Building modified file sage/numerical/mip.pyx.
Building modified file sage/plot/complex_plot.pyx.
Building modified file sage/plot/plot3d/base.pyx.
Building modified file sage/plot/plot3d/implicit_surface.pyx.
Building modified file sage/plot/plot3d/index_face_set.pyx.
Traceback (most recent call last):
File "setup.py", line 753, in <module>
queue = compile_command_list(ext_modules, deps)
File "setup.py", line 713, in compile_command_list
dep_file, dep_time = deps.newest_dep(f)
File "setup.py", line 628, in newest_dep
for f in self.all_deps(filename):
File "setup.py", line 611, in all_deps
deps.update(self.all_deps(f, path))
File "setup.py", line 609, in all_deps
for f in self.immediate_deps(filename):
File "setup.py", line 591, in immediate_deps
self._deps[filename] = self.parse_deps(filename)
File "setup.py", line 581, in parse_deps
raise IOError, "could not find dependency %s included in %s."%(path, filename)
IOError: could not find dependency sage/ext/interpreters/python_object.pxd included in sage/ext/interpreters/wrapper_rdf.pxd.
sage: There was an error installing modified sage library code.
</pre>
TicketleifWed, 15 Sep 2010 17:06:47 GMT
https://trac.sagemath.org/ticket/9828#comment:3
https://trac.sagemath.org/ticket/9828#comment:3
<p>
I get the same when trying to reinstall <code>sage-4.6.alpha0.spkg</code>, or afterwards again running <code>./sage -ba</code>.
</p>
TicketleifWed, 15 Sep 2010 17:14:56 GMT
https://trac.sagemath.org/ticket/9828#comment:4
https://trac.sagemath.org/ticket/9828#comment:4
<p>
From the release notes:
</p>
<blockquote>
<p>
<em>"More shipped standard library declarations. The <code>python_*</code> and <code>stdlib/stdio .pxd</code> files have been deprecated in favor of <code>clib.*</code> and <code>cpython[.*]</code> and may get removed in a future release. "</em>
</p>
</blockquote>
TicketmpatelWed, 15 Sep 2010 19:52:27 GMT
https://trac.sagemath.org/ticket/9828#comment:5
https://trac.sagemath.org/ticket/9828#comment:5
<p>
Did you apply the 8 Sage library patches mentioned <a class="ext-link" href="http://groups.google.com/group/sage-devel/browse_thread/thread/0239f712a39fce4a/ba4e7b77e4de1b10?#ba4e7b77e4de1b10"><span class="icon"></span>in this sage-devel thread</a>?
</p>
<p>
Disclaimer: I haven't checked whether all of these patches are necessary and sufficient for Cython 0.13 final.
</p>
TicketleifWed, 15 Sep 2010 20:04:10 GMT
https://trac.sagemath.org/ticket/9828#comment:6
https://trac.sagemath.org/ticket/9828#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:5" title="Comment 5">mpatel</a>:
</p>
<blockquote class="citation">
<p>
Did you apply the 8 Sage library patches mentioned <a class="ext-link" href="http://groups.google.com/group/sage-devel/browse_thread/thread/0239f712a39fce4a/ba4e7b77e4de1b10?#ba4e7b77e4de1b10"><span class="icon"></span>in this sage-devel thread</a>?
</p>
</blockquote>
<p>
No (I haven't read that thread), I just tried and looked what happens... :)
</p>
<p>
I've created symbolic links to the pxds in the <code>Deprecated/</code> directory and now run (at least) into the missing <code>from cpython import bool</code> problem.
</p>
<p>
I would have expected some more info / notes here or at the Cython site; Volker Braun asked on the IRC when Cython will get updated (I knew there was 0.12.2 and a new release coming up), so I took a look at this ticket.
</p>
TicketrobertwbThu, 16 Sep 2010 00:46:05 GMT
https://trac.sagemath.org/ticket/9828#comment:7
https://trac.sagemath.org/ticket/9828#comment:7
<p>
I've got an 0.13 spkg that has a tiny patch on top to fix the performance regression with <code>__getattr__</code>. Yes, you need to appply all 8 Sage library patches, though I plan to clean at least one of them up 'cause it's got unnecessary garbage in it. (I was actually working on this last night, and planned to finish it up tonight.)
</p>
TicketjasonThu, 16 Sep 2010 04:04:07 GMTcc changed
https://trac.sagemath.org/ticket/9828#comment:8
https://trac.sagemath.org/ticket/9828#comment:8
<ul>
<li><strong>cc</strong>
<em>jason</em> added
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:18:13 GMT
https://trac.sagemath.org/ticket/9828#comment:9
https://trac.sagemath.org/ticket/9828#comment:9
<p>
Spkg up at <a class="ext-link" href="http://sage.math.washington.edu/home/robertwb/cython/cython-0.13.p0.spkg"><span class="icon"></span>http://sage.math.washington.edu/home/robertwb/cython/cython-0.13.p0.spkg</a> . I'm attaching a set of patches that should be necessary and sufficient.
</p>
TicketrobertwbThu, 16 Sep 2010 09:24:43 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>0_fix_setup.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:24:55 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>1_str_to_bytes.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:25:03 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>2_no_autodict.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:25:13 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>3_broken_imports.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:25:24 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>4_typing_issue.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:25:48 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>5_random_typing.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:25:59 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>6_type_inferance.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:26:08 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>7_bool_bint.patch</em>
</li>
</ul>
TicketrobertwbThu, 16 Sep 2010 09:27:36 GMTstatus changed
https://trac.sagemath.org/ticket/9828#comment:10
https://trac.sagemath.org/ticket/9828#comment:10
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
The last one, hudson_results.patch, isn't needed for Sage but makes continuous testing of Sage against cython-devel much easier.
</p>
TicketrobertwbThu, 16 Sep 2010 09:28:05 GMTdescription changed
https://trac.sagemath.org/ticket/9828#comment:11
https://trac.sagemath.org/ticket/9828#comment:11
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/9828?action=diff&version=11">diff</a>)
</li>
</ul>
TicketleifThu, 16 Sep 2010 09:34:08 GMT
https://trac.sagemath.org/ticket/9828#comment:12
https://trac.sagemath.org/ticket/9828#comment:12
<p>
<code>spkg-install</code> and <code>SPKG.txt</code> (Changelog!) need little clean-up. (I made my own spkg yesterday, so I could carry the changes over.)
</p>
TicketrobertwbThu, 16 Sep 2010 16:12:28 GMTcc changed
https://trac.sagemath.org/ticket/9828#comment:13
https://trac.sagemath.org/ticket/9828#comment:13
<ul>
<li><strong>cc</strong>
<em>craigcitro</em> added
</li>
</ul>
<p>
Feel free to carry your changes over. SPKG.txt doesn't have a changelog because it's all in the revision control and there's very little to say anyways (other than "bumped revision" which is pretty redundant). I'd be happy to review whatever you have.
</p>
TicketleifThu, 16 Sep 2010 16:29:15 GMT
https://trac.sagemath.org/ticket/9828#comment:14
https://trac.sagemath.org/ticket/9828#comment:14
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:13" title="Comment 13">robertwb</a>:
</p>
<blockquote class="citation">
<p>
Feel free to carry your changes over.
</p>
</blockquote>
<p>
Ok.
</p>
<blockquote class="citation">
<p>
SPKG.txt doesn't have a changelog because it's all in the revision control and there's very little to say anyways (other than "bumped revision" which is pretty redundant).
</p>
</blockquote>
<p>
Well, it wouldn't be bad to see in SPKG.txt which version was packaged when for Sage...
</p>
<p>
It's of course (at least currently) unlikely that Sage will patch Cython rather than report problems "upstream" and include a (quickly) fixed upstream version.
</p>
<p>
Hope you'll stay at Sage and Cython... ;-)
</p>
TicketleifThu, 16 Sep 2010 16:37:51 GMT
https://trac.sagemath.org/ticket/9828#comment:15
https://trac.sagemath.org/ticket/9828#comment:15
<p>
Funny, my patch (also) intended to avoid exactly the error which is currently made in <code>spkg-install</code>. :D
</p>
<p>
Coming soon...
</p>
TicketleifThu, 16 Sep 2010 17:07:14 GMT
https://trac.sagemath.org/ticket/9828#comment:16
https://trac.sagemath.org/ticket/9828#comment:16
<p>
Patch is up.
</p>
TicketrobertwbThu, 16 Sep 2010 17:21:44 GMT
https://trac.sagemath.org/ticket/9828#comment:17
https://trac.sagemath.org/ticket/9828#comment:17
<p>
Looks fine to me, except that the change was to speed up <code>__getattr__</code> not <code>__getitem__</code> (specifically for Python descendants of cdef classes).
</p>
TicketleifThu, 16 Sep 2010 17:23:22 GMT
https://trac.sagemath.org/ticket/9828#comment:18
https://trac.sagemath.org/ticket/9828#comment:18
<p>
Oooops...
</p>
TicketleifThu, 16 Sep 2010 17:54:47 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>trac_9828-fix_applying_patch_and_more-spkg.patch</em>
</li>
</ul>
<p>
SPKG patch. As the name says... (also quotes SAGE_LOCAL; some clean-up) Now with corrected SPKG.txt (<span class="underline">getattr</span>).
</p>
TicketleifThu, 16 Sep 2010 17:57:19 GMT
https://trac.sagemath.org/ticket/9828#comment:19
https://trac.sagemath.org/ticket/9828#comment:19
<p>
I've replaced the patch with a corrected one (<code>__getitem__()</code> -> <code>__getattr__()</code> in the changelog).
</p>
TicketrobertwbFri, 17 Sep 2010 06:12:29 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>hudson_results.patch</em>
</li>
</ul>
TicketrobertwbFri, 17 Sep 2010 07:01:47 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>sage-local-hudson.patch</em>
</li>
</ul>
<p>
apply to sage local repo
</p>
TicketjasonTue, 28 Sep 2010 22:53:42 GMT
https://trac.sagemath.org/ticket/9828#comment:20
https://trac.sagemath.org/ticket/9828#comment:20
<p>
Okay, now I'm really confused about what patches I should apply where to review this. Can someone give directions for reviewing? Thanks!
</p>
TicketrobertwbWed, 29 Sep 2010 07:38:58 GMT
https://trac.sagemath.org/ticket/9828#comment:21
https://trac.sagemath.org/ticket/9828#comment:21
<p>
Thanks for being willing to take a look. Apply patches 0-7 and hudson_results.patch to the sage library in order. I have incorporated trac_9828-fix_applying_patch_and_more-spkg.patch into the spkg (at the same address as above). sage-local-hudson.patch gets applied to sage/local/bin. If you have any other questions, please don't hesitate to ask.
</p>
TicketleifThu, 30 Sep 2010 05:29:56 GMTstatus changed
https://trac.sagemath.org/ticket/9828#comment:22
https://trac.sagemath.org/ticket/9828#comment:22
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
Hmmm, patches still apply (without rejects) to Sage 4.6.alpha2[pre2], spkg installs ok, and <code>./sage -b</code> also works.
</p>
<p>
But after that, Sage doesn't start (Sphinx raises the same exception):
</p>
<pre class="wiki">...
Testing that Sage starts...
Traceback (most recent call last):
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/bin/sage-eval", line 4, in <module>
from sage.all import *
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/lib/python2.6/site-packages/sage/all.py", line 64, in <module>
from sage.misc.all import * # takes a while
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/lib/python2.6/site-packages/sage/misc/all.py", line 67, in <module>
from sage_input import sage_input
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/lib/python2.6/site-packages/sage/misc/sage_input.py", line 163, in <module>
from sage.misc.functional import parent
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/lib/python2.6/site-packages/sage/misc/functional.py", line 34, in <module>
import sage.interfaces.expect
File "/home/leif/Sage/sage-4.6.alpha2pre2/local/lib/python2.6/site-packages/sage/interfaces/expect.py", line 52, in <module>
from sage.structure.parent_base import ParentWithBase
File "parent_base.pyx", line 1, in init sage.structure.parent_base (sage/structure/parent_base.c:1934)
File "parent_old.pyx", line 1, in init sage.structure.parent_old (sage/structure/parent_old.c:7031)
File "parent.pyx", line 383, in init sage.structure.parent (sage/structure/parent.c:20048)
AttributeError: type object 'sage.structure.parent.Parent' has no attribute '__getattr__'
Sage failed to startup.
make: *** [ptestlong] Error 1
</pre><p>
<code>./sage -ba</code> (tried after that) doesn't work either, due to newly merged Cython code:
</p>
<pre class="wiki">*** TOUCHING ALL CYTHON (.pyx) FILES ***
scons: `install' is up to date.
----------------------------------------------------------
sage: Building and installing modified Sage library files.
Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Building modified file sage/algebras/quatalg/quaternion_algebra_element.pyx.
Building modified file sage/algebras/quatalg/quaternion_algebra_cython.pyx.
Building modified file sage/calculus/var.pyx.
...
Building modified file sage/ext/interpreters/wrapper_rr.pyx.
Building modified file sage/ext/interpreters/wrapper_py.pyx.
Building modified file sage/ext/interpreters/wrapper_el.pyx.
Execute 271 commands (using 8 threads)
Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef int *vertices
cdef int **line_h_out
cdef int **line_h_in
cdef list g_vertices
cdef int i
cdef bool directed
^
------------------------------------------------------------
/home/leif/Sage/sage-4.6.alpha2pre2/devel/sage-9828-cython/sage/graphs/generic_graph_pyx.pxd:26:9: 'bool' is not a type identifier
...
python `which cython` --embed-positions --directive cdivision=True,autotestdict=False -I/home/leif/Sage/sage-4.6.alpha2pre2/devel/sage-9828-cython -o sage/gsl/callback.c sage/gsl/callback.pyx
sage/gsl/callback.pyx --> /home/leif/Sage/sage-4.6.alpha2pre2/local//lib/python/site-packages//sage/gsl/callback.pyx
python `which cython` --embed-positions --directive cdivision=True,autotestdictwarning: /home/leif/Sage/sage-4.6.alpha2pre2/devel/sage-9828-cython/sage/gsl/gsl_array.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
warning: /home/leif/Sage/sage-4.6.alpha2pre2/devel/sage-9828-cython/sage/gsl/fft.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
Error running command, failed with status 256.
sage: There was an error installing modified sage library code.
</pre>
TicketjasonThu, 30 Sep 2010 05:34:57 GMT
https://trac.sagemath.org/ticket/9828#comment:23
https://trac.sagemath.org/ticket/9828#comment:23
<p>
Looks like a bool->bint was missed?
</p>
TicketrobertwbThu, 30 Sep 2010 16:04:10 GMT
https://trac.sagemath.org/ticket/9828#comment:24
https://trac.sagemath.org/ticket/9828#comment:24
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:23" title="Comment 23">jason</a>:
</p>
<blockquote class="citation">
<p>
Looks like a bool->bint was missed?
</p>
</blockquote>
<p>
Or added since this spkg was created--it used to all work fine. I suppose I'll download the latest alpha and see what's up.
</p>
TicketrobertwbFri, 01 Oct 2010 08:32:39 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>8_alpha_fixes.patch</em>
</li>
</ul>
TicketrobertwbFri, 01 Oct 2010 08:33:51 GMTstatus, description changed
https://trac.sagemath.org/ticket/9828#comment:25
https://trac.sagemath.org/ticket/9828#comment:25
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/9828?action=diff&version=25">diff</a>)
</li>
</ul>
<p>
OK, one more patch, and an updated spkg.
</p>
TicketjasonTue, 05 Oct 2010 03:37:13 GMT
https://trac.sagemath.org/ticket/9828#comment:26
https://trac.sagemath.org/ticket/9828#comment:26
<p>
I see Craig is the author of a lot of the patches. robertwb: have you reviewed those patches? Which patches still need review?
</p>
<p>
I applied all patches and installed on a fresh copy of 4.6.alpha2 (I think it's a fresh copy), and had the following failures in ptestlong on Ubuntu 10.04 64-bit:
</p>
<pre class="wiki">File "/home/grout/sage-4.6.alpha2/devel/sage-main/sage/misc/sageinspect.py", line 1058:
sage: sage_getdef(sage.rings.integer.Integer.__init__, obj_name='__init__')
Expected:
'__init__(x=None, base=0)'
Got:
'__init__( [noargspec] )'
</pre><p>
(that's a test that I thought one of the patches changed to the expected value listed above).
</p>
<pre class="wiki"> sage -t -long 4.6.alpha2/devel/sage/sage/plot/misc.py # 4 doctests failed
sage -t -long 4.6.alpha2/devel/sage/sage/plot/plot.py # 12 doctests failed
</pre><p>
These are corrected in <a class="closed ticket" href="https://trac.sagemath.org/ticket/9221" title="enhancement: update matplotlib to 1.0.0 and clean out the patches (closed: fixed)">#9221</a>, I think.
</p>
TicketrobertwbTue, 05 Oct 2010 05:05:24 GMT
https://trac.sagemath.org/ticket/9828#comment:27
https://trac.sagemath.org/ticket/9828#comment:27
<p>
I've looked at all of the ones Craig wrote (way back) and they're all fine. I assume you did a sage -ba after installing Cython? The sageinspect output is what I got on a fresh 4.6.alpha2 on sage.math. I doubt the plot ones are related, but I didn't see them when I ran the tests which is strange.
</p>
TicketjasonTue, 05 Oct 2010 17:16:46 GMT
https://trac.sagemath.org/ticket/9828#comment:28
https://trac.sagemath.org/ticket/9828#comment:28
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:27" title="Comment 27">robertwb</a>:
</p>
<blockquote class="citation">
<p>
I've looked at all of the ones Craig wrote (way back) and they're all fine. I assume you did a sage -ba after installing Cython? The sageinspect output is what I got on a fresh 4.6.alpha2 on sage.math. I doubt the plot ones are related, but I didn't see them when I ran the tests which is strange.
</p>
</blockquote>
<p>
I didn't do sage -ba. I'm trying again now.
</p>
TicketjasonTue, 05 Oct 2010 18:42:34 GMT
https://trac.sagemath.org/ticket/9828#comment:29
https://trac.sagemath.org/ticket/9828#comment:29
<p>
I did sage -ba (4.6.alpha2, the above patches applied, and the new Cython spkg), and still got the following failures (Ubuntu 10.04 64-bit):
</p>
<pre class="wiki">sage -t -long local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/misc/sageinspect.py
**********************************************************************
File "/home/grout/sage-4.6.alpha2/local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/misc/sageinspect.py", line 1074:
sage: sage_getsource(sage.rings.integer.Integer.__init__, is_binary=True)
Expected: Traceback (most recent call last): ... TypeError: arg is not a module, class, method, function, traceback, frame, or code objectGot: ' def __init__(self, x=None, unsigned int base=0):\n """\n EXAMPLES::\n \n sage: a = long(-901824309821093821093812093810928309183091832091)\n sage: b = ZZ(a); b\n -901824309821093821093812093810928309183091832091\n sage: ZZ(b)\n -901824309821093821093812093810928309183091832091\n sage: ZZ(\'-901824309821093821093812093810928309183091832091\')\n -901824309821093821093812093810928309183091832091\n sage: ZZ(int(-93820984323))\n -93820984323\n sage: ZZ(ZZ(-901824309821093821093812093810928309183091832091))\n -901824309821093821093812093810928309183091832091\n sage: ZZ(QQ(-901824309821093821093812093810928309183091832091))\n -901824309821093821093812093810928309183091832091\n sage: ZZ(RR(2.0)^80)\n 1208925819614629174706176\n sage: ZZ(QQbar(sqrt(28-10*sqrt(3)) + sqrt(3)))\n 5\n sage: ZZ(AA(32).nth_root(5))\n 2\n sage: ZZ(pari(\'Mod(-3,7)\'))\n 4\n sage: ZZ(\'sage\')\n Traceback (most recent call last):\n ...\n TypeError: unable to convert x (=sage) to an integer\n sage: Integer(\'zz\',36).str(36)\n \'zz\'\n sage: ZZ(\'0x3b\').str(16)\n \'3b\'\n sage: ZZ( ZZ(5).digits(3) , 3)\n 5\n sage: import numpy\n sage: ZZ(numpy.int64(7^7))\n 823543\n sage: ZZ(numpy.ubyte(-7))\n 249\n sage: ZZ(True)\n 1\n sage: ZZ(False)\n 0\n sage: ZZ(1==0)\n 0\n sage: ZZ(\'+10\')\n 10\n \n ::\n \n sage: k = GF(2)\n sage: ZZ( (k(0),k(1)), 2)\n 2\n \n ::\n \n sage: t = pari(0*ZZ[x].0 + 3)\n sage: t.type()\n \'t_POL\'\n sage: ZZ(t)\n 3\n\n sage: ZZ(float(2.0))\n 2\n sage: ZZ(float(1.0/0.0))\n Traceback (most recent call last):\n ...\n OverflowError: cannot convert float infinity to integer\n sage: ZZ(float(0.0/0.0))\n Traceback (most recent call last):\n ...\n ValueError: cannot convert float NaN to integer\n\n ::\n\n sage: class MyInt(int):\n ... pass\n sage: class MyLong(long):\n ... pass\n sage: class MyFloat(float):\n ... pass\n sage: ZZ(MyInt(3))\n 3\n sage: ZZ(MyLong(4))\n 4\n sage: ZZ(MyFloat(5))\n 5\n """\n\n # TODO: All the code below should somehow be in an external\n # cdef\'d function. Then e.g., if a matrix or vector or\n # polynomial is getting filled by mpz_t\'s, it can use the\n # rules below to do the fill construction of mpz_t\'s, but\n # without the overhead of creating any Python objects at all.\n # The cdef\'s function should be of the form\n # mpz_init_set_sage(mpz_t y, object x)\n # Then this function becomes the one liner:\n # mpz_init_set_sage(self.value, x)\n\n cdef Integer tmp\n cdef char* xs\n \n cdef Element lift\n \n if x is None:\n if mpz_sgn(self.value) != 0:\n mpz_set_si(self.value, 0)\n \n else:\n # First do all the type-check versions; these are fast.\n\n if PY_TYPE_CHECK(x, Integer):\n set_from_Integer(self, <Integer>x)\n\n elif PY_TYPE_CHECK(x, bool):\n mpz_set_si(self.value, PyInt_AS_LONG(x))\n\n elif PyInt_Check(x):\n mpz_set_si(self.value, PyInt_AS_LONG(x))\n\n elif PyLong_Check(x):\n mpz_set_pylong(self.value, x)\n\n elif PyFloat_Check(x):\n n = long(x)\n if n == x:\n mpz_set_pylong(self.value, n)\n else:\n raise TypeError, "Cannot convert non-integral float to integer"\n\n elif PY_TYPE_CHECK(x, pari_gen):\n \n if typ((<pari_gen>x).g) == t_INT:\n t_INT_to_ZZ(self.value, (<pari_gen>x).g)\n \n else:\n if typ((<pari_gen>x).g) == t_INTMOD:\n x = x.lift()\n # TODO: figure out how to convert to pari integer in base 16 ?\n \n # todo: having this "s" variable around here is causing\n # Cython to play games with refcount for the None object, which\n # seems really stupid.\n \n try:\n s = hex(x)\n base = 16\n except:\n s = str(x)\n base = 10\n \n if mpz_set_str(self.value, s, base) != 0:\n raise TypeError, "Unable to coerce PARI %s to an Integer."%x\n\n elif PyString_Check(x):\n if base < 0 or base > 36:\n raise ValueError, "base (=%s) must be between 2 and 36"%base\n \n xs = x\n if xs[0] == c\'+\':\n xs += 1\n if mpz_set_str(self.value, xs, base) != 0:\n raise TypeError, "unable to convert x (=%s) to an integer"%x\n \n elif PyObject_HasAttrString(x, "_integer_"):\n # todo: Note that PyObject_GetAttrString returns NULL if\n # the attribute was not found. If we could test for this,\n # we could skip the double lookup. Unfortunately Cython doesn\'t\n # seem to let us do this; it flags an error if the function\n # returns NULL, because it can\'t construct an "object" object\n # out of the NULL pointer. This really sucks. Perhaps we could\n # make the function prototype have return type void*, but\n # then how do we make Cython handle the reference counting?\n set_from_Integer(self, (<object> PyObject_GetAttrString(x, "_integer_"))(the_integer_ring))\n\n elif (PY_TYPE_CHECK(x,
list) or PY_TYPE_CHECK(x, tuple)) and base > 1:\n b = the_integer_ring(base)\n tmp = the_integer_ring(0)\n for i in range(len(x)):\n tmp += t
he_integer_ring(x[i])*b**i\n mpz_set(self.value, tmp.value)\n\n else:\n import numpy\n if isinstance(x, numpy.integer):\n mpz_set_p
ylong(self.value, x.__long__())\n return\n \n elif PY_TYPE_CHECK(x, Element):\n try:\n lift = x.lift()\n
if lift._parent != (<Element>x)._parent:\n tmp = the_integer_ring(lift)\n mpz_swap(tmp.value, self.value)\n
return\n except AttributeError:\n pass\n \n raise TypeError, "unable to coerce %s to an integer" % type(x)\n'
**********************************************************************
File "/home/grout/sage-4.6.alpha2/local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/misc/sageinspect.py", line 1079:
sage: sage_getdef(sage.rings.integer.Integer.__init__, obj_name='__init__')
Expected:
'__init__( [noargspec] )'
Got:
'__init__(x=None, base=0)'
**********************************************************************
1 items had failures:
2 of 26 in __main__.example_23
***Test Failed*** 2 failures.
</pre>
TicketjasonTue, 05 Oct 2010 18:49:16 GMTcc changed
https://trac.sagemath.org/ticket/9828#comment:30
https://trac.sagemath.org/ticket/9828#comment:30
<ul>
<li><strong>cc</strong>
<em>timdumol</em> <em>mpatel</em> added
</li>
</ul>
<p>
I just noticed those two failures were in sagenb. I can replicate them doing <code>sage -t -sagenb</code>. It looks like the same changes that were needed in sage/misc/sageinspect.py are also needed in the notebook version of that file? (see the 8_alpha_fixes.patch above).
</p>
<p>
I'm not sure how the two sageinspect.py files are related (in the library and in the notebook), so I'm CCing Tim and Mitesh on this.
</p>
TickettimdumolTue, 05 Oct 2010 18:52:30 GMT
https://trac.sagemath.org/ticket/9828#comment:31
https://trac.sagemath.org/ticket/9828#comment:31
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:30" title="Comment 30">jason</a>:
</p>
<blockquote class="citation">
<p>
I just noticed those two failures were in sagenb. I can replicate them doing <code>sage -t -sagenb</code>. It looks like the same changes that were needed in sage/misc/sageinspect.py are also needed in the notebook version of that file? (see the 8_alpha_fixes.patch above).
</p>
<p>
I'm not sure how the two sageinspect.py files are related (in the library and in the notebook), so I'm CCing Tim and Mitesh on this.
</p>
</blockquote>
<p>
The <code>sageinspect.py</code> in SageNB was derived from the <code>sageinspect.py</code> of the main Sage library by William when the new SageNB was separated from the main Sage library. Feel free to make the same changes.
</p>
TicketjasonTue, 05 Oct 2010 19:01:18 GMT
https://trac.sagemath.org/ticket/9828#comment:32
https://trac.sagemath.org/ticket/9828#comment:32
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:31" title="Comment 31">timdumol</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:30" title="Comment 30">jason</a>:
</p>
<blockquote class="citation">
<p>
I just noticed those two failures were in sagenb. I can replicate them doing <code>sage -t -sagenb</code>. It looks like the same changes that were needed in sage/misc/sageinspect.py are also needed in the notebook version of that file? (see the 8_alpha_fixes.patch above).
</p>
<p>
I'm not sure how the two sageinspect.py files are related (in the library and in the notebook), so I'm CCing Tim and Mitesh on this.
</p>
</blockquote>
<p>
The <code>sageinspect.py</code> in SageNB was derived from the <code>sageinspect.py</code> of the main Sage library by William when the new SageNB was separated from the main Sage library. Feel free to make the same changes.
</p>
</blockquote>
<p>
Is there any reason why it is not just imported, rather than being copied?
</p>
TickettimdumolTue, 05 Oct 2010 19:09:47 GMT
https://trac.sagemath.org/ticket/9828#comment:33
https://trac.sagemath.org/ticket/9828#comment:33
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:32" title="Comment 32">jason</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:31" title="Comment 31">timdumol</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:30" title="Comment 30">jason</a>:
</p>
<blockquote class="citation">
<p>
I just noticed those two failures were in sagenb. I can replicate them doing <code>sage -t -sagenb</code>. It looks like the same changes that were needed in sage/misc/sageinspect.py are also needed in the notebook version of that file? (see the 8_alpha_fixes.patch above).
</p>
<p>
I'm not sure how the two sageinspect.py files are related (in the library and in the notebook), so I'm CCing Tim and Mitesh on this.
</p>
</blockquote>
<p>
The <code>sageinspect.py</code> in SageNB was derived from the <code>sageinspect.py</code> of the main Sage library by William when the new SageNB was separated from the main Sage library. Feel free to make the same changes.
</p>
</blockquote>
<p>
Is there any reason why it is not just imported, rather than being copied?
</p>
</blockquote>
<p>
William stated that he wanted SageNB to be usable separately from Sage, which means not having to import Sage libraries to function.
</p>
TicketrobertwbTue, 05 Oct 2010 23:25:46 GMT
https://trac.sagemath.org/ticket/9828#comment:34
https://trac.sagemath.org/ticket/9828#comment:34
<p>
Yes, the sagenb version needs to be updated as well. Should I post a new sagenb spkg, or is there one already in the works?
</p>
<p>
Anything else?
</p>
TicketmpatelTue, 05 Oct 2010 23:33:37 GMT
https://trac.sagemath.org/ticket/9828#comment:35
https://trac.sagemath.org/ticket/9828#comment:35
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:34" title="Comment 34">robertwb</a>:
</p>
<blockquote class="citation">
<p>
Yes, the sagenb version needs to be updated as well. Should I post a new sagenb spkg, or is there one already in the works?
</p>
</blockquote>
<p>
You can just post patches here against <a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a>'s SageNB 0.8.4. I can add them to a 0.8.5 and update <a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a>.
</p>
TicketmpatelThu, 07 Oct 2010 08:34:01 GMT
https://trac.sagemath.org/ticket/9828#comment:36
https://trac.sagemath.org/ticket/9828#comment:36
<p>
Is a SageNB patch the only barrier to a positive review?
</p>
TicketmpatelThu, 07 Oct 2010 09:24:53 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>trac_9828-sagenb_cython_0_13.patch</em>
</li>
</ul>
<p>
SageNB doctest fixes. Apply to sagenb repository.
</p>
TicketmpatelThu, 07 Oct 2010 09:48:09 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>trac_9828-cython_0_13.patch</em>
</li>
</ul>
<p>
Folded sage repository patch. Apply only this patch to the sage repository.
</p>
TicketmpatelThu, 07 Oct 2010 09:54:12 GMTattachment set
https://trac.sagemath.org/ticket/9828
https://trac.sagemath.org/ticket/9828
<ul>
<li><strong>attachment</strong>
set to <em>trac_9828-scripts_hudson.patch</em>
</li>
</ul>
<p>
Ticket number in scripts repo patch. Apply only this patch to the scripts repo.
</p>
TicketmpatelThu, 07 Oct 2010 10:00:51 GMTdescription changed; reviewer, milestone, author set
https://trac.sagemath.org/ticket/9828#comment:37
https://trac.sagemath.org/ticket/9828#comment:37
<ul>
<li><strong>reviewer</strong>
set to <em>Jason Grout, Leif Leonhardy, Mitesh Patel</em>
</li>
<li><strong>milestone</strong>
set to <em>sage-4.6</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/9828?action=diff&version=37">diff</a>)
</li>
<li><strong>author</strong>
set to <em>Robert Bradshaw, Craig Citro, Leif Leonhardy</em>
</li>
</ul>
<p>
I've added a SageNB patch, folded sage repository patch, and updated scripts repository patch with the ticket number in the commit string. The SageNB package link is in the description
</p>
TicketmpatelThu, 07 Oct 2010 10:11:44 GMTstatus changed
https://trac.sagemath.org/ticket/9828#comment:38
https://trac.sagemath.org/ticket/9828#comment:38
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
The long doctests pass for me on sage.math with 4.6.alpha2 + the spkgs and patches in the description.
</p>
<p>
If no one objects, I'm giving this a positive review. Can someone please review <a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a> soon?
</p>
<p>
By the way, does <code>XML_RESULTS = os.environ.get('XML_RESULTS', None)</code> internally do the same as
</p>
<div class="wiki-code"><div class="code"><pre><span class="k">try</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> os<span class="o">.</span>environ<span class="p">[</span><span class="s">'XML_RESULTS'</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> <span class="bp">None</span>
</pre></div></div><p>
?
</p>
TicketmpatelThu, 07 Oct 2010 10:16:28 GMTdescription changed
https://trac.sagemath.org/ticket/9828#comment:39
https://trac.sagemath.org/ticket/9828#comment:39
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/9828?action=diff&version=39">diff</a>)
</li>
</ul>
TicketmpatelThu, 07 Oct 2010 11:19:25 GMTstatus changed; resolution, merged set
https://trac.sagemath.org/ticket/9828#comment:40
https://trac.sagemath.org/ticket/9828#comment:40
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.6.alpha3</em>
</li>
</ul>
TicketjasonThu, 07 Oct 2010 13:39:56 GMT
https://trac.sagemath.org/ticket/9828#comment:41
https://trac.sagemath.org/ticket/9828#comment:41
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:38" title="Comment 38">mpatel</a>:
</p>
<blockquote class="citation">
<p>
The long doctests pass for me on sage.math with 4.6.alpha2 + the spkgs and patches in the description.
</p>
<p>
If no one objects, I'm giving this a positive review. Can someone please review <a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a> soon?
</p>
<p>
By the way, does <code>XML_RESULTS = os.environ.get('XML_RESULTS', None)</code> internally do the same as
</p>
<div class="wiki-code"><div class="code"><pre><span class="k">try</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> os<span class="o">.</span>environ<span class="p">[</span><span class="s">'XML_RESULTS'</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> <span class="bp">None</span>
</pre></div></div><p>
?
</p>
</blockquote>
<p>
Yes. See <a class="ext-link" href="http://docs.python.org/library/stdtypes.html#dict.get"><span class="icon"></span>http://docs.python.org/library/stdtypes.html#dict.get</a>
</p>
TicketrobertwbThu, 07 Oct 2010 15:59:07 GMT
https://trac.sagemath.org/ticket/9828#comment:42
https://trac.sagemath.org/ticket/9828#comment:42
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:38" title="Comment 38">mpatel</a>:
</p>
<blockquote class="citation">
<p>
The long doctests pass for me on sage.math with 4.6.alpha2 + the spkgs and patches in the description.
</p>
<p>
If no one objects, I'm giving this a positive review.
</p>
</blockquote>
<p>
Thanks all! Next up, Cython 0.13.1 :) I'm neither planning to wait as long nor make as many changes, so it won't be near as bad...
</p>
<blockquote class="citation">
<p>
Can someone please review <a class="closed ticket" href="https://trac.sagemath.org/ticket/10036" title="enhancement: SageNB 0.8.6 (closed: fixed)">#10036</a> soon?
</p>
<p>
By the way, does <code>XML_RESULTS = os.environ.get('XML_RESULTS', None)</code> internally do the same as
</p>
<div class="wiki-code"><div class="code"><pre><span class="k">try</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> os<span class="o">.</span>environ<span class="p">[</span><span class="s">'XML_RESULTS'</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> <span class="bp">None</span>
</pre></div></div><p>
?
</p>
</blockquote>
<p>
Yes, that would have probably been cleaner.
</p>
TicketjasonThu, 07 Oct 2010 16:07:50 GMT
https://trac.sagemath.org/ticket/9828#comment:43
https://trac.sagemath.org/ticket/9828#comment:43
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9828#comment:42" title="Comment 42">robertwb</a>:
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
By the way, does <code>XML_RESULTS = os.environ.get('XML_RESULTS', None)</code> internally do the same as
</p>
<div class="wiki-code"><div class="code"><pre><span class="k">try</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> os<span class="o">.</span>environ<span class="p">[</span><span class="s">'XML_RESULTS'</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
XML_RESULTS <span class="o">=</span> <span class="bp">None</span>
</pre></div></div><p>
?
</p>
</blockquote>
<p>
Yes, that would have probably been cleaner.
</p>
</blockquote>
<p>
Since None is the default default value, it could even be shortened to <code>XML_RESULTS = os.environ.get('XML_RESULTS')</code>
</p>
TicketjdemeyerFri, 11 Jan 2019 13:31:41 GMT
https://trac.sagemath.org/ticket/9828#comment:44
https://trac.sagemath.org/ticket/9828#comment:44
<p>
What is the purpose of this <code>XML_RESULTS</code> stuff which was introduced here?
</p>
Ticket