Changes between Initial Version and Version 4 of Ticket #28392


Ignore:
Timestamp:
09/18/19 13:22:25 (3 years ago)
Author:
embray
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28392

    • Property Status changed from new to positive_review
    • Property Summary changed from dynamic_class: do not copy over Python 3's new __weakref__ class attribute to dynamic_class: ignore Python 3's new __weakref__ class attribute
    • Property Branch changed from to u/nthiery/dynamic_class__do_not_copy_over_python_3_s_new___weakref___class_attribute
    • Property Reviewers changed from to Erik Bray
    • Property Commit changed from to 8046f1b03a38c34cdb14cd6baa49b35e07b03359
  • Ticket #28392 – Description

    initial v4  
    11Python3 introduce a new attribute `__weakref__` in the datastructure for classes in addition to `__dict__`. As such, this attribute should not be copied over by `dynamic_class`. Otherwise we get errors, typically upon introspection:
    2 ```
     2
     3{{{
    34    sage: from inspect import getmembers
    45    sage: c = EllipticCurve([0,0,1,-1,0])
     
    2930        sage: "__weakref__" in Foo1.__dict__
    3031        True
    31 ```
     32}}}
     33
    3234(should be False).
    3335