# HG changeset patch
# User Craig Citro <craigcitro@gmail.com>
# Date 1232668475 28800
# Node ID 1fb8b9e07a50fb021706d1690983dd177059e008
# Parent f8fb0bf3e547d65a0f90f5b27d543c8cf4ca9da0
Fix trac #5059 -- fix unpickling of old modular symbols spaces.
diff -r f8fb0bf3e547 -r 1fb8b9e07a50 sage/categories/map.pyx
a
|
b
|
|
52 | 52 | cdef _update_slots(self, _slots): |
53 | 53 | self._domain = _slots['_domain'] |
54 | 54 | self._codomain = _slots['_codomain'] |
55 | | self._repr_type_str = _slots['_repr_type_str'] |
| 55 | # Several pickles exist without a _repr_type_str, so |
| 56 | # if there is none saved, we just set it to None. |
| 57 | if _slots.has_key('_repr_type_str'): |
| 58 | self._repr_type_str = _slots['_repr_type_str'] |
| 59 | else: |
| 60 | self._repr_type_str = None |
56 | 61 | |
57 | 62 | def _test_update_slots(self, _slots): |
58 | 63 | self._update_slots(_slots) |
diff -r f8fb0bf3e547 -r 1fb8b9e07a50 sage/modular/all.py
a
|
b
|
|
10 | 10 | kronecker_character, kronecker_character_upside_down, |
11 | 11 | trivial_character) |
12 | 12 | |
13 | | from congroup import (Gamma0, Gamma1, GammaH, SL2Z, |
| 13 | from congroup import (Gamma0_constructor as Gamma0, |
| 14 | Gamma1_constructor as Gamma1, |
| 15 | GammaH_constructor as GammaH, |
| 16 | SL2Z, |
14 | 17 | is_CongruenceSubgroup, is_Gamma0, is_Gamma1, is_GammaH, is_SL2Z) |
15 | 18 | |
16 | 19 | from cusps import Cusp, Cusps |
diff -r f8fb0bf3e547 -r 1fb8b9e07a50 sage/modular/congroup.py
a
|
b
|
|
603 | 603 | |
604 | 604 | |
605 | 605 | _gammaH_cache = {} |
606 | | def GammaH(level, H): |
| 606 | def GammaH_constructor(level, H): |
607 | 607 | r""" |
608 | 608 | Return the congruence subgroup $\Gamma_H(N)$, which is the subgroup of |
609 | 609 | $SL_2(\Z)$ consisting of matrices of the form $\begin{pmatrix} a & b \\ |
… |
… |
|
1364 | 1364 | return isinstance(x, Gamma0_class) |
1365 | 1365 | |
1366 | 1366 | _gamma0_cache = {} |
1367 | | def Gamma0(N): |
| 1367 | def Gamma0_constructor(N): |
1368 | 1368 | """ |
1369 | 1369 | Return the congruence subgroup Gamma0(N). |
1370 | 1370 | |
… |
… |
|
1848 | 1848 | return (isinstance(x, Gamma1_class) or is_SL2Z(x)) |
1849 | 1849 | |
1850 | 1850 | _gamma1_cache = {} |
1851 | | def Gamma1(N): |
| 1851 | def Gamma1_constructor(N): |
1852 | 1852 | r""" |
1853 | 1853 | Return the congruence subgroup $\Gamma_1(N)$. |
1854 | 1854 | |
… |
… |
|
2068 | 2068 | import congroup_pyx |
2069 | 2069 | degeneracy_coset_representatives_gamma0 = congroup_pyx.degeneracy_coset_representatives_gamma0 |
2070 | 2070 | degeneracy_coset_representatives_gamma1 = congroup_pyx.degeneracy_coset_representatives_gamma1 |
| 2071 | |
| 2072 | ########################################################### |
| 2073 | # Re-bindings for unpickling |
| 2074 | # |
| 2075 | # Because we have a large number of pickles which were |
| 2076 | # created when Gamma0, Gamma1, etc., were still classes |
| 2077 | # as opposed to functions, we can't unpickle these unless |
| 2078 | # sage.modular.congroup.Gamma0, etc. are classes. So we |
| 2079 | # re-bind these as such below -- note that these bindings |
| 2080 | # are *DIFFERENT* than the bindings for Gamma0, etc. that |
| 2081 | # get imported in all.py. |
| 2082 | # |
| 2083 | # See trac #5059. |
| 2084 | # |
| 2085 | ########################################################### |
| 2086 | |
| 2087 | Gamma0 = Gamma0_class |
| 2088 | Gamma1 = Gamma1_class |
| 2089 | GammaH = GammaH_class |