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

RefResolver deprecated #216

Open
ejratl opened this issue Jul 25, 2023 · 17 comments
Open

RefResolver deprecated #216

ejratl opened this issue Jul 25, 2023 · 17 comments
Assignees

Comments

@ejratl
Copy link
Contributor

ejratl commented Jul 25, 2023

The build system is currently failing. jsonschema 4.18 introduced the referencing library and deprecated RefResolver. This is breaking some tests, namely marking_definition, network_traffic and observed_data. This is currently blocking all PRs and releases.
Note: calling setup.py is deprecated and license_file in setup.config is also deprecated in favor of license_files. These are not currently breaking the build system.

@ejratl
Copy link
Contributor Author

ejratl commented Jul 25, 2023

RefResolver has been deprecated
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0

@ejratl
Copy link
Contributor Author

ejratl commented Jul 25, 2023

As a tactical workaround, I am freezing jsonschema < 4.18.0 until the project can migrate to the referencing library. PRs welcomed.

@ejratl ejratl changed the title tox failure RefResolver deprecated Jul 25, 2023
@ostefano
Copy link
Contributor

ostefano commented Jan 3, 2024

Changes do not seem be trivial. @ejratl could you put together an example detailing how to modify def load_validator(schema_path, schema)?

Then I could try to take it from there.

@ejratl
Copy link
Contributor Author

ejratl commented Jan 3, 2024

We will need the assistance of @clenk for this, I believe.

@ostefano
Copy link
Contributor

Folks, this is bound to become a bigger issue as we go forward. I would be happy to help, but I do need some guidance.

@aryabharat
Copy link

Hi @ejratl
I tried to resolve this: #226
Please let me know if something is wrong.

@aryabharat
Copy link

@ejratl @clenk I have raised a PR #226 while testing it locally was getting error on $ref path.
jsonschema.exceptions._RefResolutionError: <urlopen error [Errno 2] No such file or directory: '../common/core.json'>

Can you please help, is it a code level issue or i'm missing something else

@aryabharat
Copy link

Hi @ejratl @clenk Can you please have a look at the PR: https://github.com/oasis-open/cti-stix-validator

@ejratl
Copy link
Contributor Author

ejratl commented Jan 25, 2024

Thanks for doing this work. Will you be able to sign the CLA? It looks a bit like Github and/or the CLA bot is having trouble with you account.

@ejratl
Copy link
Contributor Author

ejratl commented Jan 25, 2024

I will ask the oasis-open admins to look into the problem.

@ostefano
Copy link
Contributor

ostefano commented Feb 3, 2024

Hi @aryabharat , did you manage to sign the CLA on #226?

@aryabharat
Copy link

@ostefano Yes! i have signed the CLA.

@ostefano
Copy link
Contributor

ostefano commented Feb 3, 2024

@ejratl anything that we can do to unblock this?

@ejratl
Copy link
Contributor Author

ejratl commented Feb 5, 2024

@ostefano The issue here is that the user id that made the commits is different from the user id that signed the CLA (although they represent the same person most likely). The easiest solution would be for @aryabharat to set the local config for the repo and then force push using the id that signed the CLA to update the PR to all be from one user id that signed the CLA.

@ostefano
Copy link
Contributor

ostefano commented Feb 5, 2024

@ejratl I see. Looks like the problem is now solved, so hopefully it can be merged soon :)

@ostefano
Copy link
Contributor

ostefano commented Mar 27, 2024

@ejratl there is a new PR solving the issue available here: #228

@ostefano
Copy link
Contributor

ostefano commented Apr 3, 2024

#228 is merged. We can close this.

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

4 participants