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

Can't use Python object YAML tags #155

Open
bcdickinson opened this issue Sep 17, 2021 · 0 comments
Open

Can't use Python object YAML tags #155

bcdickinson opened this issue Sep 17, 2021 · 0 comments

Comments

@bcdickinson
Copy link

bcdickinson commented Sep 17, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant