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

Which uvicorn version? #41

Closed
clnsmth opened this issue Oct 26, 2022 · 5 comments
Closed

Which uvicorn version? #41

clnsmth opened this issue Oct 26, 2022 · 5 comments
Labels
EDI Environmental Data Initiative maintenance Maintenance

Comments

@clnsmth
Copy link
Collaborator

clnsmth commented Oct 26, 2022

Today I installed a fresh web-x and hit an error after running python main.py:

CRITICAL root: Traceback (most recent call last):
  File "/Users/csmith/Code/web-x/main.py", line 71, in <module>
    uvicorn.run(app, host='127.0.0.1', port=8000, debug=True)
TypeError: run() got an unexpected keyword argument 'debug'

This appears to be occurring because my version of uvicorn (0.19.0) no longer supports the --debug flag which exists in web-x@edirepository.org's version (0.18.3). See https://github.com/encode/uvicorn/releases and encode/uvicorn#1640 for details.

One solution is to specify the uvicorn version in the conda environment files. @servilla, I have a pull request ready. I just need to know which uvicorn version you would like used in the web-x project.

@servilla
Copy link
Collaborator

"uvicorn>=0.18, <0.19" or conversely, remove the debug=True from main.py on line 71. I think the reasoning outlined in those references is sound, but removing --debug/debug=True breaks backward compatibility. They should have made it a no-op for a few versions and listed it as deprecated. I would remove the debug argument.

@servilla
Copy link
Collaborator

I removed debug=True in f19d36f

@clnsmth
Copy link
Collaborator Author

clnsmth commented Oct 27, 2022

Good point about the deprecation process @servilla. I always find the transition period over a back breaking change to be helpful.

One last thing on this issue: currently, there are a mix of uvicorn version constraints in the environment.yml files. Would you like constraints removed (i.e. change uviron=0.18.3 to uvicorn) so all the environment.yml files are consistent?

@servilla
Copy link
Collaborator

The environment.yml is specific to the working Linux OS deployment. Therefore the pinned versions and build ids are critical to maintaining production systems and should not be removed. The environment-min.yml and environment-win.yml are closer to what you (@clnsmth) are looking for where the packages are not pinned and more flexible in an installation across multiple environments (e.g., Windows, OS X, and Linux), thus more consistent. In some cases, the Linux and Windows package dependencies change.

@clnsmth
Copy link
Collaborator Author

clnsmth commented Oct 27, 2022

Thanks for these clarifications @servilla. It makes sense to leave the environment files 'as is'.

@clnsmth clnsmth closed this as completed Oct 27, 2022
@servilla servilla added the maintenance Maintenance label Oct 21, 2023
@servilla servilla added the EDI Environmental Data Initiative label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EDI Environmental Data Initiative maintenance Maintenance
Projects
Status: Done
Development

No branches or pull requests

2 participants