Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing a wrong doc construction #24851

Closed
fchapoton opened this issue Feb 27, 2018 · 6 comments
Closed

fixing a wrong doc construction #24851

fchapoton opened this issue Feb 27, 2018 · 6 comments

Comments

@fchapoton
Copy link
Contributor

that is not compatible with python3

CC: @embray @jdemeyer

Component: documentation

Author: Frédéric Chapoton

Branch/Commit: 9d6e1aa

Reviewer: Erik Bray

Issue created by migration from https://trac.sagemath.org/ticket/24851

@fchapoton fchapoton added this to the sage-8.2 milestone Feb 27, 2018
@fchapoton
Copy link
Contributor Author

Commit: 9d6e1aa

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/24851

@fchapoton
Copy link
Contributor Author

New commits:

9d6e1aafixing a wrong doc construction

@embray
Copy link
Contributor

embray commented Feb 27, 2018

Reviewer: Erik Bray

@embray
Copy link
Contributor

embray commented Feb 27, 2018

comment:2

For what it's worth, this solution from my py3 branch also works:

diff --git a/src/sage/coding/decoder.py b/src/sage/coding/decoder.py
index 1f8be03..1dad583 100644
--- a/src/sage/coding/decoder.py
+++ b/src/sage/coding/decoder.py
@@ -19,6 +19,8 @@ AUTHORS:
 #                  http://www.gnu.org/licenses/
 #*****************************************************************************

+from six import get_unbound_function as get_func
+
 from sage.misc.abstract_method import abstract_method
 from sage.structure.sage_object import SageObject

@@ -362,7 +364,7 @@ class Decoder(SageObject):
         """
         raise NotImplementedError

-Decoder._instance_decoder_type.__func__.__doc__ = Decoder.decoder_type.__doc__
+get_func(Decoder._instance_decoder_type).__doc__ = Decoder.decoder_type.__doc__

 class DecodingError(Exception):
     r"""

But I agree with your patch--in this case (particularly since it's just an internal method) it's really not important to be doing this. But you can use something like the above for future cases if applicable.

@vbraun
Copy link
Member

vbraun commented Mar 5, 2018

Changed branch from u/chapoton/24851 to 9d6e1aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants