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

No objects called for_jsonschema and from_jsonschema in schematics.serialize #119

Open
lovesh opened this issue Sep 9, 2013 · 6 comments

Comments

@lovesh
Copy link

lovesh commented Sep 9, 2013

In request_handling.py on line 58
from schematics.serialize import for_jsonschema, from_jsonschema
but
the schematics.serialize module at https://github.com/j2labs/schematics/blob/master/schematics/serialize.py do not contain any object named for_jsonschema or from_jsonschema. Also from_jsonschema is unused in the request_handling module

@reduxdj
Copy link
Contributor

reduxdj commented Sep 16, 2013

Noticed the same thing:

Traceback (most recent call last):
File "./listsurf.py", line 6, in
from brubeck.connections import Mongrel2Connection
File "/Users/dj/.virtualenvs/listsurf/lib/python2.7/site-packages/brubeck-0.4.0-py2.7.egg/brubeck/connections.py", line 9, in
from request_handling import http_response, coro_spawn
File "/Users/dj/.virtualenvs/listsurf/lib/python2.7/site-packages/brubeck-0.4.0-py2.7.egg/brubeck/request_handling.py", line 58, in
from schematics.serialize import for_jsonschema, from_jsonschema
ImportError: cannot import name for_jsonschema

@reduxdj
Copy link
Contributor

reduxdj commented Sep 16, 2013

Looks like this same functionality is done here:

https://github.com/j2labs/dictshield/blob/master/dictshield/document.py

def _to_fields

and in def to_json

I would imagine they would work a similar way. I hope this issue gets fixed soon.

@reduxdj
Copy link
Contributor

reduxdj commented Sep 17, 2013

Actually, I don't even think this import is needed any more

@lovesh
Copy link
Author

lovesh commented Sep 17, 2013

I found the above two functions at https://github.com/st4lk/schematics/blob/master/schematics/serialize.py

@reduxdj
Copy link
Contributor

reduxdj commented Sep 18, 2013

I created a pull request to add this back in for schematics, I also have a version of schematics working with this in my branch, if you install this version of schematics it shouldn't complain:

@reduxdj
Copy link
Contributor

reduxdj commented Sep 18, 2013

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

2 participants