Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#25759 closed defect (duplicate)

Patch scipy to fix issue with python3.7

Reported by: vklein Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Vincent Klein Reviewers:
Report Upstream: N/A Work issues:
Branch: u/vklein/patch_scipy_to_fix_issue_with_python3_7 (Commits, GitHub, GitLab) Commit: 158885c6bb365142772cf3bc69cba90db3e25a3c
Dependencies: Stopgaps:

Status badges

Description

Installing scipy 0.19.1 (source release) with python 3.7 generate multiple errors of this kind:

scipy/cluster/_vq.c: In function ‘__Pyx__ExceptionSave’:
    scipy/cluster/_vq.c:9728:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         *type = tstate->exc_type;
                       ^
    scipy/cluster/_vq.c:9729:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         *value = tstate->exc_value;
                        ^
    scipy/cluster/_vq.c:9730:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         *tb = tstate->exc_traceback;

This can be fixed by forcing *.pyx files to be recythonized.

Change History (10)

comment:1 Changed 3 years ago by vklein

  • Branch set to u/vklein/patch_scipy_to_fix_issue_with_python3_7

comment:2 Changed 3 years ago by jdemeyer

  • Commit set to bb3787d079dd70ebc4bc48a8a03416cfa3a15271

Do you have to remove cythonize.dat? If so, document why.


New commits:

6df21c3Trac #25759: Force scipy to cythonize *.pyx files
bb3787dTrac #25759: update package version

comment:3 Changed 3 years ago by vklein

from ​6df21c3 comment:

- Remove cythonize.dat file : That contains the hashcode
used to define if the *.pyx files has been modified

You mean in file fix-scipy-0.19.1-for-python37.patch ?

comment:4 Changed 3 years ago by git

  • Commit changed from bb3787d079dd70ebc4bc48a8a03416cfa3a15271 to 158885c6bb365142772cf3bc69cba90db3e25a3c

Branch pushed to git repo; I updated commit sha1. New commits:

158885cTrac #25759: add some doc in .patch file

comment:5 Changed 3 years ago by vklein

  • Status changed from new to needs_review

comment:6 Changed 3 years ago by jdemeyer

If you really must remove cythonize.dat, I would do it with a rm -f instead of a patch. The problem with a patch is that it must be updated every time we upgrade scipy.

comment:7 follow-up: Changed 3 years ago by jdemeyer

Maybe we should try #24766 first, that might also fix the issue.

comment:8 in reply to: ↑ 7 Changed 3 years ago by vklein

  • Milestone changed from sage-8.3 to sage-duplicate/invalid/wontfix

Replying to jdemeyer:

Maybe we should try #24766 first, that might also fix the issue.

Yes ! #24766 works.

comment:9 Changed 3 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from needs_review to closed

Sorry for the wasted effort Vincent.

comment:10 Changed 3 years ago by vklein

No problem ! Upgrading is better than patching.

Note: See TracTickets for help on using tickets.