Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6824 closed defect (fixed)

[with patch, positive review] cdef in timeseries.pyx follows use of variable

Reported by: jason Owned by: was
Priority: minor Milestone: sage-4.1.2
Component: finance Keywords:
Cc: was Merged in: Sage 4.1.2.alpha4
Authors: Jason Grout Reviewers: Mike Hansen
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

During sage -upgrade (from a mirror)

<snip> python which cython --embed-positions --incref-local-binop -I/usr/local/src/sage-4.1/devel/sage-main -o sage/finance/time_series.c sage/finance/time_series.pyx warning: /usr/local/src/sage-4.1/devel/sage-main/sage/finance/time_series.pyx:1722:24: cdef variable 'j' declared after it is used

Interesting. We have in that function:

v = [(mn + j*step, mn + (j+1)*step) for j in range(bins)]

and then a few lines later:

cdef Py_ssize_t j

That's probably a bad idea. The cdef line should be above that first line.

Attachments (2)

trac_6824-cdef-in-timeseries.pyx (896 bytes) - added by jason 11 years ago.
trac_6824-cdef-in-timeseries.patch (896 bytes) - added by jason 11 years ago.
same as above, but with a ".patch" extension

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by jason

comment:1 Changed 11 years ago by jason

  • Authors set to Jason Grout
  • Cc was added
  • Summary changed from cdef in timeseries.pyx follows use of variable to [with patch, needs review] cdef in timeseries.pyx follows use of variable

comment:2 Changed 11 years ago by jason

  • Priority changed from major to minor

comment:3 Changed 11 years ago by mvngu

Jason: You should change the file extension to ".patch" so the patch would display nicely within the browser.

Changed 11 years ago by jason

same as above, but with a ".patch" extension

comment:4 Changed 11 years ago by mhansen

  • Reviewers set to Mike Hansen
  • Summary changed from [with patch, needs review] cdef in timeseries.pyx follows use of variable to [with patch, positive review] cdef in timeseries.pyx follows use of variable

Looks good to me.

comment:5 Changed 11 years ago by mvngu

  • Merged in set to Sage 4.1.2.alpha3
  • Resolution set to fixed
  • Status changed from new to closed

Merged trac_6824-cdef-in-timeseries.patch.

comment:6 Changed 11 years ago by mvngu

  • Merged in changed from Sage 4.1.2.alpha3 to Sage 4.1.2.alpha4

There is no 4.1.2.alpha3. Sage 4.1.2.alpha3 was William Stein's release for working on making the notebook a standalone package.

Note: See TracTickets for help on using tickets.