Repository navigation
Allow and prefer '-' over '_' in configuration setting names - #3145
Open
abdul-karim-mia wants to merge 4 commits into
Open
abdul-karim-mia wants to merge 4 commits into
abdul-karim-mia wants to merge 4 commits into
Conversation
Update Briefcase configuration parsing to prefer hyphen-separated setting names (e.g. test-requires, cleanup-paths, formal-name) matching PEP 621 conventions. - Normalize hyphenated keys to internal underscore attribute representation when merging configurations - Accept legacy underscore setting names with a deprecation warning - Raise BriefcaseConfigError if both hyphen and underscore forms of a setting are specified in the same section - Support hyphenated and underscore forms seamlessly in PEP 621 metadata (e.g. requires-python / requires_python) - Add comprehensive unit tests and towncrier newsfragment Closes beeware#3132 Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>
Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>
…used prefix check Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>
… project-name Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>
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.
Resolves #3132
Description
Briefcase previously documented multi-word configuration settings using underscores (e.g.,
test_requires,cleanup_paths,formal_name), while PEP 621 metadata standardizes on hyphens (requires-python,optional-dependencies). This inconsistency required remembering which convention each setting used.This PR updates configuration parsing to prefer hyphens for multi-word setting names:
test-requires,cleanup-paths,formal-name) are normalized to internal underscore attribute representation (test_requires, etc.) when reading configuration sections.console.warning).test-requiresandtest_requires), aBriefcaseConfigErroris raised.requires-python/requires_python) use the same normalization mechanism.test_merge_config.py,test_merge_pep621_config.py, andtest_parse_config.py.docs/en/reference/configuration.mdand a towncrier newsfragmentchanges/3132.feature.md.PR Checklist: