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

craft-application 4.2.6 depends on requests ~=2.32.0 #511

Closed
vpa1977 opened this issue Oct 8, 2024 · 4 comments
Closed

craft-application 4.2.6 depends on requests ~=2.32.0 #511

vpa1977 opened this issue Oct 8, 2024 · 4 comments
Labels
Bug Something isn't working

Comments

@vpa1977
Copy link

vpa1977 commented Oct 8, 2024

Bug Description

craft-application 4.2.6 depends on requests 2.32, which break requests-unixsocket msabramo/requests-unixsocket#72, breaking rockcraft.

To Reproduce

requirements.txt

craft-application==4.2.6
craft-parts==2.1.2
craft-providers==2.0.4
requests==2.31.0

Fails to install with the following error:

ERROR: Cannot install craft-application==4.2.6 and requests==2.31.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested requests==2.31.0
    craft-application 4.2.6 depends on requests~=2.32

part yaml

No response

Relevant log output

2024-10-08 16:14:17.838 During handling of the above exception, another exception occurred:
2024-10-08 16:14:17.838 Traceback (most recent call last):
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 568, in run
2024-10-08 16:14:17.838     return_code = self._run_inner()
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 552, in _run_inner
2024-10-08 16:14:17.838     self.run_managed(platform, build_for)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 370, in run_managed
2024-10-08 16:14:17.838     with self.services.provider.instance(
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/usr/lib/python3.10/contextlib.py", line 135, in __enter__
2024-10-08 16:14:17.838     return next(self.gen)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/services/provider.py", line 134, in instance
2024-10-08 16:14:17.838     provider.ensure_provider_is_available()
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_providers/lxd/lxd_provider.py", line 78, in ensure_provider_is_available
2024-10-08 16:14:17.838     if not is_installed():
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_providers/lxd/installer.py", line 122, in is_installed
2024-10-08 16:14:17.838     snap_info = requests_unixsocket.get(url=url, params={"select": "enabled"})
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/requests_unixsocket/__init__.py", line 51, in get
2024-10-08 16:14:17.838     return request('get', url, **kwargs)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/requests_unixsocket/__init__.py", line 46, in request
2024-10-08 16:14:17.838     return session.request(method=method, url=url, **kwargs)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
2024-10-08 16:14:17.838     resp = self.send(prep, **send_kwargs)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
2024-10-08 16:14:17.838     r = adapter.send(request, **kwargs)
2024-10-08 16:14:17.838   File "/snap/rockcraft/x1/lib/python3.10/site-packages/requests/adapters.py", line 534, in send
2024-10-08 16:14:17.838     raise InvalidURL(e, request=request)
2024-10-08 16:14:17.838 requests.exceptions.InvalidURL: Not supported URL scheme http+unix
``
@vpa1977 vpa1977 added the Bug Something isn't working label Oct 8, 2024
vpa1977 added a commit to vpa1977/craft-application that referenced this issue Oct 8, 2024
See canonical#511
This pins requests version < 2.32.
vpa1977 added a commit to vpa1977/craft-application that referenced this issue Oct 8, 2024
See canonical#511
This pins requests version < 2.32.
@vpa1977 vpa1977 mentioned this issue Oct 8, 2024
3 tasks
@lengau
Copy link
Contributor

lengau commented Oct 8, 2024

Hi! This unpinning of the requests version was intentional, though we probably shouldn't have set it to ~=2.32 in the hotfix. @mr-cal should we release a 4.2.7 than unpins it (allowing apps to use 2.31 still)?

@mr-cal
Copy link
Contributor

mr-cal commented Oct 8, 2024

Hi! This unpinning of the requests version was intentional, though we probably shouldn't have set it to ~=2.32 in the hotfix. @mr-cal should we release a 4.2.7 than unpins it (allowing apps to use 2.31 still)?

I see, I agree - I didn't need to pin it like that in a hotfix.

To be clear, do you mean unpin it in the hotfix but leave it as-is in main?

@lengau
Copy link
Contributor

lengau commented Oct 8, 2024

@mr-cal I think it's fair for us to unpin in general and just leave that up to apps, but I don't mind having it >=2.32 in main.

@mr-cal
Copy link
Contributor

mr-cal commented Oct 17, 2024

Fixed in craft-application 4.2.7.

@mr-cal mr-cal closed this as completed Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants