-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[docker-base-buster][docker-config-engine-buster] No longer install Python 2 #6162
Conversation
@@ -52,6 +52,9 @@ COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"] | |||
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"] | |||
COPY ["root/.vimrc", "/root/.vimrc"] | |||
|
|||
RUN pip install --upgrade 'pip<21' | |||
RUN apt-get purge -y python-pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why to touch it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.
python-dev \ | ||
python-setuptools | ||
|
||
RUN pip install --upgrade pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we need to modify stretch docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is simply to align the way we install/upgrade pip everywhere
RUN pip install --upgrade pip | ||
|
||
RUN apt-get purge -y python-pip | ||
RUN apt-get install -y build-essential python-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we modify this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is simply to align the way we install/upgrade pip everywhere
@@ -341,7 +341,7 @@ RUN export VERSION=1.14.2 \ | |||
&& rm go$VERSION.linux-*.tar.gz | |||
|
|||
RUN pip3 install --upgrade pip | |||
RUN pip2 install --upgrade pip | |||
RUN pip2 install --upgrade 'pip<21' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.
@@ -329,7 +329,7 @@ RUN export VERSION=1.14.2 \ | |||
&& rm go$VERSION.linux-*.tar.gz | |||
|
|||
RUN pip3 install --upgrade pip | |||
RUN pip2 install --upgrade pip | |||
RUN pip2 install --upgrade 'pip<21' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.
scapy==2.4.4 \ | ||
pyroute2==0.5.14 \ | ||
netifaces==0.10.9 \ | ||
monotonic==1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have python3 < 3.3 supported? Wondering if we should use time lib directly on python 3.
https://pypi.org/project/monotonic/
Having this installed is fine to support python3 across the versions. but just to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated above, I simply added this here to make the Python 3 environment in the container match the Python 2 environment, which I though would help you in your efforts to convert restore_neighbors.py to Python 3. With Python 3, we have Python 3.7 installed. I don't see any reason for us to need to support Python 3 < 3.7.
Please feel free to modify the dependencies as part of your restore_neighbors.py Python 3 pull request.
retest vsimage please |
Check builds are stuck in the state "Expected — Waiting for status to be reported". Force push will not fix. Closing and reopening PR in an attempt to hopefully fix. |
test comment |
test |
retest vsimage please |
retest mellanox please |
retest vsimage please |
vsimage test failing, as it relies on sonic-net/sonic-swss#1542, which will be merged as part of this submodule update: #6270 |
retst vsimage please |
…l in base containers
…o be Python 3-compliant
is it still draft? |
- Why I did it
As part of migrating SONiC codebase from Python 2 to Python 3
- How I did it
- How to verify it
Build and run an image
- Which release branch to backport (provide reason below if selected)