Deprecate the `id_of` argument to `validators.create` and the `ID_OF` attribute on `Validator`s

Open
#1,091 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by tracing the validators.create API and the Validator.ID_OF attribute, then read how Specification objects from referencing are used. Review the relationship to issue #1061 and the dialect–vocabulary concerns described here. Done means the redundant APIs have a decided deprecation or replacement path that accounts for associating Specifications with new Validators.

Written by the indexing model from the issue text.

Description

Dialects v2 Pending Deprecation

These two are redundant with the now-anyways-needed Specification objects from referencing.

Either as part of this or some time in the future there will be a way of specifying which Specification should be associated with a new Validator, but regardless, these two objects are insufficient already today for encapsulating all the information that's needed to know how to deal with schemas for a dialect.

(#1061 is somewhat tangentially related to this).

Also somewhat related is expanding support for dialect <-> vocabulary interaction. The specification is still quite immature here and may change in the future, so there's a slight worry in creating an API that matches it too closely, but this ticket may benefit from "abandoning" jsonschema.validators.* in favor of new APIs that create dialects...

Dominant language
Python
Stars
5k
Forks
741
Avg merge
4d 17h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-jsonschema/jsonschema

All issues in python-jsonschema/jsonschema

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.