Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Parser/tokenizer/string_tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ decode_str(const char *input, int single, struct tok_state *tok, int preserve_cr
return _PyTokenizer_error_ret(tok);
str = PyBytes_AS_STRING(utf8);
}
// Touch a C file
else if (!_PyTokenizer_ensure_utf8(str, tok, 1)) {
return _PyTokenizer_error_ret(tok);
}
Expand Down
8 changes: 5 additions & 3 deletions Tools/build/compute-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
Path("Lib/encodings/"),
Path("Modules/_codecsmodule.c"),
Path("Modules/cjkcodecs/"),
Path("Modules/unicodedata*"),
Path("Modules/unicodedata.c"),
Path("Modules/unicodedata_db.h"),
# difflib
Path("Lib/difflib.py"),
# email
Expand Down Expand Up @@ -116,10 +117,10 @@ class Outputs:


def compute_changes() -> None:
target_branch, head_ref = git_refs()
target_ref, head_ref = git_refs()
if os.environ.get("GITHUB_EVENT_NAME", "") == "pull_request":
# Getting changed files only makes sense on a pull request
files = get_changed_files(target_branch, head_ref)
files = get_changed_files(target_ref, head_ref)
outputs = process_changed_files(files)
else:
# Otherwise, just run the tests
Expand All @@ -132,6 +133,7 @@ def compute_changes() -> None:
run_wasi=True,
run_windows_tests=True,
)
target_branch = target_ref.removeprefix("origin/")
outputs = process_target_branch(outputs, target_branch)

if outputs.run_tests:
Expand Down
Loading