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

Fix incompatibility with jsonschema < 4.5 #2860

Merged

Conversation

binste
Copy link
Member

@binste binste commented Jan 27, 2023

Fixes #2857 for a 4.2.2 release. CC @mattijn. I already added a changelog entry but without release date. I think it makes sense to release this as soon as possible if you find the time.

Tests pass against the following jsonschema versions which cover the range which is relevant for Altair:

  • 3.0 (minimum version required by Altair)
  • 4.0
  • 4.4
  • 4.5
  • 4.16.0
  • 4.17.3 (newest version)
  • 4.17.3 with all format checks installed (this caused the original issue which was already fixed in Altair v4.2.1)

The FORMAT_CHECKER attribute on jsonschema validators was introduced in version 4.5 of jsonschema. Therefore, the compatibility looks as follows:

  • Altair 4.2.0 works with jsonschema >=3,<4.17 (just tested this locally to make sure)
    • jsonschema 4.17 introduced format validation on schemas which causes an issue which is fixed in Altair 4.2.1
  • Altair 4.2.1 works with jsonschema >=4.5 (just tested this locally to make sure)
    • Altair 4.2.1 requires the FORMAT_CHECKER attribute on validator classes which was only introduced in jsonschema 4.5
  • Altair 4.2.2 would work with jsonschema >= 3.0

This issue has already been fixed in the master branch in 29ad5e9.

@binste binste marked this pull request as ready for review January 27, 2023 18:39
@binste binste marked this pull request as draft January 27, 2023 18:55
@binste binste changed the title Fix incompatibility with jsonschema < 4.17 Fix incompatibility with jsonschema < 4.5 Jan 27, 2023
@binste binste marked this pull request as ready for review January 27, 2023 19:14
@mattijn mattijn merged commit 4e18031 into altair-viz:v4.2.X Jan 27, 2023
@mattijn
Copy link
Member

mattijn commented Jan 27, 2023

Thanks for these efforts @binste!

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

Successfully merging this pull request may close these issues.

None yet

2 participants