BaseTools: Ecc: Fix ECC for Python 3.13#12315
Merged
mergify[bot] merged 4 commits intotianocore:masterfrom Apr 8, 2026
Merged
Conversation
BaseTools hasn't been using ANTLR3 since at least 2019. Drop the files. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Contributor
Author
|
@makubacki @mikebeaton @gapalomi @lgao4 @ponchofigueroa @YuweiChen1110 can you please review when you have a chance? |
leiflindholm
requested changes
Apr 3, 2026
Member
|
|
The ANTLR autogen files are currently created without an SPDX identifer. Add the BSD-2-Clause-Patent ID. While here, correct the command to do the autogeneration by using the right filename. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
ANTLR 4.9 is broken in python 3.13 because it uses a library in the autogenerated files that is removed. This updates to 4.13.2 and also updates the autogen files, which contain support for python 3.13 as well as backwards compat. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Contributor
Author
|
@leiflindholm I have fixed the template and regenerated the files, please re-review |
leiflindholm
approved these changes
Apr 3, 2026
makubacki
approved these changes
Apr 3, 2026
lgao4
approved these changes
Apr 7, 2026
Merge Queue Status
This pull request spent 1 hour 5 minutes 18 seconds in the queue, including 1 hour 2 minutes 30 seconds running CI. Required conditions to merge
|
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.
Description
Currently, ECC is broken on python 3.13 because the
typingmodule no longer exists:This comes from ANTLR autogenerated files, so the only way to resolve it is to update ANTLR. The latest ANTLR, 4.13.2 is chosen and contains python 3.13 support, as well as backwards compatible support. The autogen files are regenerated and whitespace only changes applied to prevent PatchCheck.py from failing.
While we are here, ANTLR 3 support is dropped because edk2 has not been using ANTLR 3 since at least 2019.
How This Was Tested
Tested on a Windows machine with python 3.13. After this change EccCheck ran correctly and reported the same errors it did with python 3.12 on the pipeline.
Integration Instructions
pip install -r pip-requirements.txt to pick up the new ANTLR runtime.