scrapinghub / spidermon

Scrapy Extension for monitoring spiders execution.
https://spidermon.readthedocs.io
BSD 3-Clause "New" or "Revised" License
528 stars 96 forks source link

WIP: Fix compatibility issues with jsonschema>=4 #316

Closed cuducos closed 1 year ago

cuducos commented 2 years ago

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 commented 2 years ago

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.

rennerocha commented 2 years ago

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.

cuducos commented 2 years ago

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 commented 2 years ago

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 ; )