Skip to content

Can't use Python object YAML tags #155

Open
@bcdickinson

Description

@bcdickinson

Issue Summary

Use of pyyaml's !!python/object tags to create arbitrary Python objects isn't working. I'm raising this as a bug because it should work, but I'm not sure it's necessarily something we want to support.

Steps to Reproduce

Add a context item like !!python/object:django.forms.fields.CharField, and you get an error like this:

Exception Type: ConstructorError at /pattern-library/pattern/patterns/organisms/form/feedback-form.html
Exception Value: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object:django.forms.fields.CharField'
  in "<unicode string>", line 3, column 5:
        !!python/object:django.forms.fie ... 
        ^

This seems to be related to the use of yaml.FullLoader and our version of pyyaml somehow (ref yaml/pyyaml#266)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions