-
Notifications
You must be signed in to change notification settings - Fork 239
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
Bump jsonschema to ^3 #326
Conversation
Previous requirement on 2.6.0 causes poetry commands to fail with error: [AttributeError] module 'jsonschema' has no attribute 'Draft7Validator'
I don't think we use |
Can you clarify, this should be listed in poetry.lock only, but not pyproject.toml? Presently, poetry insists v2.6.0 be installed, which then renders poetry unusable. |
Would you mind clarifying that statement, please? Mostly trying to reproduce as I haven't seen that error before. What @dmfigol is trying to explain is that we shouldn't have to deal in |
I totally get your point that this is an implicit dependency. Without this change, I can't actually use poetry to manage dependencies. It may not be "correct", but working is better than not-working? A log, captured on Fedora: cd ~/git/nornir
python -m venv .env3
source .env3/bin/activate
pip install poetry
poetry install For reference, poetry install does the following:
Now, any subsequent poetry commands yield the following:
Upgrading jsonschema fixes this, but of course later running poetry install command downgrades jsonschema to match the lock file, which breaks it again.
Seems related to python-poetry/poetry#532 (unresolved at time of writing) So where should this be solved? As an aside, is it right that |
@optiz0r Do you run into the issue if you install Poetry without using pip? curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python The above is the canonical way for installing poetry. You can get into conflicts between Poetry's dependencies and the dependencies of the libraries Poetry installs if you use Pip. I had this same 'Draft7Validator/jsonschema' error at one point. |
Issue is not present if poetry is installed that way. That said, eww to the |
Okay, so we can close this issue correct? Once Poetry is installed in the proper way (i.e. not using pip), then jsonschema 3.0.0 is no longer required. |
For reference, here is what the Poetry readme says on this:
|
well, it makes sense IMO in this case as you are installing a tool to manage python. You probably installed pip via apt or yum or similar (assuming a linux machine), poetry falls under the same category as pip. |
I would still like to vote for inclusion of this change on the basis that:
Yes, pip was installed by OS package manager, because it's a popular, mature product, made available by LTS linux vendors. Poetry is shiny and new and has no packages available as yet. I tried building them last night with FPM but hit a wall several levels of dependency deep. Packaging is hard. Please help me make things less hard. |
I'd rather fix the root cause of the problem instead of having to manage dependencies we don't care about directly. I have created #332 to discuss this. Let me know if I understood your scenario correctly and if you agree that's a better solution. |
thanks! |
For the sake of others finding this issue, get-poetry.py doesn't work on systems where curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3 And then use it as follows: python3 ~/.poetry/bin/poetry [commands] Their suggested workaround is to install using pip, which doesn't work in this case because of the jsonschema conflict. Packaging is hard. |
@optiz0r Another way is to use |
@dmfigol I concede, |
Previous requirement on 2.6.0 causes poetry commands to fail
with error: