Skip to content

fix(esp): deprecate warnings raised by esptool 5#363

Merged
hfudev merged 1 commit intomainfrom
fix/esptool-5-warnings
Aug 11, 2025
Merged

fix(esp): deprecate warnings raised by esptool 5#363
hfudev merged 1 commit intomainfrom
fix/esptool-5-warnings

Conversation

@hfudev
Copy link
Copy Markdown
Member

@hfudev hfudev commented Aug 11, 2025

No description provided.

@hfudev hfudev requested a review from Copilot August 11, 2025 12:42
@hfudev hfudev marked this pull request as ready for review August 11, 2025 12:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes deprecation warnings raised by esptool version 5 by updating argument formatting in the flash method. The change ensures compatibility with newer esptool versions that expect hyphenated argument names instead of underscored ones.

Key Changes

  • Modified argument formatting in the IDF serial flash method to replace underscores with hyphens in command-line arguments

_args.append(f'--{k}')
else:
_args.append(f'--{k}')
_args.append(f'--{k.replace("_", "-")}')
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blanket replacement of underscores with hyphens may cause issues for argument keys that legitimately contain underscores as part of their expected format. Consider implementing a more targeted approach that only converts specific known arguments or validates against a whitelist of expected esptool arguments.

Copilot uses AI. Check for mistakes.
@hfudev hfudev merged commit b13ed2f into main Aug 11, 2025
3 of 5 checks passed
@hfudev hfudev deleted the fix/esptool-5-warnings branch August 11, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants