From 17e08b9aefc1d557a95553212afd376d3ee0b7e5 Mon Sep 17 00:00:00 2001 From: Enrique Artal Date: Mon, 10 Jun 2024 05:17:20 +0200 Subject: [PATCH 1/4] change order in class UniqueRepresentation --- src/sage/structure/unique_representation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/unique_representation.py index 7c0652e519f..988ca2f1bba 100644 --- a/src/sage/structure/unique_representation.py +++ b/src/sage/structure/unique_representation.py @@ -1163,7 +1163,7 @@ def unreduce(cls, args, keywords): return cls(*args, **keywords) -class UniqueRepresentation(CachedRepresentation, WithEqualityById): +class UniqueRepresentation(WithEqualityById, CachedRepresentation): r""" Classes derived from ``UniqueRepresentation`` inherit a unique representation behavior for their instances. From 0aa3e6d63a4318d17ea77eaea11551faa4a28c56 Mon Sep 17 00:00:00 2001 From: Enrique Artal Date: Wed, 12 Jun 2024 16:50:07 +0200 Subject: [PATCH 2/4] change a couple of test outputs --- src/sage/categories/category_singleton.pyx | 4 ++-- src/sage/categories/sets_cat.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/category_singleton.pyx b/src/sage/categories/category_singleton.pyx index 446c3f5ee33..7d450ecbd65 100644 --- a/src/sage/categories/category_singleton.pyx +++ b/src/sage/categories/category_singleton.pyx @@ -218,14 +218,14 @@ class Category_singleton(Category): , , , - , , + , , , , , , - <... 'object'>] + ] sage: R() is R() True sage: R() is R().__class__() diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 8699dcf8b43..7a63e0ad35a 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -136,15 +136,15 @@ class Sets(Category_singleton): - + - <... 'object'> + We run some generic checks on P:: From 785b37aed955b21da470f049191a3d1eef516d47 Mon Sep 17 00:00:00 2001 From: Enrique Artal Date: Thu, 13 Jun 2024 07:57:13 +0200 Subject: [PATCH 3/4] remove failing compatibility class --- src/sage/combinat/root_system/cartan_type.py | 36 -------------------- 1 file changed, 36 deletions(-) diff --git a/src/sage/combinat/root_system/cartan_type.py b/src/sage/combinat/root_system/cartan_type.py index e4526d5f079..8899b07bf21 100644 --- a/src/sage/combinat/root_system/cartan_type.py +++ b/src/sage/combinat/root_system/cartan_type.py @@ -3069,39 +3069,3 @@ def __getitem__(self, i): raise IndexError("index out of range") options = CartanType.options - -############################################################################## -# For backward compatibility - - -class CartanType_simple_finite: - def __setstate__(self, dict): - """ - Implements the unpickling of Cartan types pickled by Sage <= 4.0. - - EXAMPLES: - - This is the pickle for CartanType(["A", 4]):: - - sage: pg_CartanType_simple_finite = unpickle_global('sage.combinat.root_system.cartan_type', 'CartanType_simple_finite') - sage: si1 = unpickle_newobj(pg_CartanType_simple_finite, ()) - sage: from sage.misc.fpickle import unpickleModule - sage: pg_make_integer = unpickle_global('sage.rings.integer', 'make_integer') - sage: si2 = pg_make_integer('4') - sage: unpickle_build(si1, {'tools':unpickleModule('sage.combinat.root_system.type_A'), 't':['A', si2], 'letter':'A', 'n':si2}) - - sage: si1 - ['A', 4] - sage: si1.dynkin_diagram() # needs sage.graphs - O---O---O---O - 1 2 3 4 - A4 - - This is quite hacky; in particular unique representation is not preserved:: - - sage: si1 == CartanType(["A", 4]) # todo: not implemented - True - """ - T = CartanType([dict['letter'], dict['n']]) - self.__class__ = T.__class__ - self.__dict__ = T.__dict__ From d468273706eaaaccc4a3d95dd8fa0f492fe6886e Mon Sep 17 00:00:00 2001 From: Enrique Artal Date: Wed, 10 Jul 2024 09:07:38 +0200 Subject: [PATCH 4/4] change tests due to unique representation change --- src/sage/categories/category_singleton.pyx | 2 +- src/sage/categories/sets_cat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/category_singleton.pyx b/src/sage/categories/category_singleton.pyx index d907eedb9e8..6cd17581630 100644 --- a/src/sage/categories/category_singleton.pyx +++ b/src/sage/categories/category_singleton.pyx @@ -218,9 +218,9 @@ class Category_singleton(Category): , , , + , , , - , , , , diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 51eb9b14453..d8d278e80c5 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -136,9 +136,9 @@ class Sets(Category_singleton): + -