Ticket #12876: trac_12876_category-fix_abstract_class-nt-rel11521-review-nt.patch

File trac_12876_category-fix_abstract_class-nt-rel11521-review-nt.patch, 4.4 KB (added by nthiery, 8 years ago)
  • sage/categories/hecke_modules.py

    # HG changeset patch
    # User Nicolas M. Thiery <nthiery@users.sf.net>
    # Date 1335792780 -7200
    # Node ID 8857f7453fc31f124b44c756f5b344063da16c38
    # Parent  8cb952b620272c390b09116a3a0880388a2d1547
    [mq]: trac_12876_category-fix_abstract_class-nt-rel11521-review-nt.patch
    
    diff --git a/sage/categories/hecke_modules.py b/sage/categories/hecke_modules.py
    a b class HeckeModules(Category_module): 
    116116            Fixing :meth:`_test_zero` (``__call__`` should accept a
    117117            function as input) and :meth:`_test_elements` (modular
    118118            form morphisms elements should inherit from categories) is
    119             :trac:`???`.
     119            :trac:`12879`.
    120120
    121121            TESTS::
    122122
  • sage/categories/rings.py

    diff --git a/sage/categories/rings.py b/sage/categories/rings.py
    a b class Rings(Category_singleton): 
    561561
    562562
    563563    class HomCategory(HomCategory):
    564         def extra_super_categories(self):
    565             """
    566             EXAMPLES::
    567 
    568                 sage: Rings().hom_category().extra_super_categories()
    569                 [Category of sets]
    570             """
    571             from sage.categories.sets_cat import Sets
    572             return [Sets()]
    573 
    574 #         def get_Parent(self, X, Y):
    575 #             """
    576 #             Given two objects X and Y in this category, returns the parent
    577 #             class to be used for the collection of the morphisms of this
    578 #             category between X and Y.
    579 
    580 #             Returns self.ParentMethods by default.
    581 
    582 #             Rationale: some categories, like Rings or Schemes, currently
    583 #             use different classes for their homset, depending on some
    584 #             specific properties of X or Y which do not fit in the category
    585 #             hierarchy. For example, if X is a quotient field, morphisms
    586 #             can be defined by the image of the generators, even if Y
    587 #             itself is not a quotient field.
    588 
    589 #             Design question: should this really concern the parent for the
    590 #             homset, or just the possible classes for the elements?
    591 #             """
    592 #             category = self.base_category
    593 #             assert(X in category and Y in category)
    594 #             # return self.hom_category()(X, Y)?
    595 #             #print self.hom_category(), X, Y, self.hom_category().parent_class, self.hom_category().parent_class.mro()
    596 #             return self.ParentMethods
    597 
    598         class ParentMethods:
    599             # Design issue: when X is a quotient field, we can build
    600             # morphisms from X to Y by specifying the images of the
    601             # generators. This is not something about the category,
    602             # because Y need not be a quotient field.
    603 
    604             # Currently, and to minimize the changes, this is done by
    605             # delegating the job to RingHomset. This is not very robust:
    606             # for example, only one category can do this hack.
    607 
    608             # This should be cleaned up upon the next homset overhaul
    609 
    610             def __new__bx(cls, X, Y, category):
    611                 """
    612                 """
    613                 from sage.rings.homset import RingHomset
    614                 return RingHomset(X, Y, category = category)
    615 
    616             def __getnewargs__(self):
    617                 """
    618                 Note: without this method, :meth:`.__new__` gets called with no
    619                 argument upon unpickling. Maybe it would be preferable to
    620                 have :meth:`.__new__` accept to be called without arguments.
    621 
    622                 """
    623                 return (self.domain(), self.codomain(), self.category())
     564        pass
  • sage/schemes/elliptic_curves/ell_curve_isogeny.py

    diff --git a/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/sage/schemes/elliptic_curves/ell_curve_isogeny.py
    a b class EllipticCurveIsogeny(Morphism): 
    33453345            sage: phi._composition_(phi, phi.parent())
    33463346            Traceback (most recent call last):
    33473347            ...
    3348             NotImplementedError                     
     3348            NotImplementedError
    33493349
    33503350        The following should test that :meth:`_composition_` is called
    33513351        upon a product. However phi is currently improperly
    3352         constructed (see :trac:``), which triggers an assertion
     3352        constructed (see :trac:`12880`), which triggers an assertion
    33533353        failure before the actual call ::
    33543354
    33553355            sage: phi*phi