Trac #13394: Implement faster and safer WeakValueDictionary
# Sat Oct 19 11:50:04 2013 +0200

# Node ID f98c0b44c17dbb718c8449f3eabcbc7b8bdc825d
# Parent  2306f17ea8f3e40d1a3668c24695a50bfad34d1f
#10963: More functorial constructions
# Sun Oct 27 13:58:49 2013 +0100

# Node ID 70a11b0abddbee6bfbac4103147808fc1a792647
# Parent  df8fdfb31c4eca2d3761f268e3f41ceb9a6aeb81
trac #10963 doctests corrections
# Tue Oct 29 20:14:19 2013 +0100

# Node ID e374533eb4a23dfff21146ffe4834ae93ca70769
# Parent  599ab9a6bd8d8015fb6c6247fcfbd27912c9f0d3
#10963: More functorial constructions (fix graded modules with basis)
merging sage/categories/category.py
Merge branch 'master' into 10963
duplication introduced in my own merge removed
typos and unused imports
Merge branch 'public/ticket/10963' of ssh://trac.sagemath.org:2222/sage into public/ticket/10963
Fixed ncsym/bases.py doctest.
Reverted cached_function to weak_cached_function.
Merge branch 'develop' into public/ticket/10963

* develop: (206 commits)
  Updated Sage version to 6.1.beta2
  fix latex
  fix documentation
  minor typography
  Trac 13101: mark doctest as "long time"
  trac 13101 better doctest
  Trac 13101: Fix bug in enumerate_totallyreal_fields_all
  #9706: review patch.
  trac 9706: Propose new class structure
  Symbolic Chebyshev polynomials: reviewer patch
  trac 9706: Collective patch. Bugfixes, extensions, optimizations, documentation, doctests for chebyshev_T, chebyshev_U and base class for ortho polys
  Updated Sage version to 6.1.beta1
  Fixing Whitespace errors
  Use bash as SHELL for build/Makefile
  allow numpy arrays in list_plot, line, points
  Run Jmol from current directory
  Trac #12322: Add a doctest for the correct behavior introduced in trac #12737.
  Trac #14186 coerce_binop errors with keyword arguments
  trac #15553: Broken links in the doc of graph/ and numerical/
  bug fix : importing BooleanPolynomialRing at the top-level prevents sage from starting
  ...
Merge ticket/15506 into ticket/10963 to fix recursion error

* 'u/SimonKing/ticket/15506' of git://trac.sagemath.org/sage:
  Trac 15506: Add a test (review commit)
  trac 15506: ensure that WeakValueDictionary deletes entries via a list, so that we benefit from Python's trashcan
  trac #15432: Code context manager in iterator via try/finally. This saves an entire class and some reference management.Z
  trac #15432: also equip iteration context with a weak reference
  trac #15432: use a callback class object holding a weak reference for sage.misc.weak_dict.WeakValueDictionary
Merge branch 'u/SimonKing/ticket/10963' of trac.sagemath.org:sage into public/ticket/10963

* 'u/SimonKing/ticket/10963' of trac.sagemath.org:sage:
  Trac 15506: Add a test (review commit)
  trac 15506: ensure that WeakValueDictionary deletes entries via a list, so that we benefit from Python's trashcan
  trac #15432: Code context manager in iterator via try/finally. This saves an entire class and some reference management.Z
  trac #15432: also equip iteration context with a weak reference
  trac #15432: use a callback class object holding a weak reference for sage.misc.weak_dict.WeakValueDictionary
Trac 10963: Avoid infinite recursion in cached function
Merge branch 'public/ticket/10963' of trac.sagemath.org:sage into testing_10963

* 'public/ticket/10963' of trac.sagemath.org:sage:
  Trac 10963: Avoid infinite recursion in cached function
  Reverted cached_function to weak_cached_function.
  Fixed ncsym/bases.py doctest.
  typos and unused imports
  duplication introduced in my own merge removed
  # Tue Oct 29 20:14:19 2013 +0100
  # Sun Oct 27 13:58:49 2013 +0100
  # Sat Oct 19 11:50:04 2013 +0200
  Trac #13394: Implement faster and safer WeakValueDictionary
trac 10963: Avoid access to a lazy class attribute while it is being
computed
Merge branch 'public/ticket/10963' of trac.sagemath.org:sage into public/ticket/10963

* 'public/ticket/10963' of trac.sagemath.org:sage:
  trac 10963: Avoid access to a lazy class attribute while it is being computed
Merge branch 'develop' into public/ticket/10963

* develop: (59 commits)
  Updated Sage version to 6.1.beta4
  trac #15572: DiGraph.is_directed_acyclic handles loops pretty well
  Fixed bug in uniform matroid.
  trac #15619: Pickling multigraphs with loops and labels
  Trac 15619: Review commit
  Trac 15603: More doctests, nicer error message
  No need to specify caller_name in verbose()
  Add comments, small cosmetic changes
  Make q monic before computing cubic resolvent
  Implement splitting fields for number fields
  trac #15619: bug in the former definition; exception to avoid it in the future
  trac 8723: fix one line in isogeny_small_degree
  Use "in" instead of PyDict_Contains()
  test for membership with `x in self`; minor doc formatting change
  trac #15619: Pickling of immutable graphs
  Rebased on sage-6.1.beta2
  # User Thomas Feulner <thomas.feulner@uni-bayreuth.de>
  Implemented IntegerVectors_nk.rank(). Fixes #15609
  Trac #5153: small change in documentation.
  Trac 7695: Variable name for all subfields where the name ends with a digit
  ...

Conflicts:
	src/sage/rings/finite_rings/integer_mod_ring.py
Trac 10963: Provide doctests for the changed behaviour of a lazy class
attribute