Ticket #11298: trac_11298-ref.patch

File trac_11298-ref.patch, 2.3 KB (added by jhpalmieri, 11 years ago)

referee patch; apply on top of others

  • sage/misc/decorators.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1311191884 25200
    # Node ID 834b05e941403c6c06676e3fca1acdd291c774b8
    # Parent  a3aa214cfeb810c804bb5c31687ba8d95caf1bb2
    #11298: referee patch
    
    diff --git a/sage/misc/decorators.py b/sage/misc/decorators.py
    a b def sage_wraps(wrapped, assigned = WRAPP 
    121121        #Getting the signature right in documentation by Sphinx (Trac 9976)
    122122        #The attribute _sage_argspec_() is read by Sphinx if present and used
    123123        #as the argspec of the function instead of using reflection.
    124         from sageinspect import sage_getargspec, sage_getsource
     124        from sageinspect import sage_getargspec
    125125        argspec = sage_getargspec(wrapped)
    126126        wrapper._sage_argspec_ = lambda: argspec
    127127        return wrapper
  • sage/misc/edit_module.py

    diff --git a/sage/misc/edit_module.py b/sage/misc/edit_module.py
    a b def file_and_line(obj): 
    8888   The following tests against a bug that was fixed in trac ticket #11298::
    8989
    9090      sage: edit_module.file_and_line(x)
    91       ('...sage/symbolic/expression.pyx', 191)
     91      ('...sage/symbolic/expression.pyx', ...)
    9292
    9393   """
    9494   #d = inspect.getdoc(obj)
  • sage/misc/sageinspect.py

    diff --git a/sage/misc/sageinspect.py b/sage/misc/sageinspect.py
    a b def sage_getargspec(obj): 
    10011001    decorated method appears to have the generic signature
    10021002    ``*args,**kwds``, but in fact it is only supposed to be called
    10031003    with the arguments requested by the underlying undecorated
    1004     method. We saw an easy example above, namely `I.groebner_basis`.
    1005     Here is a more difficult::
     1004    method. We saw an easy example above, namely ``I.groebner_basis``.
     1005    Here is a more difficult one::
    10061006
    10071007        sage: cython_code = [
    10081008        ... 'cdef class MyClass:',
    def sage_getsourcelines(obj, is_binary=F 
    13481348        ...
    13491349        '    raise ValueError, "k must be an integer or an integer + 1/2"\n'], 31)
    13501350
    1351     Here are some cases that where covered in trac ticket #11298;
     1351    Here are some cases that were covered in trac ticket #11298;
    13521352    note that line numbers may easily change, and therefore we do
    13531353    not test them::
    13541354