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

Pin Versions of Python Dependencies #11297

Closed
U8NWXD opened this issue Dec 1, 2020 · 3 comments
Closed

Pin Versions of Python Dependencies #11297

U8NWXD opened this issue Dec 1, 2020 · 3 comments
Assignees

Comments

@U8NWXD
Copy link
Member

U8NWXD commented Dec 1, 2020

Problem

We currently pin the versions of python packages we install, but not the versions of those packages' dependencies. For example, we pin a version of piptools, but piptools depends on pip. When we install piptools, we install the latest version of pip, so that pip version is not pinned. This can lead to breakages on CI when a new version of pip is released that isn't backwards-compatible. This caused python -m regenerate_requirements to fail yesterday, which broke all CircleCI and GitHub Actions builds when a new version of pip was released with breaking interface changes. This breakage and the subsequent debugging is documented here.

Solution

We should pin the versions of all our dependencies, not just our direct dependencies. One way to do this would be to install all our dependencies directly into a virtual environment from a single requirements.txt file (i.e. we would just run pip install -r requirements.txt). The requirements.txt file would pin the versions of all dependencies (i.e. generated by pip freeze > requirements.txt)

This will move us to a more typical way of installing Python dependencies, which should let us take better advantage of linting and testing tools in IDEs. (See this comment thread for more details.)

@oppiabot
Copy link

oppiabot bot commented May 24, 2021

Hi @oppia/core-maintainers, this issue is not assigned to any project. Can you please update the same? Thanks!

@DubeySandeep
Copy link
Member

Assigning this issue to @AdityaDubey0

@U8NWXD U8NWXD added this to To Do (High Priority) in Developer experience Jan 6, 2022
@U8NWXD
Copy link
Member Author

U8NWXD commented Aug 1, 2022

Done by #15602

@U8NWXD U8NWXD closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Developer experience
  
To Do (High Priority)
Development

No branches or pull requests

3 participants