Opened 12 years ago

Closed 12 years ago

#6518 closed defect (fixed)

[with patch, positive review] doctest script uses deprecated signature for showwarning

Reported by: burcin Owned by: tbd
Priority: major Milestone: sage-4.1.1
Component: doctest coverage Keywords:
Cc: Merged in: sage-4.1.1.alpha0
Authors: Burcin Erocal Reviewers: Mike Hansen
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I got this while doctesting a patch with 4.1:

sage -t  "devel/sage-s/sage/symbolic/expression_conversions.py"
/home/burcin/sage/sage-4.1/local/lib/python/site-packages/sage/misc/misc.py:1901: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
  warn(message, DeprecationWarning, stacklevel=3)

Apparently showwarning got a new argument in Python 2.6, as stated here:

http://docs.python.org/library/warnings.html#showwarning/show

Attached patch fixes the sage-doctest script to use the new call signature.

Attachments (1)

trac_6518-doctest_warning.patch (906 bytes) - added by burcin 12 years ago.
patch for the scripts repository

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by burcin

patch for the scripts repository

comment:1 Changed 12 years ago by mhansen

  • Authors set to Burcin Erocal
  • Reviewers set to Mike Hansen
  • Summary changed from [with patch, needs review] doctest script uses deprecated signature for showwarning to [with patch, positive review] doctest script uses deprecated signature for showwarning

Looks good to me.

comment:2 Changed 12 years ago by mvngu

  • Merged in set to sage-4.1.1.alpha0
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.