Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Collection. #10450

Merged
merged 2 commits into from Jul 26, 2020
Merged

Simplify Collection. #10450

merged 2 commits into from Jul 26, 2020

Commits on Jul 25, 2020

  1. Simplify Collection.

    Collection and its subclasses are now just new-types for tuple removing
    the previously awkward `dependencies` field exposed for the engine. The
    engine is updated to handle these Collections as Iterable Python
    objects when attempting to collect their contained values.
    jsirois committed Jul 25, 2020
    Configuration menu
    Copy the full SHA
    4cf6c31 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2020

  1. Fix equality under Python3.6.

    Test failures revealed isinstance for types derived from tuple behaves
    unexpectedly under Python3.6. Although this can be worked around by
    saving off the mro in __init_subclass__ and using that to perform a
    custom isinstance check, more investigation indicated two aspects of
    the status quo were undesirable:
    
    1. By returning NotImplemented we left equality up to foreign types
    to decide.
    2. The intended use of Collection subtypes is for the engine, which
    treats all types as distinct; yet we would compare subtypes as equal.
    
    As such implement exact type match based equality and document this.
    jsirois committed Jul 26, 2020
    5 Configuration menu
    Copy the full SHA
    2e04a7b View commit details
    Browse the repository at this point in the history