Skip to content

Commit

Permalink
deps: Bump python -> 3.12.3 (envoyproxy#35334)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
Co-authored-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>
Signed-off-by: asingh-g <[email protected]>
  • Loading branch information
2 people authored and asingh-g committed Aug 20, 2024
1 parent 11158bd commit 3d5fd0b
Show file tree
Hide file tree
Showing 25 changed files with 42 additions and 61 deletions.
6 changes: 3 additions & 3 deletions api/bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "envoy_toolshed",
project_desc = "Tooling, libraries, runners and checkers for Envoy proxy's CI",
project_url = "https://github.com/envoyproxy/toolshed",
version = "0.1.3",
sha256 = "ee6d0b08ae3d9659f5fc34d752578af195147b153f8ca68eb4f8530aceb764d9",
version = "0.1.4",
sha256 = "7ddfd251a89518b97c4eb8064a7d37454bbd998bf29e4cd3ad8f44227b5ca7b3",
strip_prefix = "toolshed-bazel-v{version}/bazel",
urls = ["https://github.com/envoyproxy/toolshed/archive/bazel-v{version}.tar.gz"],
use_category = ["build"],
release_date = "2024-04-16",
release_date = "2024-07-22",
cpe = "N/A",
license = "Apache-2.0",
license_url = "https://github.com/envoyproxy/envoy/blob/bazel-v{version}/LICENSE",
Expand Down
2 changes: 1 addition & 1 deletion bazel/python_dependencies.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@com_google_protobuf//bazel:system_python.bzl", "system_python")
load("@envoy_toolshed//:packages.bzl", "load_packages")
load("@python3_11//:defs.bzl", "interpreter")
load("@python3_12//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")

def envoy_python_dependencies():
Expand Down
7 changes: 0 additions & 7 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1434,13 +1434,6 @@ filegroup(
build_file_content = BUILD_ALL_CONTENT,
)

# This archive provides Kafka client in Python, so we can use it to interact with Kafka server
# during integration tests.
external_http_archive(
name = "kafka_python_client",
build_file_content = BUILD_ALL_CONTENT,
)

def _com_github_fdio_vpp_vcl():
external_http_archive(
name = "com_github_fdio_vpp_vcl",
Expand Down
2 changes: 1 addition & 1 deletion bazel/repositories_extra.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def _python_minor_version(python_version):
return "_".join(python_version.split(".")[:-1])

# Python version for `rules_python`
PYTHON_VERSION = "3.11.9"
PYTHON_VERSION = "3.12.3"
PYTHON_MINOR_VERSION = _python_minor_version(PYTHON_VERSION)

# Envoy deps that rely on a first stage of dependency loading in envoy_dependencies().
Expand Down
13 changes: 0 additions & 13 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1353,19 +1353,6 @@ REPOSITORY_LOCATIONS_SPEC = dict(
release_date = "2023-07-21",
use_category = ["test_only"],
),
kafka_python_client = dict(
project_name = "Kafka (Python client)",
project_desc = "Open-source distributed event streaming platform",
project_url = "https://kafka.apache.org",
version = "2.0.2",
sha256 = "5dcf87c559e7aee4f18d621a02e247db3e3552ee4589ca611d51eef87b37efed",
strip_prefix = "kafka-python-{version}",
urls = ["https://github.com/dpkp/kafka-python/archive/{version}.tar.gz"],
release_date = "2020-09-30",
use_category = ["test_only"],
license = "Apache-2.0",
license_url = "https://github.com/dpkp/kafka-python/blob/{version}/LICENSE",
),
proxy_wasm_cpp_sdk = dict(
project_name = "WebAssembly for Proxies (C++ SDK)",
project_desc = "WebAssembly for Proxies (C++ SDK)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ envoy_contrib_package()
# This test sets up multiple services, and this can take variable amount of time (30-60 seconds).
envoy_py_test(
name = "kafka_broker_integration_test",
srcs = [
"kafka_broker_integration_test.py",
"@kafka_python_client//:all",
],
srcs = ["kafka_broker_integration_test.py"],
data = [
"//bazel:remote_jdk11",
"//contrib/exe:envoy-static",
Expand All @@ -24,6 +21,7 @@ envoy_py_test(
flaky = True,
deps = [
requirement("Jinja2"),
requirement("kafka-python-ng"),
requirement("MarkupSafe"),
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ envoy_contrib_package()
# This test sets up multiple services, and this can take variable amount of time (30-60 seconds).
envoy_py_test(
name = "kafka_mesh_integration_test",
srcs = [
"kafka_mesh_integration_test.py",
"@kafka_python_client//:all",
],
srcs = ["kafka_mesh_integration_test.py"],
data = [
"//bazel:remote_jdk11",
"//contrib/exe:envoy-static",
Expand All @@ -24,6 +21,7 @@ envoy_py_test(
flaky = True,
deps = [
requirement("Jinja2"),
requirement("kafka-python-ng"),
requirement("MarkupSafe"),
],
)
2 changes: 1 addition & 1 deletion test/integration/python/hotrestart_handoff_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ async def test_connection_handoffs(self) -> None:
"slow request should be incomplete when the test waits for it, otherwise the test is not necessarily validating during-drain behavior",
)
for response in slow_responses:
self.assertEquals(await response.join(), 0)
self.assertEqual(await response.join(), 0)
log.info("waiting for parent instance to terminate")
await envoy_process_1.wait()
log.info("sending second request to fast upstream")
Expand Down
4 changes: 2 additions & 2 deletions tools/api/validate_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ValidationError(Exception):

# Extract major version and full API version string from a proto path.
def proto_api_version(proto_path):
match = re.match('v(\d+).*', proto_path.parent.name)
match = re.match(r'v(\d+).*', proto_path.parent.name)
if match:
return str(proto_path.parent.name)[1:], int(match.group(1))
return None, 0
Expand All @@ -57,7 +57,7 @@ def validate_proto_path(proto_path):

# Validate that v3+ versions are regular.
if major_version >= 3:
if not re.match('\d+(alpha)?$', version_str):
if not re.match(r'\d+(alpha)?$', version_str):
raise ValidationError('Invalid v3+ version: %s' % version_str)

# Validate v2-only paths.
Expand Down
2 changes: 1 addition & 1 deletion tools/api_proto_breaking_change_detector/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(

if Path.cwd() not in Path(path_to_changed_dir).parents:
raise ValueError(
f"path_to_changed_dir {path_to_changed_dir} must be a subdirectory of the cwd ({ Path.cwd() })"
f"path_to_changed_dir {path_to_changed_dir} must be a subdirectory of the cwd ({Path.cwd()})"
)

if not Path(git_path).exists():
Expand Down
2 changes: 1 addition & 1 deletion tools/api_proto_plugin/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from functools import partial

# Key-value annotation regex.
ANNOTATION_REGEX = re.compile('\[#([\w-]+?):\s*(.*?)\](\s?)', re.DOTALL)
ANNOTATION_REGEX = re.compile(r'\[#([\w-]+?):\s*(.*?)\](\s?)', re.DOTALL)

# Page/section titles with special prefixes in the proto comments
DOC_TITLE_ANNOTATION = 'protodoc-title'
Expand Down
1 change: 1 addition & 0 deletions tools/base/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ gitpython
gsutil
icalendar
jinja2
kafka-python-ng
multidict>=6.0.2
orjson
pep8-naming
Expand Down
4 changes: 4 additions & 0 deletions tools/base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@ jinja2==3.1.4 \
# envoy-base-utils
# envoy-dependency-check
# sphinx
kafka-python-ng==2.2.2 \
--hash=sha256:3fab1a03133fade1b6fd5367ff726d980e59031c4aaca9bf02c516840a4f8406 \
--hash=sha256:87ad3a766e2c0bec71d9b99bdd9e9c5cda62d96cfda61a8ca16510484d6ad7d4
# via -r requirements.in
markupsafe==2.1.5 \
--hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \
--hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \
Expand Down
2 changes: 1 addition & 1 deletion tools/build_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def print_profile(f):
prev_cmd = None
prev_timestamp = None
for line in f:
sr = re.match('\++ (\d+\.\d+) (.*)', line)
sr = re.match(r'\++ (\d+\.\d+) (.*)', line)
if sr:
timestamp, cmd = sr.groups()
if prev_cmd:
Expand Down
4 changes: 2 additions & 2 deletions tools/dependency/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import envoy_repo

BAZEL_QUERY_EXTERNAL_DEP_RE = re.compile('@(\w+)//')
EXTENSION_LABEL_RE = re.compile('(//source/extensions/.*):')
BAZEL_QUERY_EXTERNAL_DEP_RE = re.compile(r'@(\w+)//')
EXTENSION_LABEL_RE = re.compile(r'(//source/extensions/.*):')

# We can safely ignore these as they are from Bazel or internal repository structure.
IGNORE_DEPS = set([
Expand Down
2 changes: 1 addition & 1 deletion tools/deprecate_version/deprecate_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def get_runtime_and_pr():
if runtime_guard == 'envoy_reloadable_features_test_feature_true':
found_test_feature_true = True
continue
pr_num = re.search('\(#(\d+)\)', commit.message)
pr_num = re.search(r'\(#(\d+)\)', commit.message)
# Some commits may not come from a PR (if they are part of a security point release).
pr = (int(pr_num.group(1))) if pr_num else None
pr_date = date.fromtimestamp(commit.committed_date)
Expand Down
2 changes: 1 addition & 1 deletion tools/docs/generate_external_deps_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def csv_table(headers, widths, rows):
csv_rows = '\n '.join(', '.join(row) for row in rows)
return f'''.. csv-table::
:header: {', '.join(headers)}
:widths: {', '.join(str(w) for w in widths) }
:widths: {', '.join(str(w) for w in widths)}
{csv_rows}
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion tools/gsutil/vendor_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
ARCH=x86_64
HOST_UID="$(id -u)"
HOST_GID="$(id -g)"
PYTHON_VERSION=3.11
PYTHON_VERSION=3.12

docker run --rm \
-v "$PWD/tools/gsutil/crcmod:/output" \
Expand Down
6 changes: 3 additions & 3 deletions tools/proto_format/format_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
)
""")

IMPORT_REGEX = re.compile('import "(.*)";')
SERVICE_REGEX = re.compile('service \w+ {')
PACKAGE_REGEX = re.compile('\npackage ([a-z0-9_\.]*);')
IMPORT_REGEX = re.compile(r'import "(.*)";')
SERVICE_REGEX = re.compile(r'service \w+ {')
PACKAGE_REGEX = re.compile(r'\npackage ([a-z0-9_\.]*);')
PREVIOUS_MESSAGE_TYPE_REGEX = re.compile(r'previous_message_type\s+=\s+"([^"]*)";')


Expand Down
6 changes: 3 additions & 3 deletions tools/protoprint/protoprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ def extract_clang_proto_style(clang_format_text):
format_dict = {}
for line in clang_format_text.split('\n'):
if lang is None or lang != 'Proto':
match = re.match('Language:\s+(\w+)', line)
match = re.match(r'Language:\s+(\w+)', line)
if match:
lang = match.group(1)
continue
match = re.match('(\w+):\s+(\w+)', line)
match = re.match(r'(\w+):\s+(\w+)', line)
if match:
key, value = match.groups()
format_dict[key] = value
Expand Down Expand Up @@ -196,7 +196,7 @@ def format_header_from_file(
if t.startswith('envoy.') and typedb.types[t].proto_path != file_proto.name)

def camel_case(s):
return ''.join(t.capitalize() for t in re.split('[\._]', s))
return ''.join(t.capitalize() for t in re.split(r'[\._]', s))

package_line = 'package %s;\n' % file_proto.package
file_block = '\n'.join(['syntax = "proto3";\n', package_line])
Expand Down
6 changes: 3 additions & 3 deletions tools/spelling/check_spelling_pedantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def cmp(x, y):
TODO = re.compile(r'(TODO|NOTE)\s*\(@?[A-Za-z0-9-]+\):?')

# Ignore parameter names in doxygen comments.
METHOD_DOC = re.compile('@(param\s+\w+|return(\s+const)?\s+\w+)')
METHOD_DOC = re.compile(r'@(param\s+\w+|return(\s+const)?\s+\w+)')

# Camel Case splitter
CAMEL_CASE = re.compile(r'[A-Z]?[a-z]+|[A-Z]+(?=[A-Z]|$)')
Expand Down Expand Up @@ -164,8 +164,8 @@ def start(self):
self.prefixes = prefixes
self.suffixes = suffixes

self.prefix_re = re.compile("(?:\s|^)((%s)-)" % ("|".join(prefixes)), re.IGNORECASE)
self.suffix_re = re.compile("(-(%s))(?:\s|$)" % ("|".join(suffixes)), re.IGNORECASE)
self.prefix_re = re.compile(r"(?:\s|^)((%s)-)" % ("|".join(prefixes)), re.IGNORECASE)
self.suffix_re = re.compile(r"(-(%s))(?:\s|$)" % ("|".join(suffixes)), re.IGNORECASE)

# Generate aspell personal dictionary.
pws = os.path.join(CURR_DIR, '.aspell.en.pws')
Expand Down
8 changes: 4 additions & 4 deletions tools/stack_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
def decode_stacktrace_log(object_file, input_source, address_offset=0):
# Match something like:
# [backtrace] [bazel-out/local-dbg/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:84]
backtrace_marker = "\[backtrace\] [^\s]+"
backtrace_marker = r'\[backtrace\] [^\s]+'
# Match something like:
# ${backtrace_marker} Address mapping: 010c0000-02a77000
offset_re = re.compile("%s Address mapping: ([0-9A-Fa-f]+)-([0-9A-Fa-f]+)" % backtrace_marker)
offset_re = re.compile(r"%s Address mapping: ([0-9A-Fa-f]+)-([0-9A-Fa-f]+)" % backtrace_marker)
# Match something like:
# ${backtrace_marker} #10: SYMBOL [0xADDR]
# or:
# ${backtrace_marker} #10: [0xADDR]
stackaddr_re = re.compile("%s #\d+:(?: .*)? \[(0x[0-9a-fA-F]+)\]$" % backtrace_marker)
stackaddr_re = re.compile(r"%s #\d+:(?: .*)? \[(0x[0-9a-fA-F]+)\]$" % backtrace_marker)
# Match something like:
# #10 0xLOCATION (BINARY+0xADDR)
asan_re = re.compile(" *#\d+ *0x[0-9a-fA-F]+ *\([^+]*\+(0x[0-9a-fA-F]+)\)")
asan_re = re.compile(r" *#\d+ *0x[0-9a-fA-F]+ *\([^+]*\+(0x[0-9a-fA-F]+)\)")

try:
while True:
Expand Down
8 changes: 4 additions & 4 deletions tools/type_whisperer/typedb_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
(r'(envoy[\w\.]*\.)(v1alpha\d?|v1)', r'\1v3'),
(r'(envoy[\w\.]*\.)(v2alpha\d?|v2)', r'\1v3'),
# These are special cases, e.g. upgrading versionless packages.
('envoy\.type\.matcher', 'envoy.type.matcher.v3'),
('envoy\.type', 'envoy.type.v3'),
('envoy\.config\.cluster\.redis', 'envoy.extensions.clusters.redis.v3'),
(r'envoy\.type\.matcher', 'envoy.type.matcher.v3'),
(r'envoy\.type', 'envoy.type.v3'),
(r'envoy\.config\.cluster\.redis', 'envoy.extensions.clusters.redis.v3'),
(
'envoy\.config\.retry\.previous_priorities',
r'envoy\.config\.retry\.previous_priorities',
'envoy.extensions.retry.priority.previous_priorities.v3'),
]

Expand Down

0 comments on commit 3d5fd0b

Please sign in to comment.