Opened 5 years ago

Closed 5 years ago

#22403 closed enhancement (fixed)

py3: /sage/misc/inherit_comparison is not python3 compatible

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.0
Component: python3 Keywords:
Cc: jdemeyer Merged in:
Authors: Jeroen Demeyer Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: d64bcd5 (Commits, GitHub, GitLab) Commit: d64bcd5e4c123eda9c2bc2f60fce1c1624262e4c
Dependencies: Stopgaps:

Status badges

Description (last modified by chapoton)

trying to compile, one gets:

[sagelib-7.6.beta4] /home/chapoton/sage3/src/build/cythonized/sage/misc/inherit_comparison.c: In function '__pyx_pf_4sage_4misc_18inherit_comparison_26InheritComparisonMetaclass___init__':
[sagelib-7.6.beta4] /home/chapoton/sage3/src/build/cythonized/sage/misc/inherit_comparison.c:952:3: error: unknown type name 'cmpfunc'
[sagelib-7.6.beta4]    cmpfunc __pyx_t_5;
[sagelib-7.6.beta4]    ^
[sagelib-7.6.beta4] /home/chapoton/sage3/src/build/cythonized/sage/misc/inherit_comparison.c:999:30: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_compare'
[sagelib-7.6.beta4]      __pyx_t_3 = ((!(__pyx_v_t->tp_compare != 0)) != 0);
[sagelib-7.6.beta4]                               ^
[sagelib-7.6.beta4] /home/chapoton/sage3/src/build/cythonized/sage/misc/inherit_comparison.c:1021:28: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_compare'
[sagelib-7.6.beta4]        __pyx_t_5 = __pyx_v_b->tp_compare;
[sagelib-7.6.beta4]                             ^
[sagelib-7.6.beta4] /home/chapoton/sage3/src/build/cythonized/sage/misc/inherit_comparison.c:1022:16: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_compare'
[sagelib-7.6.beta4]        __pyx_v_t->tp_compare = __pyx_t_5;
[sagelib-7.6.beta4]                 ^
[sagelib-7.6.beta4] error: command 'gcc' failed with exit status 1

REF:

Change History (8)

comment:1 Changed 5 years ago by chapoton

  • Description modified (diff)

comment:2 Changed 5 years ago by chapoton

  • Description modified (diff)

comment:3 Changed 5 years ago by chapoton

Just removing the use of tp_compare seems to cause failures such as

sage: L = QuadraticField(3)
sage: M = loads(dumps(L))
sage: L == M
False

involving the dynamic metaclasses..

comment:4 Changed 5 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Milestone changed from sage-7.6 to sage-8.0

comment:5 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/py3___sage_misc_inherit_comparison_is_not_python3_compatible

comment:6 Changed 5 years ago by jdemeyer

  • Commit set to d64bcd5e4c123eda9c2bc2f60fce1c1624262e4c
  • Status changed from new to needs_review

New commits:

d64bcd5Make inherit_comparison.pyx compatible with Python 3

comment:7 Changed 5 years ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

thanks a lot !

ok, at least one green bot, so let it be

comment:8 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/py3___sage_misc_inherit_comparison_is_not_python3_compatible to d64bcd5e4c123eda9c2bc2f60fce1c1624262e4c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.