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

draft-06 Support #337

Open
khakulov opened this Issue Jun 1, 2017 · 26 comments

Comments

Projects
None yet
@khakulov

khakulov commented Jun 1, 2017

Is it in plan to support draft-06?

in my Project i need to use propertyNames to validate object keys agains regex pattern.
but propertyNames was introduced in draft-06.

for now i am using patternProperties with "additionalProperties": False together, but the error is confusing because of "schema does not allow additional properties"

@Julian

This comment has been minimized.

Owner

Julian commented Jun 3, 2017

It's definitely planned yep, just a bit behind. Patches definitely welcome.

Branch notes:

  • Finish getting all the Draft 6 tests passing
  • Ensure error properties are properly set for the False schema
  • Ensure error properties are properly set for contains
  • Check whether boolean schemas have tests for all properties
  • Clean up validators / meta_schemas in tests
  • Draft3's validate still does the True/False sentinel checking
  • Ensure earlier drafts don't leak formats
  • Upstream tests for non-strings
  • Ensure tests aren't making network requests
  • Check whether the (failing) ref tests should be backported to draft3
  • is_any is uncovered / Draft3's type special cases any / Should it be redefinable?
  • TestValidationErrorMessages + Draft6Validator
  • Fix messages support for boolean schemas
  • Check for consolidations
  • func = FormatChecker.cls_checks(draft3, raises)(func) should probably not do the assignment in jsonschema._format._checks_draft
  • What should validates do about $id vs id
  • python-hyper/uritemplate#33
  • Run coverage
  • Document that iso8601 is back-compatted only for older drafts
  • What should validator_for do about False and True?
  • Make sure True and False don't work in Draft4
  • Check that nowhere claims that the type of a schema is dict anymore
  • stefankoegl/python-json-pointer#20
  • validates + "$id" vs "id"
  • address the default in validate
  • check for more optional tests
  • create + bool metaschema
  • Investigate whether any tests can be backported to draft4/3 to ensure no functionality leaks backwards
@bsmithers

This comment has been minimized.

Contributor

bsmithers commented Nov 5, 2017

I've just raised a PR (#370) addressing the currently failing tests.

To continue the conversation in the appropriate place, are there particular components of the above checklist that you'd appreciate some help with? Or indeed anything new you have realised that needs work before draft6 support is complete?

@fireundubh

This comment has been minimized.

fireundubh commented Dec 30, 2017

FYI: Draft 7 was recently published.

@quantum13

This comment has been minimized.

quantum13 commented Apr 2, 2018

Hi, what tasks from #337 (comment) are still undone?

@Julian

This comment has been minimized.

Owner

Julian commented Apr 3, 2018

@quantum13 so the main one is to update the draft-06 branch with @bsmithers' type checker changes. I was hoping/planning to get a release out first just containing those, and then to get to merging them into the draft 6 stuff.

Out of curiosity for anyone following this ticket, do y'all have interest specifically in draft 6, or would jumping directly to draft 7/8 be just as acceptable?

@Julian

This comment has been minimized.

Owner

Julian commented Apr 3, 2018

I think python-hyper/uritemplate#36 is still open as well, so we'd need to help out with getting that one merged there.

@adamcharnock

This comment has been minimized.

adamcharnock commented Apr 3, 2018

As a follower of this ticket: @Julian, I'd be happy to jump to 7/8.

@Julian

This comment has been minimized.

Owner

Julian commented Apr 3, 2018

@adamcharnock thanks.

(Want to by the way say to all those following this ticket that I wish these things would get done faster but unfortunately open source gets an exceedingly small fraction of my time these days with all of the other fun things in life... Really am hoping to get out a release with newer draft support within the next 2-3 weeks though.)

@handrews

This comment has been minimized.

handrews commented Apr 3, 2018

As a follower of this ticket: @Julian, I'd be happy to jump to 7/8.

@adamcharnock draft-07 is a pretty small incremental step that is backwards-compatible with draft-06, so it should be relatively fast to add, and near-trivial to support both. draft-08 will be more substantial, so it would be really good to at least get to draft-06 (and past draft-04) rather than wait for the even larger draft-08.

@adamchainz

This comment has been minimized.

Contributor

adamchainz commented Apr 4, 2018

wrong adam

@diogobaeder

This comment has been minimized.

diogobaeder commented Apr 4, 2018

My two cents: I think it's a better idea to move to draft-06 first, as this is a more natural step than jumping that version. Of course, some people might get unhappy that it's moving slower to draft-07, but it's a less surprising move, and it copes better with supporting all drafts by the end of the day.

@iddan

This comment has been minimized.

iddan commented Apr 10, 2018

I would be happy to jump right ahead to 7/8. If there is no impl for draft-06 in python how many people would actually miss it? I mean: I assume the majority of the users probably would just want to upgrade to the latest version.

@handrews

This comment has been minimized.

handrews commented Apr 10, 2018

@iddan draft-06 has had more implementations in the wild for quiet some time now, in JavaScript, Java, .NET, Go, PHP, and perhaps others. It is important to support interoperability while the drafts are evolving.

Plus, I will repeat, again:

draft-07 is a small increment on top of draft-06. If you implement draft-07 you already implemented draft-06. Since draft-06 is smaller, just implement that much, release it, then finish draft-07.

Please everyone stop making this a more complicated decision than it needs to be.

@Julian

This comment has been minimized.

Owner

Julian commented May 3, 2018

OK, still a few more outstanding items here, but making some progress...

Anyone who wants an early look is welcome to try out the draft-06 branch -- comments obviously welcome.

There likely will be a beta in a few days as soon as some more of the outstanding checklist is checked off, but I believe things should at least function at the minute.

@graingert

This comment has been minimized.

graingert commented Jun 6, 2018

@Julian it looks like the draft-06 branch got merged in, is there a chance for a beta on PyPI?

@julesjulian

This comment has been minimized.

Contributor

julesjulian commented Jun 6, 2018

I think you meant to tag @Julian 😉

@graingert

This comment has been minimized.

graingert commented Jun 6, 2018

@julesjulian fixed!

@Julian

This comment has been minimized.

Owner

Julian commented Jun 7, 2018

@graingert yeah I should... will have a look at cutting one hopefully this weekend

@graingert

This comment has been minimized.

graingert commented Jun 8, 2018

@Julian it would be super awesome to get travis to automatically ship every commit with the dev version and commit hash: eg like on rtfd, jsonschema 2.6.1.dev237+g9632422

@Julian

This comment has been minimized.

Owner

Julian commented Jun 8, 2018

@graingert

This comment has been minimized.

graingert commented Sep 3, 2018

@Julian looks like most of the work is done with use_scm_version, this just triggers the deploy.
#456

The last bit, you have to do: is add deploy credentials - I'd recommend using a new account with maintainership access only

@Julian

This comment has been minimized.

Owner

Julian commented Sep 3, 2018

@graingert I don't think PyPI lets you upload dev releases so not sure it'd work completely as is but will have a look at your PR, thanks!

@graingert

This comment has been minimized.

graingert commented Sep 3, 2018

@Julian

This comment has been minimized.

Owner

Julian commented Sep 3, 2018

⊙  ~[jsonschema:python] setup.py bdist_wheel sdist upload >/dev/null                                                                                             Julian@Magbook ●
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

Password:
Upload failed (400): '3.0.0a3.dev74+g3eabefb' is an invalid value for Version. Error: Can't use PEP 440 local versions. See https://packaging.python.org/specifications/core-metadata
error: Upload failed (400): '3.0.0a3.dev74+g3eabefb' is an invalid value for Version. Error: Can't use PEP 440 local versions. See https://packaging.python.org/specifications/core-metadata
@iddan

This comment has been minimized.

iddan commented Sep 23, 2018

When importing version 2.6.0 I don't see Draft6Validator. Does that make sense?

@Julian

This comment has been minimized.

Owner

Julian commented Sep 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment