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

draft-06 Support #337

Closed
khakulov opened this issue Jun 1, 2017 · 26 comments
Closed

draft-06 Support #337

khakulov opened this issue Jun 1, 2017 · 26 comments

Comments

@khakulov
Copy link

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
Copy link
Member

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
  • Draft3's validate still does the True/False sentinel checking
  • Fix the type checker skipped tests
  • Clean up validators / meta_schemas in tests
  • Validator.DEFAULT_TYPES is now only present on the class, not on instances
  • Do something about FormatChecker not being able to distinguish the two time formats
  • Ensure error properties are properly set for the False schema
  • Ensure error properties are properly set for contains
  • Upstream tests for non-strings
  • if/then/else is missing tests for boolean schemas
  • idn-hostname doesn't actually check it's a hostname
  • Kill warnings from tests that aren't testing deprecated behavior
  • 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
  • idn-email doesn't actually allow idn
  • Should there be a to_schema argument to create
  • 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
  • Consider whether there should be an easy way to evade int/bool inheritance ridiculousness
  • What should validates do about $id vs id
  • Provide an API for validating URI Templates 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
  • Provide an API for detecting invalid JSON Pointers 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
Copy link
Contributor

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
Copy link

FYI: Draft 7 was recently published.

@vlad-khramov
Copy link

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

@Julian
Copy link
Member

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
Copy link
Member

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
Copy link

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

@Julian
Copy link
Member

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
Copy link

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
Copy link

wrong adam

@diogobaeder
Copy link

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
Copy link

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
Copy link

@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
Copy link
Member

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
Copy link

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
Copy link
Contributor

I think you meant to tag @Julian 😉

@graingert
Copy link

@julesjulian fixed!

@Julian
Copy link
Member

Julian commented Jun 7, 2018

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

@graingert
Copy link

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
Copy link
Member

Julian commented Jun 8, 2018 via email

@graingert
Copy link

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
Copy link
Member

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
Copy link

graingert commented Sep 3, 2018 via email

@Julian
Copy link
Member

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

tobywf added a commit to aws-cloudformation/cloudformation-cli that referenced this issue Sep 12, 2018
For now, this needs the pre-release version of jsonschema:
* python-jsonschema/jsonschema#337
* https://pypi.org/project/jsonschema/#history
tobywf added a commit to aws-cloudformation/cloudformation-cli that referenced this issue Sep 12, 2018
For now, this needs the pre-release version of jsonschema:
* python-jsonschema/jsonschema#337
* https://pypi.org/project/jsonschema/#history
tobywf added a commit to aws-cloudformation/cloudformation-cli that referenced this issue Sep 12, 2018
For now, this needs the pre-release version of jsonschema:
* python-jsonschema/jsonschema#337
* https://pypi.org/project/jsonschema/#history
@iddan
Copy link

iddan commented Sep 23, 2018

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

@Julian
Copy link
Member

Julian commented Sep 23, 2018 via email

@Julian Julian added this to the v3.0.0 milestone Jan 22, 2019
@Julian Julian closed this as completed Jan 26, 2019
awesomedevchris pushed a commit to awesomedevchris/awesome_app that referenced this issue Apr 10, 2023
For now, this needs the pre-release version of jsonschema:
* python-jsonschema/jsonschema#337
* https://pypi.org/project/jsonschema/#history
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