-
-
Notifications
You must be signed in to change notification settings - Fork 590
Can't instantiate Validator() - TypeError #87
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
Comments
|
|
If I recall correctly, this is a bug in early versions of 2.6 (specifically that they didn't support unicode kwargs in early versions). I test (and have installed) 2.6.7, but if I get my hands on an early version I can try to verify that. I'm not sure exactly what to do about this other than that, it's a "bug" more or less. I'll try to investigate a bit more. |
Well, I guess on second thought this wouldn't be too painful to workaround I don't think. |
Yeah, I believe 2.6.5 fixed this issue, had similar reports on our project when I switched to unicode literals. |
@dosena it would be awesome if you attempted a pull request for this since you have the setup to test it already. It should be fairly simple, just adding some 'b' prefixes to the keys in a single dict. |
@Julian Do we want the keys in the meta_schemas dict to be bytes though? |
I don't know, do we not (I didn't look at what that entails even)? I think what we really want is for |
Well, I don't like the idea of storing any strings as bytes, but I do believe you are correct that |
Technically these are neither strings nor bytes I think, they're arbitrary I think we want to remove this by just having the resolver walk all of the
|
Do we need to walk anything? Couldn't we just do something like: self.store = meta_schemas.copy()
self.store.update(store) And rip out |
Sounds good, I wasn't looking at the code but that sounds vaguely familiar.
|
Well, the copy won't actually work, forgot that |
3481a79 Merge pull request #91 from gelraen/nonanchoredpattern 818553f Update pattern.json b63c96f Merge pull request #92 from gelraen/escapedref 2f043b0 Update ref.json 1ebe2b4 Add valid instances for escaped ref tests b117902 Add a test that checks for implicit anchoring d319afa Merge pull request #90 from bugventure/develop a2c9de2 Add jsen to the list of validators 6d4adfe Merge pull request #87 from legoktm/protocol-relative 824cb99 Add test case for protocol-relative uri validation git-subtree-dir: json git-subtree-split: 3481a793ab6a1042a5973549f735b18f2355fb4e
Trying the example for is_valid() from https://python-jsonschema.readthedocs.org/en/latest/validate.html
The text was updated successfully, but these errors were encountered: