Added optional argument (default False) to report distance along with vertex
trac #17209 two colors for filled polygon2d
Trac #17195: Upgrade Cython to 0.21.1

This should be an easy upgrade.

Main useful feature for Sage: declarations of the `PySlice` API.

Rename the upstream tarball
[http://cython.org/release/Cython-0.21.1.tar.gz] to
`$SAGE_ROOT/upstream/cython-0.21.1.tar.gz`

URL: http://trac.sagemath.org/17195
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Robert Bradshaw
Trac #17203: Make sage -notebook=ipython land by default in pwd

Since #16996 the default directory of {{{sage -notebook=ipython}}} is
{{{DOT_SAGE/notebooks_ipython/}}} following the old notebook. In the old
Sage notebook, each worksheet was a directory and even each single cell
was stored in its own directory. Therefore, there was no notion of
"present working directory" at all. With the ipython notebook, each
worksheet lives in one present working directory chosen by the user.
That is one of the main point of the ipython notebook philosophy and we
should not change that in Sage. See the post of Fernando Perez about
difference between the ipython notebook and the Sage notebook:

   ''"This is a key difference of our approach and the Sage notebook, so
it' worth clarifying what I mean, the key point being the execution
model and its relation to the filesystem.  The Sage notebook took the
route of using the filesystem for notebook operations, so you can't
meaningfully use 'ls' in it or move around the filesystem yourself with
'cd', because Sage will always execute your code in hidden directories
with each cell actually being a separate subdirectory.  This is a
perfectly valid approach and has a number of very good consequences for
the Sage notebook, but it is also very different from the IPython model
where we always keep the user very close to the filesystem and OS.  For
us, it's really important that you can access local scripts, use %run,
see arbitrary files conveniently, etc., as these are routine needs in
data analysis and numerical simulation."'' (Fernando Perez,
[http://blog.fperez.org/2012/01/ipython-notebook-historical.html The
IPython notebook: a historical retrospective], January 2012)

Let's change the default directory so that it is equal to the present
working directory (`pwd`) as it is the nice way of using ipython.

[https://groups.google.com/d/topic/sage-devel/NxN_oCasrkA/discussion See
the related discussion and vote on sage-devel].

URL: http://trac.sagemath.org/17203
Reported by: slabbe
Ticket author(s): Sébastien Labbé
Reviewer(s): Volker Braun
Trac #17157: Improve formula for Bell numbers

Improve the error analysis for the implementation of Dobinski's formula
to compute the Bell numbers leading to

1. code which is actually consistent with the mathematical formulas
1. code which is cleaner and simpler than before
1. a complete error estimate including the final real approximation
1. faster code:

Before:
{{{
sage: timeit('bell_number(200)', number=2000)
2000 loops, best of 3: 1.45 ms per loop
}}}

After:
{{{
sage: timeit('bell_number(200)', number=2000)
2000 loops, best of 3: 441 µs per loop
}}}

URL: http://trac.sagemath.org/17157
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Travis Scrimshaw
Merge branch 'u/foosterhof/ticket/16470' of trac.sagemath.org:sage into 16470
trac #16470 reviewer's patch
Trac #16470: Add optional distance in BFS

There is no way to get the edge distance with a custom neighbor
function.

breadth_first_search() does not report distance, and shortest_paths()
does not give the option to specify a neighbor function.

URL: http://trac.sagemath.org/16470
Reported by: foosterhof
Ticket author(s): Florian Oosterhof
Reviewer(s): Frédéric Chapoton
Trac #17209: allow the use of distinct edgecolor and color for polygons in 2D

I would like to have a green polygon with black border. I can achieve
this by superposing two polygons:
{{{
sage: P = polygon([[0,0],[0,1],[2,1],[1,0]],color='limegreen',fill=True)
sage: P += polygon([[0,0],[0,1],[2,1],[1,0]],color='black',fill=False)
sage: P
}}}
It should be possible to do that with '''one polygon''', using the
`edgecolor` keyword of `matplotlib`.

See http://ask.sagemath.org/question/24600/how-to-plot-a-polygon-with-
distinct-colors-for-border-and-interior/

URL: http://trac.sagemath.org/17209
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Volker Braun