add base_ring argument to toric variety library
Added iterator over the points of a toric variety
separate scheme point sets for subschemes of toric varieties
points for subvarieties of toric varieties works
code cleanups
final code cleanups
also allow iterating over points for a toric variety over an infinite ring
also divide out relations coming from the torsion in the Chow group
forgot to divide by the free part of the Chow group if there is torsion
added non-compact example for the toric point_set, allow base_ring argument to ToricVariety
fix point counting on toric varieties with torus factors
trac #15228: Default embedding of graphs.LjubljanaGraph
#14912: Extended documentation of sage.structure.factory and sage.structure.unique_representation
trac #14912: review
trac #14912: more changes, hopefully adding a systematic intro to factories
#14912: Fix two doc tests concerning unique representation.
#14912: fix leaking print statement when running doctests.
Trac #14912: UniqueRepresentation tutorial could use more love

Sadly not my love, unless someone teaches me enough of the stuff that I
understand it myself.

http://www.sagemath.org/doc/reference/structure/sage/structure/unique_re
presentation.html

One thing I don't understand is:
{{{
the preprocessing on the arguments should be idempotent. Namely, If
MyClass2.__classcall__ calls
CachedRepresentation.__classcall__(<some_arguments>), then it should
accept <some_arguments> as its own input, and pass it down unmodified to
CachedRepresentation.__classcall__().
}}}
What is meant by "accept <some_arguments> as its own input"?

Something that possibly should be added is some explanation of the
difference between {{{__classcall__}}} and {{{__classcall_private__}}}.
Maybe it doesn't belong there, but then again I have no idea where it
belongs as it seems not documented at all...

Also there seems to be a typo:

{{{
The UniqueRepresentation and UniqueFactory classes provide two
alternative implementations of this design pattern. Both implementations
have their own merits. UniqueRepresentation is very easy to use: a class
just needs to derive from it, or make sure some of its super classes
does. Also, it groups together the class and the factory in a single
gadget; in the example above, one would want to do:
}}}

I think it's UniqueFactory, not UniqueRepresentation, which is easy to
use etc.

Apply:

* [attachment:trac14912-unique_doc.patch]
* [attachment:trac_14912-comments-dg.patch]
* [attachment:trac_14912-more-ts-dg.patch]
* [attachment:trac_14912-doc-fixes-sk.patch]
* [attachment:trac_14912-fix_leaking_print-ts.patch​]

URL: http://trac.sagemath.org/14912
Reported by: darij
Ticket author(s): Simon King
Reviewer(s): Darij Grinberg, Travis Scrimshaw
Trac 12217: correctly handle division by zero
Trac #12217: Finite field polynomials allow division by zero

For prime finite fields, the following causes Sage to crash:
{{{
sage: P.<x> = GF(5)[]
sage: x/0
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
}}}
The cause is a missing check for a zero denominator.  This leads to
`normalize` in `devel/sage/sage/rings/fraction_field_FpT.pyx` calling
`nmod_poly_leading(denom)` to get the leading coefficient of the
denominator. This crashes, since the zero polynomial doesn't have a
leading coefficient.

And non-prime finite fields don't complain at all:
{{{
sage: P.<x> = GF(25,'a')[]
sage: x/5
x
}}}
This is due to a missing check for division by zero in the
`__invert__()` method of Givaro finite field elements.  Inserting this
check broke conversion of the finite field element 0 from Givaro to Gap,
so this is also fixed.

Apply: [attachment:12217-zero_division-v2.patch]

URL: http://trac.sagemath.org/12217
Reported by: johanbosman
Ticket author(s): Peter Bruin
Reviewer(s): Jeroen Demeyer