#20255: deprecated_function_alias should not appear in the documentation of 
posets
-------------------------------------+-------------------------------------
       Reporter:  jmantysalo         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  documentation      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/jdemeyer/deprecated_function_alias_should_not_appear_in_the_documentation_of_posets|
  09c288af4239b36b19e3a3504ced1fe4e5649db6
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jmantysalo):

 Replying to [comment:13 jdemeyer]:
 > Replying to [comment:12 jmantysalo]:
 > > They kind of suggests wrong way to make a deprecation.
 >
 > The intent of the documentation is clear to me (you almost never want to
 import something inside a class), but I'm open to suggestions.

 I tried this:

 {{{
 diff --git a/src/doc/en/developer/coding_in_python.rst
 b/src/doc/en/developer/coding_in_python.rst
 index 4eec8bd..2f237a7 100644
 --- a/src/doc/en/developer/coding_in_python.rst
 +++ b/src/doc/en/developer/coding_in_python.rst
 @@ -491,19 +491,23 @@ documentation for more information on its behaviour
 and optional arguments.
    ``my_function(my_old_keyword=5)`` will see a warning::

        from sage.misc.decorators import rename_keyword
 -      @rename_keyword(deprecation=666, my_old_keyword='my_new_keyword')
 -      def my_function(my_new_keyword=True):
 -          return my_new_keyword
 +      ...
 +
 +          @rename_keyword(deprecation=666,
 my_old_keyword='my_new_keyword')
 +          def my_function(my_new_keyword=True):
 +              return my_new_keyword

  * **Rename a function/method:** call
 }}}

 but then syntax highlight disappeared from html ouput. So maybe we forgot
 this, and I try to remember right place for `import` next time I deprecate
 something.

--
Ticket URL: <http://trac.sagemath.org/ticket/20255#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to