Repository navigation
Restore import argparse dropped in #4410 (fixes release-notes workflow on main) - #4411
Merged
Merged
Conversation
PR #4410 added 'import fnmatch' to release-notes-data.py but the edit replaced 'import argparse' instead of adding alongside it, so main() crashes at startup: NameError: name 'argparse' is not defined release-notes-data.py is only ever run as a script (via prepare.sh), so py_compile and import-time checks pass — the NameError only fires when main() builds its ArgumentParser. This broke the 'Sync - Release Notes & API Diffs' workflow on main (run 29204563881: Prepare step exit code 1). Re-add 'import argparse' in alphabetical order. Verified with 'python3 scripts/infra/docs/release-notes-data.py --help' (exit 0). Co-authored-by: Copilot App <[email protected]>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4411PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4411"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4411/packages --name skiasharp-pr-4411More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4411 |
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
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.
Regression
#4410 broke the Sync - Release Notes & API Diffs workflow on
main. ThePreparestep fails immediately:(run 29204563881, Prepare step exit 1.)
Cause
#4410 added
import fnmatchtorelease-notes-data.py, but the edit replacedimport argparserather than addingfnmatchalongside it. The script is only ever run as a program (viaprepare.sh), sopy_compileand any import-time smoke check still pass — theNameErroronly fires at runtime whenmain()constructs itsArgumentParser, which is why it wasn't caught pre-merge.Fix
Re-add
import argparse(alphabetical order, beforefnmatch). One line.Verified locally:
Co-authored-by: Copilot App [email protected]