spidermon icon indicating copy to clipboard operation
spidermon copied to clipboard

WIP: Fix compatibility issues with jsonschema>=4

Open cuducos opened this issue 4 years ago • 4 comments

The only thing we used from this module was the str_types which, for Python 3, is just str. In the source it's a tuple, but I isinstance accepts both a type/class or a tuple, so I kept it simple.

Addresses #315.

cuducos avatar Oct 03 '21 20:10 cuducos

Just a bit of clarification: this PR passes the tests with jsonschema==3.2.0 (for example, adding deps = jsonschema==3.2.0 in tox.ini under [testenv]).

If we update jsonschema to the newest version, 4.0.1, it looks like there are more incompatibilities (check the red CI, for example).

I'm not sure if maintainers here prefer more atomic PRs or if we should address further incompatibilities with jsonschama==4.0.1 here. Please, let me know.

cuducos avatar Oct 03 '21 21:10 cuducos

I released a new version of Spidermon (1.15.2) with jsonschema library pinned to the latest stable version, so you can use it now in your projects without worrying about the dependencies versions.

For this specific issue, related to the newest version of jsonschema, I'd prefer a bigger PR that address all problems that was created by version 4.x of jsonschema if possible.

rennerocha avatar Oct 05 '21 00:10 rennerocha

For this specific issue, related to the newest version of jsonschema, I'd prefer a bigger PR that address all problems that was created by version 4.x of jsonschema if possible.

Good to know. So I'm gonna rename this PR and continue to work on it!

cuducos avatar Oct 05 '21 01:10 cuducos

I pushed 5613bda, a WIP (work in progress) commit, to check with maintainers some doubts about what is desired for this package. Please, follow the inline comments ; )

cuducos avatar Oct 06 '21 16:10 cuducos