Skip to content

Commit 8a89487

Browse files
committed
Merge branch 'master' into MakeServerGlobalCallbacksDefaultTrue
2 parents 5e06a75 + 109d85b commit 8a89487

File tree

87 files changed

+2691
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2691
-545
lines changed

.pylintrc

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
[MASTER]
1+
[MAIN]
2+
load-plugins=
3+
pylint.extensions.no_self_use,
4+
pylint.extensions.comparison_placement,
5+
pylint.extensions.redefined_variable_type,
6+
27
ignore=
38
src/python/grpcio/grpc/beta,
49
src/python/grpcio/grpc/framework,
@@ -49,9 +54,6 @@ disable=
4954
# TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
5055
# work for now? Try with a later pylint?
5156
locally-disabled,
52-
# NOTE(nathaniel): What even is this? *Enabling* an inspection results
53-
# in a warning? How does that encourage more analysis and coverage?
54-
locally-enabled,
5557
# NOTE(nathaniel): We don't write doc strings for most private code
5658
# elements.
5759
missing-docstring,
@@ -60,9 +62,6 @@ disable=
6062
# expression is true than it is to worry about which is an identifier
6163
# and which a literal value.
6264
misplaced-comparison-constant,
63-
# NOTE(nathaniel): Our completely abstract interface classes don't have
64-
# constructors.
65-
no-init,
6665
# TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
6766
# nicely with some of our code being implemented in Cython. Maybe in a
6867
# later version?
@@ -99,5 +98,32 @@ disable=
9998
wrong-import-order,
10099
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
101100
unsubscriptable-object,
102-
# NOTE(sergiitk): yapf compatibility, ref #25071
103-
bad-continuation,
101+
102+
# NOTE(sergiitk): From here: just to make it work with pylint==2.17.7
103+
# Pylint will be replaced with ruff anyway.
104+
# Not enforced by ruff:
105+
consider-using-f-string,
106+
# TODO(sergiitk): Check; should probably be caught by pytype
107+
abstract-class-instantiated,
108+
# TODO(sergiitk): This is broken for protobuf enums.
109+
redefined-variable-type,
110+
# Expect to be caught (and fixed) by ruff.
111+
# https://github.com/astral-sh/ruff/issues/970
112+
# pylint | ruff |
113+
# ----------------------------------- | ------------- |
114+
f-string-without-interpolation, # F541
115+
format-string-without-interpolation, # F541
116+
no-else-raise, # RET506
117+
no-else-continue, # RET507
118+
super-with-arguments, # UP008
119+
unnecessary-lambda-assignment, # E731
120+
unnecessary-dunder-call, # PLC2801
121+
import-outside-toplevel, # PLC0415
122+
broad-exception-raised, # TRY002
123+
raise-missing-from, # B904
124+
no-self-use, # PLR6301
125+
inconsistent-return-statements, # RET501, RET502
126+
consider-using-dict-items, # PLC0206
127+
use-dict-literal, # C406
128+
consider-iterating-dictionary, # SIM118
129+
unspecified-encoding, # PLW1514

.pylintrc-examples

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
[MASTER]
1+
[MAIN]
2+
load-plugins=
3+
pylint.extensions.no_self_use,
4+
pylint.extensions.comparison_placement,
5+
pylint.extensions.redefined_variable_type,
6+
27
ignore=
38
src/python/grpcio/grpc/beta,
49
src/python/grpcio/grpc/framework,
@@ -52,9 +57,6 @@ disable=
5257
# TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
5358
# work for now? Try with a later pylint?
5459
locally-disabled,
55-
# NOTE(nathaniel): What even is this? *Enabling* an inspection results
56-
# in a warning? How does that encourage more analysis and coverage?
57-
locally-enabled,
5860
# NOTE(nathaniel): We don't write doc strings for most private code
5961
# elements.
6062
missing-docstring,
@@ -63,9 +65,6 @@ disable=
6365
# expression is true than it is to worry about which is an identifier
6466
# and which a literal value.
6567
misplaced-comparison-constant,
66-
# NOTE(nathaniel): Our completely abstract interface classes don't have
67-
# constructors.
68-
no-init,
6968
# TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
7069
# nicely with some of our code being implemented in Cython. Maybe in a
7170
# later version?
@@ -104,5 +103,32 @@ disable=
104103
unsubscriptable-object,
105104
# NOTE(rbellevi): Pylint doesn't understand .pyi files.
106105
no-member,
107-
# NOTE(sergiitk): yapf compatibility, ref #25071
108-
bad-continuation,
106+
107+
# NOTE(sergiitk): From here: just to make it work with pylint==2.17.7
108+
# Pylint will be replaced with ruff anyway.
109+
# Not enforced by ruff:
110+
consider-using-f-string,
111+
invalid-overridden-method, # not found in main
112+
# Expect to be caught (and fixed) by ruff.
113+
# https://github.com/astral-sh/ruff/issues/970
114+
# pylint | ruff |
115+
# ----------------------------------- | ------------- |
116+
super-with-arguments, # UP008
117+
raise-missing-from, # B904
118+
unspecified-encoding, # PLW1514
119+
# Found in examples, but not in main:
120+
consider-using-with, # SIM115
121+
# Found in main, but not in examples:
122+
# f-string-without-interpolation, # F541
123+
# format-string-without-interpolation, # F541
124+
# no-else-raise, # RET506
125+
# no-else-continue, # RET507
126+
# unnecessary-lambda-assignment, # E731
127+
# unnecessary-dunder-call, # PLC2801
128+
# import-outside-toplevel, # PLC0415
129+
# broad-exception-raised, # TRY002
130+
# no-self-use, # PLR6301
131+
# inconsistent-return-statements, # RET501, RET502
132+
# consider-using-dict-items, # PLC0206
133+
# use-dict-literal, # C406
134+
# consider-iterating-dictionary, # SIM118

.pylintrc-tests

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
[MASTER]
1+
[MAIN]
2+
load-plugins=
3+
pylint.extensions.no_self_use,
4+
pylint.extensions.comparison_placement,
5+
pylint.extensions.redefined_variable_type,
6+
27
ignore=
38
src/python/grpcio_tests/tests/unit/beta,
49
src/python/grpcio_tests/tests/unit/framework,
@@ -78,9 +83,6 @@ disable=
7883
# TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
7984
# work for now? Try with a later pylint?
8085
locally-disabled,
81-
# NOTE(nathaniel): What even is this? *Enabling* an inspection results
82-
# in a warning? How does that encourage more analysis and coverage?
83-
locally-enabled,
8486
# NOTE(nathaniel): We don't write doc strings for most private code
8587
# elements.
8688
missing-docstring,
@@ -89,9 +91,6 @@ disable=
8991
# expression is true than it is to worry about which is an identifier
9092
# and which a literal value.
9193
misplaced-comparison-constant,
92-
# NOTE(nathaniel): Our completely abstract interface classes don't have
93-
# constructors.
94-
no-init,
9594
# TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
9695
# nicely with some of our code being implemented in Cython. Maybe in a
9796
# later version?
@@ -128,5 +127,34 @@ disable=
128127
wrong-import-order,
129128
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
130129
unsubscriptable-object,
131-
# NOTE(sergiitk): yapf compatibility, ref #25071
132-
bad-continuation,
130+
131+
# NOTE(sergiitk): From here: just to make it work with pylint==2.17.7
132+
# Pylint will be replaced with ruff anyway.
133+
# Not enforced by ruff:
134+
consider-using-f-string,
135+
# Expect to be caught (and fixed) by ruff.
136+
# https://github.com/astral-sh/ruff/issues/970
137+
# pylint | ruff |
138+
# ----------------------------------- | ------------- |
139+
f-string-without-interpolation, # F541
140+
format-string-without-interpolation, # F541
141+
no-else-raise, # RET506
142+
super-with-arguments, # UP008
143+
unnecessary-lambda-assignment, # E731
144+
unnecessary-dunder-call, # PLC2801
145+
import-outside-toplevel, # PLC0415
146+
broad-exception-raised, # TRY002
147+
raise-missing-from, # B904
148+
use-dict-literal, # C406
149+
unspecified-encoding, # PLW1514
150+
# Found in tests, but not in main:
151+
consider-using-with, # SIM115
152+
broad-exception-caught, # BLE001
153+
consider-using-in, # PLR1714
154+
consider-using-enumerate, # C0200
155+
# Found in main, but not in tests:
156+
# no-else-continue, # RET507
157+
# no-self-use, # PLR6301
158+
# inconsistent-return-statements, # RET501, RET502
159+
# consider-using-dict-items, # PLC0206
160+
# consider-iterating-dictionary, # SIM118

BUILD

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,8 +2717,9 @@ grpc_cc_library(
27172717
"src/cpp/server/channelz/channelz_service.h",
27182718
],
27192719
external_deps = [
2720-
"protobuf_headers",
27212720
"absl/log",
2721+
"absl/strings",
2722+
"protobuf_headers",
27222723
],
27232724
public_hdrs = [
27242725
"include/grpcpp/ext/channelz_service_plugin.h",
@@ -2731,6 +2732,8 @@ grpc_cc_library(
27312732
"grpc",
27322733
"grpc++",
27332734
"grpc++_config_proto",
2735+
"//src/core:channelz_v2tov1_convert",
2736+
"//src/core:experiments",
27342737
"//src/proto/grpc/channelz:channelz_proto",
27352738
"//src/proto/grpc/channelz/v2:service_cc_grpc",
27362739
],
@@ -4400,7 +4403,6 @@ grpc_cc_library(
44004403
"absl/cleanup",
44014404
"absl/log:check",
44024405
"absl/log:log",
4403-
"absl/memory",
44044406
"absl/status",
44054407
"absl/status:statusor",
44064408
"absl/strings",
@@ -4415,7 +4417,6 @@ grpc_cc_library(
44154417
visibility = ["//bazel:xds_client_core"],
44164418
deps = [
44174419
"backoff",
4418-
"call_tracer",
44194420
"debug_location",
44204421
"endpoint_addresses",
44214422
"envoy_admin_upb",
@@ -4440,7 +4441,6 @@ grpc_cc_library(
44404441
"ref_counted_ptr",
44414442
"uri",
44424443
"work_serializer",
4443-
"//src/core:default_event_engine",
44444444
"//src/core:down_cast",
44454445
"//src/core:dual_ref_counted",
44464446
"//src/core:env",
@@ -4800,6 +4800,7 @@ grpc_cc_library(
48004800
"//src/core:experiments",
48014801
"//src/core:gpr_manual_constructor",
48024802
"//src/core:http2_settings",
4803+
"//src/core:http2_settings_manager",
48034804
"//src/core:http2_stats_collector",
48044805
"//src/core:http2_status",
48054806
"//src/core:http2_ztrace_collector",

0 commit comments

Comments
 (0)