Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix pickling of sections for p-adic coercions
Browse files Browse the repository at this point in the history
  • Loading branch information
roed314 committed Aug 3, 2017
1 parent 7f87069 commit b9c2fe4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/sage/rings/padics/CA_template.pxi
Expand Up @@ -1172,7 +1172,7 @@ cdef class pAdicCoercion_ZZ_CA(RingHomomorphism):
True
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -1599,7 +1599,7 @@ cdef class pAdicCoercion_CA_frac_field(RingHomomorphism):
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down
8 changes: 4 additions & 4 deletions src/sage/rings/padics/CR_template.pxi
Expand Up @@ -1706,7 +1706,7 @@ cdef class pAdicCoercion_ZZ_CR(RingHomomorphism):
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -1924,7 +1924,7 @@ cdef class pAdicCoercion_QQ_CR(RingHomomorphism):
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -2131,7 +2131,7 @@ cdef class pAdicConvert_QQ_CR(Morphism):
True
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return Morphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -2394,7 +2394,7 @@ cdef class pAdicCoercion_CR_frac_field(RingHomomorphism):
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/padics/FM_template.pxi
Expand Up @@ -965,7 +965,7 @@ cdef class pAdicCoercion_ZZ_FM(RingHomomorphism):
True
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down
6 changes: 3 additions & 3 deletions src/sage/rings/padics/FP_template.pxi
Expand Up @@ -1371,7 +1371,7 @@ cdef class pAdicCoercion_ZZ_FP(RingHomomorphism):
True
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -1587,7 +1587,7 @@ cdef class pAdicCoercion_QQ_FP(RingHomomorphism):
True
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down Expand Up @@ -2013,7 +2013,7 @@ cdef class pAdicCoercion_FP_frac_field(RingHomomorphism):
"""
_slots['_zero'] = self._zero
_slots['_section'] = self._section
_slots['_section'] = self.section() # use method since it copies coercion-internal sections.
return RingHomomorphism._extra_slots(self, _slots)

cdef _update_slots(self, dict _slots):
Expand Down

0 comments on commit b9c2fe4

Please sign in to comment.