← Back to Pull requests

Allow and prefer '-' over '_' in configuration setting names #3145

Closed
unknown closed this pull request without merging on Nov 18, 2026 00:21 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 09:42 UTC
Author

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:

  • Hyphenated setting names (e.g. test-requires, cleanup-paths, formal-name) are normalized to internal underscore attribute representation (test_requires, etc.) when reading configuration sections.

  • Legacy underscore setting names continue to be accepted for backwards compatibility, but display a deprecation warning (console.warning).

  • If a section specifies both hyphen and underscore forms of the same setting (e.g., both test-requires and test_requires), a BriefcaseConfigError is raised.

  • PEP 621 settings (such as requires-python / requires_python) use the same normalization mechanism.

  • Added comprehensive unit tests in test_merge_config.py, test_merge_pep621_config.py, and test_parse_config.py.

  • Added documentation note in docs/en/reference/configuration.md and a towncrier newsfragment changes/3132.feature.md.
  • PR Checklist:


  • I will abide by the BeeWare Code of Conduct

  • I have read and have followed the [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) file

  • This PR was generated or assisted using an AI tool
  • Diff: 188 lines (+141 / -47) across 2 files Reviewer: freakboy3742 Review duration: 9519m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 188 lines diff across 2 files
    0.59
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.314
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #3145"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 59.0% (MEDIUM) · Higher = larger blast radius
    59.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.3% · Safe to merge
    23.3%