Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Fix a Python 2 compatibility issue - #204

Merged
k8s-ci-robot merged 2 commits into
kubernetes-client:masterfrom
palnabarun:fix-watch-py2-compatibility
Jul 16, 2020
Merged

Fix a Python 2 compatibility issue#204
k8s-ci-robot merged 2 commits into
kubernetes-client:masterfrom
palnabarun:fix-watch-py2-compatibility

Conversation

@palnabarun

@palnabarunpalnabarun commented Jul 16, 2020

Copy link
Copy Markdown
Member
PR #133 introduces the usage of `http` module for checking the status
code for `GONE` HTTP status. However, this doesn't work in Python 2.7.
This commit checks if the interpreter is Python 2 and imports the
status code from `httplib` module instead and unifies the approach
to the checks.

@k8s-ci-robotk8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2020
@k8s-ci-robotk8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 16, 2020
PR kubernetes-client#133 introduces the usage of `http` module for checking the status
code for `GONE` HTTP status. However, this doesn't work in Python 2.7.
This commit checks if the interpreter is Python 2 and imports the
status code from `httplib` module instead and unifies the approach
to the checks.
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
@palnabarun
palnabarunforce-pushed the fix-watch-py2-compatibility branch from bf9b301 to a54f404CompareJuly 16, 2020 08:35
@palnabarun

Copy link
Copy Markdown
MemberAuthor

/assign @roycaihw@yliaog

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
@yliaog

Copy link
Copy Markdown
Contributor

thanks for the fix

/lgtm
/approve

@k8s-ci-robotk8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 16, 2020
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: palnabarun, yliaog

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robotk8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2020
@k8s-ci-robot
k8s-ci-robot merged commit fb86b8a into kubernetes-client:masterJul 16, 2020
@palnabarun
palnabarun deleted the fix-watch-py2-compatibility branch July 16, 2020 22:45
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.cncf-cla: yesIndicates the PR's author has signed the CNCF CLA.lgtmIndicates that a PR is ready to be merged.size/SDenotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@palnabarun@yliaog@k8s-ci-robot@roycaihw