Python tests: Use compat date matching the enable date of the Python version - #7219
Open
hoodmane wants to merge 2 commits into
Open
Python tests: Use compat date matching the enable date of the Python version#7219hoodmane wants to merge 2 commits into
hoodmane wants to merge 2 commits into
Conversation
Contributor
|
LGTM |
hoodmane
force-pushed
the
hoodmane/python-test-compat-dates
branch
2 times, most recently
from
September 2, 2026 18:25
a7b64a1 to
918939c
Compare
…version The goal here is to increase the real-world relevance of the tests. Before this change, we test the oldest compat date and the newest compat date if we run these variants but we don't test compat dates from the range that are most likely to be used with each Python variant. This makes it so that each Python test passes the enable date of the Python version it uses as the compat date. I added a `no_default_compat_date` option to wd_test to remove the `--compat-date=...` argument because we get the compat dates directly from compatibility-date.capnp which can't flow into starlark so we can't pass it as the `compat_date` argument to `wd_test`. Instead, I template the dates into the wd-test file. I took the minimum of the date in `maximum-compatibility-date.txt` and the enable date to deal with flags with future enable dates. I also added an extra `--allow-future-compatibility-date` flag to workerd since it seems that `maximum-compatibility-date.txt` can contain future dates which workerd normally rejects. Only quite minor changes were needed to the actual tests. I separated the template changes into a different commit because they are noisy.
This is pretty noisy so I separated it into its own commit.
hoodmane
force-pushed
the
hoodmane/python-test-compat-dates
branch
from
September 2, 2026 19:23
918939c to
1e1562b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal here is to increase the real-world relevance of the tests. Before this
change, we test the oldest compat date and the newest compat date if we run
these variants but we don't test compat dates from the range that are most
likely to be used with each Python variant. This makes it so that each Python
test passes the enable date of the Python version it uses as the compat date.
I added a
no_default_compat_dateoption to wd_test to remove the--compat-date=...argument because we get the compat dates directly fromcompatibility-date.capnp which can't flow into starlark so we can't pass it as
the
compat_dateargument towd_test. Instead, I template the dates into thewd-test file.
I took the minimum of the date in
maximum-compatibility-date.txtand theenable date to deal with flags with future enable dates. I also added an extra
--allow-future-compatibility-dateflag to workerd since it seems thatmaximum-compatibility-date.txtcan contain future dates which workerd normallyrejects.
Only quite minor changes were needed to the actual tests. I separated the
template changes into a different commit because they are noisy.
cc @fhanau