-
Notifications
You must be signed in to change notification settings - Fork 74
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
Because aws-sso-util (4.32.0) depends on jsonschema (>=3.2.0,<4.0.0) #117
Comments
May not be worth the solve due to compatibility with python 3.7, jsonschema 4.20.0 is compatible with python >=3.8 The current project's Python requirement (>=3.7,<4.0) is not compatible with some of the required packages Python requirement:
Because no versions of jsonschema match >4.20.0,<5.0.0 and jsonschema (4.20.0) requires Python >=3.8, jsonschema is forbidden. So, because aws-sso-util depends on jsonschema (^4.20.0), version solving failed. BUT can probably update jsonschema (3.2.0 -> 4.17.3) |
Are there any updates on this issue, please? I've been stuck on this as well! Thank you |
@huy-nguyen26, why does the jsonschema version matter to you? Did you install aws-sso-util in the system Python environment or your default user Python environment, and now you see a conflict with another application? The Quickstart guide shows how to avoid such conflicts by installing using pipx. pipx install aws-sso-util |
@iainelder yes, I also tried pipx but I have the same error. Am I missing something please? |
I've never seen that error from pipx. I think something in your system's environment causes it. I need more information to reproduce it. Your screenshot shows a file path that ends That file contains the full output of pip. Can you share the content here? Which versions of Python, pip, and pipx are you using? To isolate the problem from my own system's environment I will try to reproduce your error in a Docker container. I started the container like this. docker run -it python:3.12 bash I used these commands to install and configure pip and pipx before installing aws-sso-util. export PIP_ROOT_USER_ACTION=ignore
PATH="$PATH:/root/.local/bin"
pip install --upgrade pip --quiet
pip install pipx --quiet
pipx install aws-sso-util I got this output, which means aws-sso-util installed successfully.
I found the command log in the folder # ls /root/.local/state/pipx/log/
cmd_2024-03-30_19.33.32.log I use this command to write out the content of the file. The cat /root/.local/state/pipx/log/cmd_*.log
(I'm no pip expert so I don't know what every log line means. But maybe yours will show something to help.) The components in the container have these versions:
Docker and the image have these versions:
|
@iainelder , the content of my log is
My version of
|
@huy-nguyen26, thanks for sharing your log content and your component versions. Your pipx version is 1.4.3. The latest pipx version is 1.5.0, released 4 days ago. Can you upgrade your pipx to the latest version and try again? Nothing seems obvious from the pipx changelog, but maybe the newer version solves the problem. Please try that before we investigate anything from the 1.4.3 log. Two things stand out from the 1.4.3 log. As you already pointed out, the log's final message is the error about the jsonschema package.
It also says that "pip is looking at multiple version of aws-sso-util". That looks unusual.
I would need to research both of those messages. Please try with pipx 1.5.0 before we spend time researching. |
@iainelder , yes I upgraded my
And inside the error log
One thing I noticed that when I run
I'm unsure why I'm receiving this warning. I'm not certain if it's relevant or not ?! |
@iainelder I tried to install |
@huy-nguyen26, that's great news! I see Homebrew has a formula for I think brew may install and configure its own Python environment for anything that depends on Python. I think that's how Homebrew avoids whatever problem exists in your first environment.
Do you still want support for the earlier errors?
I can reproduce the message in Docker. I run the same installation commands. Before I run those commands I set export PIPX_HOME=~/Contains\ Space
mkdir "$PIPX_HOME"
export PIP_ROOT_USER_ACTION=ignore
PATH="$PATH:/root/.local/bin"
pip install --upgrade pip --quiet
pip install pipx --quiet
pipx install aws-sso-util I don't think the space in the name causes the jsonschema error because
|
@huy-nguyen26 while researching
The issue explains why the "space in home path" message appears and suggests workarounds. I didn't understand everything there. Maybe it will mean more to you as a macOS user. |
@huy-nguyen26, what do you see when you run I ask because this error bothers me:
The jsonschema = "^3.2.0" On my system pipx finds version I don't understand why your system doesn't find version I use the following I pipe it through pip index versions jsonschema | fold -s -w 80
The list contains a version Version |
Hello, can we update the dependencies? I use aws-sso-util python code in my project (not CLI) so it's conflicting dependencies with my jupyter notebook. :( |
@sandangel , I haven't used aws-sso-util in a Jupyter notebook. I don't know if the author expected that use case. Can you create a new GitHub issue with the complete error describing the conflict and a way to reproduce it? Ping me on that issue and I will help you to find a solution. |
Hi, I have a project, with dev dependencies are aws-sso-utils and jupyterlab. Because of the version constraint you have in aws-sso-utils for jsonschema, I can not install jupyterlab in my project. So the issue is the same with this issue. Can we update the dependency? |
@sandangel , I'm not the repo owner so I can't update the dependency for you. If you give me instructions to reproduce your error, I may be able to help you find a workaround. I'm unfamiliar with Jupyter so I will need some help from you. Can you describe your installation steps and the error you see? |
Hi, you just need to install both at the same time in same venv and it will show the error. It’s pretty common error for dependencies |
All right folks, I know I've been absent for a long time, but I'm back. It will take a bit for me to get spun back up on my projects, but I will try to get this done as the first thing. |
Hooray, Ben's back! @benkehoe, what is the solution here? Upgrade jsonschema? Relax the constraint? Split the CloudFormation support into a new package? (#107) @sandangel, are you using the CloudFormation features of aws-sso-util? If not, then I think you can safely ignore the error. (How you ignore the error in practice depends on how you install the dependencies.) aws-sso-util uses jsonschema only for its CloudFormation support (README, config.py). I don't know how jupyterlab uses jsonschema, but I would favor its version to be safe. If you set up your virtualenv using pip, first install aws-sso-util, then install jupyterlab, and you should end up with a version of jsonschema that is compatible with jupyterlab. (See test 1 below for an example.) Notes for testing the jsonschema version behavior. Write pip_install() {
PIP_ROOT_USER_ACTION=ignore pip install --quiet "$@"
}
install_all_and_check_jsonschema() {
for package in "$@"; do
pip_install "$package"
done
pip freeze | grep -P '^jsonschema=='
} Make another helper function in the main shell to test a command in the Python 3.12 Docker container. test_in_docker() {
docker run -it -v "$PWD/helper.sh:/helper.sh" python:3.12 bash --rcfile /helper.sh -i -c "$*"
} Test 1: install aws-sso-util, then jupyterlab. test_in_docker install_all_and_check_jsonschema aws-sso-util jupyterlab The output shows that the final jsonschema version is 4.22.0, which is required by jupyterlab and incompatible with aws-sso-util.
Test 2: install jupyterlab, then aws-sso-util. test_in_docker install_all_and_check_jsonschema jupyterlab aws-sso-util The output shows that the final jsonschema version is 3.2.0, which is required by aws-sso-util and incompatible with jupyterlab.
|
I don't use cloudformation. maybe we can set cloudformation related packages to optional dependencies then? |
From the jsonschema changelog, I don't think the major version change has any consequences for the aws-sso-util code that's using it, and I can just update the dependency to But, to make sure of that, I'd like to test the CloudFormation functionality, and unfortunately my CloudFormation tests are currently broken and I'm not sure how long it will take to get them working. Moving that functionality out of Let me see if I can throw some manual tests together quickly to validate it. |
Ok, I released this as v4.33. Please test and let me know if it's all fixed for you. |
nice, it fixed the issue. thank you so much. |
Dependencies for jsonschema are help back "Because aws-sso-util (4.32.0) depends on jsonschema (>=3.2.0,<4.0.0)"
jsonschema is up to 4.20.0 - https://pypi.org/project/jsonschema/
Would there be anything specific holding back this being updated?
The text was updated successfully, but these errors were encountered: