Skip to content

Scope usage changes from v22 to v23 #259

@DamianBarabonkovQC

Description

@DamianBarabonkovQC

In glom v22, I was able to assign a scope with a spec and that automatically got applied to the target. Version 23 breaks that.

For example, this code used to work in v22:

target = {'data': {'val': 9}}
spec = (S(value = ('data', 'val')), S.value)
glom(target, spec) # returns 9

However, in v23

target = {'data': {'val': 9}}
spec = (S(value = ('data', 'val')), S.value)
glom(target, spec) # returns ('data', 'val')

The previous behavior of v22 is infinitely more helpful than this new usage. Unless this was an intentional breaking change, I am filing this issue to recommend that we revert to the old behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions