Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): encode positional-only arguments in signatures #4197

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jul 26, 2023

  1. feat(python): encode positional-only arguments in signatures

    Now that Python 3.7 reached end-of-life, and since Python 3.8 and
    greater have support for positional-only argument notation (any argument
    before a `/` delimiter may only be passed positionally), adjust code
    generation to leverage this feature in order to address issues where
    inheritance hierarchies would rename parameters, which is a non-issue in
    all languages but Python, where those could always be provided as
    keyword arguments before.
    
    Fixes #2927
    
    BREAKING CHANGE: the generated Python code now requires Python 3.8 or
    later and encodes positional arguments as positional-only, making
    keyword-style usage impossible. Users who used the keyword-style
    convention need to update their code to use the positional syntax
    instead.
    RomainMuller committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    9e03b46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17371dd View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Merge remote-tracking branch 'origin/main' into rmuller/python-3.8

    # Conflicts:
    #	packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap
    RomainMuller committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    64f6112 View commit details
    Browse the repository at this point in the history