Opened 13 years ago

Closed 13 years ago

#7272 closed defect (fixed)

Upgrade to Cython 0.12

Reported by: robertwb Owned by: mabshoff
Priority: major Milestone: sage-4.3
Component: packages: standard Keywords:
Cc: Merged in: sage-4.3.rc0
Authors: Robert Bradshaw Reviewers: Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Cython 0.12 isn't released yet, but should be shortly, and this ticket is about getting Sage to compile and pass all tests.

Spkg at

Also depends on patch at #7023 (to be applied before the attached patch).

Attachments (1)

7272-cython-0.12.patch (6.4 KB) - added by robertwb 13 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 13 years ago by robertwb

  • Status changed from new to needs_work

I had to force cdivision=True globally as way to much stuff broke otherwise (and even if all tests passed, it's a bold move that should be taken after looking through the entire library for problems).

comment:2 Changed 13 years ago by robertwb

I've gotten everything working but

	sage -t  "sage/modular/modsym/"
	sage -t  "sage/modular/modsym/heilbronn.pyx"


sage -t  "devel/sage-cython2/sage/modular/modsym/heilbronn.pyx"
python(96760) malloc: *** mmap(size=1744830464) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
File "/Users/robertwb/sage/sage-4.0/devel/sage-cython2/sage/modular/modsym/heilbronn.pyx", line 839:
    sage: sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(4,1,3,15,6,[1,11,12], R)
Exception raised:
    Traceback (most recent call last):
      File "/Users/robertwb/sage/sage-4.0/local/bin/", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/robertwb/sage/sage-4.0/local/bin/", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/robertwb/sage/sage-4.0/local/bin/", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_17[4]>", line 1, in <module>
        sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(Integer(4),Integer(1),Integer(3),Integer(15),Integer(6),[Integer(1),Integer(11),Integer(12)], R)###line 839:
    sage: sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(4,1,3,15,6,[1,11,12], R)
      File "heilbronn.pyx", line 877, in sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k (sage/modular/modsym/heilbronn.c:7652)
      File "heilbronn.pyx", line 417, in sage.modular.modsym.heilbronn.HeilbronnMerel.__init__ (sage/modular/modsym/heilbronn.c:4561)
    SystemError: NULL result without error in PyObject_Call
1 items had failures:
   1 of   8 in __main__.example_17
***Test Failed*** 1 failures.

comment:3 Changed 13 years ago by robertwb

Above failure due to memory corruption caused by

Sage builds and passes all tests (vanilla 4.2 + attached patch)

Changed 13 years ago by robertwb

comment:4 Changed 13 years ago by mhansen

  • Authors set to Robert Bradshaw
  • Merged in set to sage-4.3.alpha0
  • Resolution set to fixed
  • Reviewers set to Mike Hansen
  • Status changed from needs_work to closed

Looks good to me.

I went ahead and removed the src/.hg/ repo from the Cython spkg and checked in the modification to spkg-install. The new spkg can be found at

comment:5 Changed 13 years ago by robertwb

  • Status changed from closed to needs_work

Thanks for doing this, but 0.12 isn't officially out yet. Fortunately, I just updated the spkg to the most recent release candidate a couple of days ago. I see a release happening in the next week, so the only change (that impacts us, there's two windows fixes since then) will be the version number bump (I hope).

The linked spkg should work fine, but if we release soon (before you do) I'd be nice to actually be synced with upstream.

comment:6 Changed 13 years ago by mhansen

I think 0.12 will be out before 4.3. I'll include the official 0.12 in the main release.

comment:7 Changed 13 years ago by jason

  • Report Upstream set to N/A

It looks like 0.12 is out now. From the Cython webpage:

The latest release of Cython is 0.12 (released 2009-11-23).

Is the official release in the spkg above, or were there changes since the spkg above?

And congrats on the 0.12 release! I'm excited about the improvements in it!

comment:8 Changed 13 years ago by robertwb

I'll upload the actual spkg.

comment:9 Changed 13 years ago by robertwb

comment:10 Changed 13 years ago by robertwb

  • Status changed from needs_work to needs_review

comment:11 Changed 13 years ago by robertwb

  • Status changed from needs_review to positive_review

I'm changing this to positive review, as the changes between when this was merged and the official upstream are minimal.

comment:12 Changed 13 years ago by mhansen

  • Merged in changed from sage-4.3.alpha0 to sage-4.3.rc0
  • Status changed from positive_review to closed

I've merged this new spkg in 4.3.rc0

Note: See TracTickets for help on using tickets.