-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Generate 11.0.0-snapshot client #995
Generate 11.0.0-snapshot client #995
Conversation
diff between 11.0.0-snapshot and 11.0.0a1:
|
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.
@roycaihw nicely done.
I thought it would be more work ...
You forgot to update the examples.
examples/pod_exec.py
has one import line that needs to be updated. Can you please update this?
The warning work fine though, here is how this example output looks like when running Python with warnings enabled:
$ python -W all examples/pod_exec.py
/home/oznn/Software/k8s-python/kubernetes/client/apis/__init__.py:10: DeprecationWarning: The package kubernetes.client.apis is renamed and deprecated, use kubernetes.client.api instead (please note that the trailing s was removed).
DeprecationWarning
Response: This message goes to stderr
This message goes to stdout
Running command... echo This message goes to stdout
STDOUT: This message goes to stdout
Running command... echo "This message goes to stderr" >&2
STDERR: This message goes to stderr
Server date command returns: Tue Oct 29 20:53:47 UTC 2019
Server user is: root
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.108', 60596), raddr=('213.95.155.51', 6443)>
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.108', 60594), raddr=('213.95.155.51', 6443)>
Notice: I am actively enabling a flag in Python. Which means not all the users are going to see these warnings. Let's hope everyone has good tests :-) Pytest runs all the tests with warnings enable by default.
@oz123 Ah I didn't enable the flag so I didn't see the warning message when I tested. Thanks for verifying it! I'm curious if the log level is configurable to make the warning visible all the time. |
b143305
to
64beb03
Compare
@roycaihw I think it's a good idea to enable the warning per default. |
/LGTM |
If I understand the docs correctly I think 950df11 is turning warnings on for everything. That means that if my code uses both the kubernetes client and other libraries, you're turning on the warnings also for those entirely unrelated libraries. |
@drolando You're right. It turns on warning for unrelated paths. E.g.
could you explain a bit more? |
I was looking at https://docs.python.org/3/library/warnings.html#the-warnings-filter and it says you can pass in a So you'd probably want something like |
950df11
to
0c654ca
Compare
0c654ca
to
b316493
Compare
/hold cancel |
@yliaog gentle ping |
@@ -1,3 +1,43 @@ | |||
# v11.0.0b1 |
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.
so you're releaseing a1 and b1 together?
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.
no. This is copying the a1 release note from the release branch, since we didn't updated the release note in the master branch when we did a1 release.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Updated python-base submodule, collected CHANGELOG from python-base and 11.0.0a1, and generated 11.0.0-snapshot client
Added an alias package with deprecation message for the major breaking change as #974 (comment) suggested
/cc @oz123
TODO: