Ticket #6518 (closed defect: fixed)

Opened 14 months ago

Last modified 14 months ago

[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 Keywords:
Cc: Author(s): Burcin Erocal
Report Upstream: Reviewer(s): Mike Hansen
Merged in: sage-4.1.1.alpha0 Work issues:

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

trac_6518-doctest_warning.patch Download (0.9 KB) - added by burcin 14 months ago.
patch for the scripts repository

Change History

Changed 14 months ago by burcin

patch for the scripts repository

Changed 14 months ago by mhansen

  • reviewer 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
  • author set to Burcin Erocal

Looks good to me.

Changed 14 months ago by mvngu

  • status changed from new to closed
  • resolution set to fixed
  • merged set to sage-4.1.1.alpha0
Note: See TracTickets for help on using tickets.