BCDA-APS / bluesky_training

Bluesky training, including instrument package
https://bcda-aps.github.io/bluesky_training/
Other
11 stars 0 forks source link

pin httpx >=0.14.0 #75

Closed prjemian closed 1 year ago

prjemian commented 1 year ago

This email conversation with @mdwyman:

It looks like in my latest installation of bluesky (on ravioli), the bluesky-queueserver-api uses some tools in httpx that aren't available until httpx version 0.14.0 but during the installation process, httpx-0.12.1 is installed. I believe this is the source of the following error when I try to start queue-monitor:

"/home/beams2/MWYMAN/micromamba/envs/bluesky_2022_3/lib/python3.10/site-packages/bluesky_queueserver_api/comm_base.py", line 68, in <module>
    class RequestError(httpx.RequestError):
AttributeError: module 'httpx' has no attribute 'RequestError'
geany /home/beams2/MWYMAN/micromamba/envs/bluesky_2022_3/lib/python3.10/site-packages/bluesky_queueserver_api/comm_base.py

Do you know how to force an upgrade of a package in a mamba environment? mamba upgrade httpx, mamba upgrade httpx>=0.14, don't seem to work --> no errors, just no changes. I do wonder if its the channel it's pulling from (conda-forge) -- though I can't tell if conda-forge is using 0.12.0 or 0.23.0 (https://anaconda.org/conda-forge/httpx/labels)

I wrote:

How about this? mamba install httpx>=0.14

Max responded:

That didn't work either. As an aside, just running pip install httpx>=0.14.0 wouldn't do it either.

Ended up cloning bluesky-queueserver-api repo (only package dependent on httpx), editing the requirements.txt file (“httpx” changed to “httpx>=0.14.0”) and running pip install on it (pip install -r requirements.txt).

That seemed to have fixed it.

prjemian commented 1 year ago

Might work on this issue at the same time as #130

prjemian commented 1 year ago

Today on conda-forge, httpx is at version 0.24.0

prjemian commented 1 year ago

Adding this pin to the environment file installed at least these packages:

bluesky-queueserver       0.0.18             pyhd8ed1ab_2    conda-forge
bluesky-queueserver-api   0.0.9              pyhd8ed1ab_0    conda-forge
httpx                     0.24.0             pyhd8ed1ab_1    conda-forge

and others. Seems OK.

prjemian commented 1 year ago

Push a new branch, see if it passes CI.