From 74dc5ebc85420f20a156e8778f7eac14efc7b131 Mon Sep 17 00:00:00 2001 From: konsti Date: Wed, 13 Mar 2024 20:32:47 +0100 Subject: [PATCH] Fix tests on main (#2423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A new protobuf release on pypi broke our tests. This is the same version that pip installs: ```console $ pip install hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360 --extra-index-url https://buf.build/gen/python Looking in indexes: https://pypi.org/simple, https://buf.build/gen/python Collecting hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360 Downloading https://buf.build/gen/python/hashb-foxglove-protocolbuffers-python/hashb_foxglove_protocolbuffers_python-25.3.0.1.20240226043130%2B465630478360-py3-none-any.whl - 34.1 kB 1.9 MB/s 0:00:00 Collecting protobuf (from hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360) Downloading protobuf-5.26.0-cp37-abi3-manylinux2014_x86_64.whl.metadata (592 bytes) Downloading protobuf-5.26.0-cp37-abi3-manylinux2014_x86_64.whl (302 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 302.8/302.8 kB 2.8 MB/s eta 0:00:00 Installing collected packages: protobuf, hashb_foxglove_protocolbuffers_python Successfully installed hashb_foxglove_protocolbuffers_python-25.3.0.1.20240226043130+465630478360 protobuf-5.26.0 ``` I added a constraints file for future releases of protobuf. --- crates/uv/tests/pip_compile.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/uv/tests/pip_compile.rs b/crates/uv/tests/pip_compile.rs index e9d2d4960..5452fbad5 100644 --- a/crates/uv/tests/pip_compile.rs +++ b/crates/uv/tests/pip_compile.rs @@ -5080,11 +5080,15 @@ fn no_stream() -> Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in .write_str("hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360")?; + let constraints_in = context.temp_dir.child("constraints.in"); + constraints_in.write_str("protobuf<=5.26.0")?; uv_snapshot!(Command::new(get_bin()) .arg("pip") .arg("compile") .arg("requirements.in") + .arg("-c") + .arg("constraints.in") .arg("--extra-index-url") .arg("https://buf.build/gen/python") .arg("--cache-dir") @@ -5095,9 +5099,9 @@ fn no_stream() -> Result<()> { exit_code: 0 ----- stdout ----- # This file was autogenerated by uv via the following command: - # uv pip compile requirements.in --cache-dir [CACHE_DIR] + # uv pip compile requirements.in -c constraints.in --cache-dir [CACHE_DIR] hashb-foxglove-protocolbuffers-python==25.3.0.1.20240226043130+465630478360 - protobuf==4.25.3 + protobuf==5.26.0 # via hashb-foxglove-protocolbuffers-python ----- stderr -----