Opened 3 years ago

Last modified 3 years ago

#22037 closed enhancement

Upgrade to Python 2.7.13 — at Version 7

Reported by: jdemeyer Owned by:
Priority: blocker Milestone: sage-7.5
Component: packages: standard Keywords:
Cc: SimonKing, hivert, slelievre, charpent Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #19735 Stopgaps:

Description (last modified by nthiery)

Python 2.7.13rc1 leads to problems with sage related to __new__. It is likely related to this change that was included in Python: https://bugs.python.org/issue5322

See the following discussion on sage-devel: https://groups.google.com/forum/#!topic/sage-devel/IbugChsM26E

But first we should upgrade to Python 2.7.12: #19735

See also https://bugs.python.org/issue25731, where a patch at the same location was reverted as backward incompatible after causing a failure in Sage.

Change History (8)

comment:1 Changed 3 years ago by thansen

  • Description modified (diff)

comment:2 Changed 3 years ago by thansen

  • Description modified (diff)

comment:3 Changed 3 years ago by jdemeyer

  • Description modified (diff)

Changed 3 years ago by thansen

This is a small example showing how the ClasscallMetaclass? leads to the error.

comment:4 follow-up: Changed 3 years ago by thansen

So we have

class UniqueRepresentation(CachedRepresentation, WithEqualityById)

where CachedRepresentation uses ClasscallMetaclass and WithEqualityById is a cdef class.

If I change that to

class UniqueRepresentation(WithEqualityById, CachedRepresentation)

the error goes away. I don't know if that would be a correct fix though.

Last edited 3 years ago by thansen (previous) (diff)

comment:5 in reply to: ↑ 4 Changed 3 years ago by nthiery

Replying to thansen:

So we have

class UniqueRepresentation(CachedRepresentation, WithEqualityById)

where CachedRepresentation uses ClasscallMetaclass and WithEqualityById is a cdef class.

If I change that to

class UniqueRepresentation(WithEqualityById, CachedRepresentation)

the error goes away. I don't know if that would be a correct fix though.

In principle, the features provided by the two super classes are orthogonal (equality vs construction). Right now, I don't remember enough the details to see whether there could be subtleties due to one class being cdef. I'll dig further.

Simon, any opinion?

Cheers,

Nicolas

comment:6 Changed 3 years ago by nthiery

  • Cc SimonKing added

comment:7 Changed 3 years ago by nthiery

  • Description modified (diff)
Note: See TracTickets for help on using tickets.