Skip to content

Commit 0e8e6ed

Browse files
authored
Merge branch 'main' into u/dthor/back-to-smacker-gh2630
2 parents 605339f + 7685993 commit 0e8e6ed

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,13 @@ merged:
234234
## Binary artifacts
235235

236236
Checking in binary artifacts is not allowed. This is because they are extremely
237-
problematic to verify and ensure they're safe
237+
problematic to verify and ensure they're safe. This is true even in
238+
test contexts.
238239

239240
Examples include, but aren't limited to: prebuilt binaries, shared libraries,
240241
zip files, or wheels.
241242

243+
See the dev guide for utilities to help with testing.
242244

243245
(breaking-changes)=
244246
## Breaking Changes

docs/devguide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ to be perfectly factored and not every common thing a test does needs to be
3737
factored into a more generally reusable piece. Copying and pasting is fine. It's
3838
more important for tests to balance understandability and maintainability.
3939

40+
### Test utilities
41+
42+
General code to support testing is in {gh-path}`tests/support`. It has a variety
43+
of functions, constants, rules etc, to make testing easier. Below are some
44+
common utilities that are frequently used.
45+
4046
### sh_py_run_test
4147

4248
The {gh-path}`sh_py_run_test <tests/support/sh_py_run_test.bzl` rule is a helper to
@@ -68,6 +74,12 @@ the rule. To have it support setting a new flag:
6874
list, then modify the transition's logic to check the attribute and set
6975
the flag value if the attribute is set.
7076

77+
### whl_from_dir_repo
78+
79+
The `whl_from_dir_repo` repository rule in {gh-path}`tests/support/whl_from_dir`
80+
takes a directory tree and turns it into a `.whl` file. This can be used to
81+
create arbitrary whl files to verify functionality.
82+
7183
### Integration tests
7284

7385
An integration test is one that runs a separate Bazel instance inside the test.

python/versions.bzl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ TOOL_VERSIONS = {
780780
"x86_64-unknown-linux-gnu": "9f5d5260f333fcb5372ec681851d92ddac79a33362aa85626b6cc96ffe75eeef",
781781
"x86_64-unknown-linux-musl": "7856fd505e311d1a4c24e429ac5ef0ff6ca7a2005c3a7eff1fe204524a6f45aa",
782782
"aarch64-apple-darwin-freethreaded": "52e582cc89d654c565297b4ff9c3bd4bed5c3e81cad46f41c62485e700faf8bd",
783-
"aarch64-unknown-linux-gnu-freethreaded": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
783+
"aarch64-unknown-linux-gnu-freethreaded": "461832e4fb5ec1d719dc40f6490f9a639414dfa6769158187fa85d4b424b57cd",
784784
"ppc64le-unknown-linux-gnu-freethreaded": "c65c75edb450de830f724afdc774a215c2d3255097e0d670f709d2271fd6fd52",
785785
"riscv64-unknown-linux-gnu-freethreaded": "716e6e3fad24fb9931b93005000152dd9da4c3343b88ca54b5c01a7ab879d734",
786786
"s390x-unknown-linux-gnu-freethreaded": "27276aee426a51f4165fac49391aedc5a9e301ae217366c77b65826122bb30fc",
@@ -796,6 +796,7 @@ TOOL_VERSIONS = {
796796
"riscv64-unknown-linux-gnu": "python",
797797
"x86_64-apple-darwin": "python",
798798
"x86_64-pc-windows-msvc": "python",
799+
"aarch64-pc-windows-msvc": "python",
799800
"x86_64-unknown-linux-gnu": "python",
800801
"x86_64-unknown-linux-musl": "python",
801802
"aarch64-apple-darwin-freethreaded": "python/install",
@@ -805,7 +806,6 @@ TOOL_VERSIONS = {
805806
"s390x-unknown-linux-gnu-freethreaded": "python/install",
806807
"x86_64-apple-darwin-freethreaded": "python/install",
807808
"x86_64-pc-windows-msvc-freethreaded": "python/install",
808-
"aarch64-pc-windows-msvc": "python/install",
809809
"aarch64-pc-windows-msvc-freethreaded": "python/install",
810810
"x86_64-unknown-linux-gnu-freethreaded": "python/install",
811811
},
@@ -824,7 +824,7 @@ TOOL_VERSIONS = {
824824
"x86_64-unknown-linux-gnu": "00328c48cc07076a5b083575654761cdb07bc8b3bba864d3a225062722485bac",
825825
"x86_64-unknown-linux-musl": "a2fed85bc3d5415d2318a2eeb0cb9e6effb81667870ae568a08756838ad4926e",
826826
"aarch64-apple-darwin-freethreaded": "d19213021f5fd039d7021ccb41698cc99ca313064d7c1cc9b5ef8f831abb9961",
827-
"aarch64-unknown-linux-gnu-freethreaded": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
827+
"aarch64-unknown-linux-gnu-freethreaded": "b01cc74173515cc3733f0af62b7d574364c1c68daf3ad748bca47e4328770cde",
828828
"ppc64le-unknown-linux-gnu-freethreaded": "1f093e0c3532e27744e3fb73a8c738355910b6bfa195039e4f73b4f48c1bc4fc",
829829
"riscv64-unknown-linux-gnu-freethreaded": "73162a5da31cc1e410d456496114f8e5ee7243bc7bbe0e087b1ea50f0fdc6774",
830830
"s390x-unknown-linux-gnu-freethreaded": "045017e60f1298111e8ccfec6afbe47abe56f82997258c8754009269a5343736",
@@ -1045,13 +1045,15 @@ def get_release_info(platform, python_version, base_url = DEFAULT_RELEASE_BASE_U
10451045
for u in url:
10461046
p, _, _ = platform.partition(FREETHREADED)
10471047

1048+
release_id = int(u.split("/")[-2])
1049+
10481050
if FREETHREADED.lstrip("-") in platform:
10491051
build = "{}+{}-full".format(
10501052
FREETHREADED.lstrip("-"),
10511053
{
10521054
"aarch64-apple-darwin": "pgo+lto",
10531055
"aarch64-pc-windows-msvc": "pgo",
1054-
"aarch64-unknown-linux-gnu": "lto",
1056+
"aarch64-unknown-linux-gnu": "lto" if release_id < 20250702 else "pgo+lto",
10551057
"ppc64le-unknown-linux-gnu": "lto",
10561058
"riscv64-unknown-linux-gnu": "lto",
10571059
"s390x-unknown-linux-gnu": "lto",
@@ -1063,7 +1065,7 @@ def get_release_info(platform, python_version, base_url = DEFAULT_RELEASE_BASE_U
10631065
else:
10641066
build = INSTALL_ONLY
10651067

1066-
if WINDOWS_NAME in platform and int(u.split("/")[0]) < 20250317:
1068+
if WINDOWS_NAME in platform and release_id < 20250317:
10671069
build = "shared-" + build
10681070

10691071
release_filename = u.format(

0 commit comments

Comments
 (0)