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

activate.bat else needs to be on the same line as the if #82525

Closed
JamesAbel mannequin opened this issue Oct 2, 2019 · 11 comments
Closed

activate.bat else needs to be on the same line as the if #82525

JamesAbel mannequin opened this issue Oct 2, 2019 · 11 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes OS-windows release-blocker type-bug An unexpected behavior, bug, or error

Comments

@JamesAbel
Copy link
Mannequin

JamesAbel mannequin commented Oct 2, 2019

BPO 38344
Nosy @pfmoore, @tjguk, @ned-deily, @ambv, @zware, @zooba, @miss-islington
PRs
  • bpo-38344 else needs to be on the same line as the if #16533
  • [3.7] bpo-38344: Fix syntax in activate.bat (GH-16533) #16627
  • [3.8] bpo-38344: Fix syntax in activate.bat (GH-16533) #16628
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-10-14.21:46:14.577>
    created_at = <Date 2019-10-02.06:30:22.978>
    labels = ['type-bug', '3.8', '3.9', 'release-blocker', '3.7', 'OS-windows']
    title = 'activate.bat else needs to be on the same line as the if'
    updated_at = <Date 2019-10-15.07:42:24.972>
    user = 'https://bugs.python.org/JamesAbel'

    bugs.python.org fields:

    activity = <Date 2019-10-15.07:42:24.972>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-14.21:46:14.577>
    closer = 'lukasz.langa'
    components = ['Windows']
    creation = <Date 2019-10-02.06:30:22.978>
    creator = 'James Abel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38344
    keywords = ['patch', '3.8regression']
    message_count = 11.0
    messages = ['353722', '353756', '353758', '353764', '354142', '354144', '354145', '354146', '354668', '354699', '354703']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'tim.golden', 'ned.deily', 'lukasz.langa', 'zach.ware', 'steve.dower', 'miss-islington', 'James Abel']
    pr_nums = ['16533', '16627', '16628']
    priority = 'release blocker'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue38344'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @JamesAbel
    Copy link
    Mannequin Author

    JamesAbel mannequin commented Oct 2, 2019

    In activate.bat, the else needs to be on the same line as the if

    @JamesAbel JamesAbel mannequin added 3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error labels Oct 2, 2019
    @zooba
    Copy link
    Member

    zooba commented Oct 2, 2019

    Should be a straightforward fix (replace the "else" with "if not defined..."), but since it slipped through testing we probably want a regression test in test_venv as well.

    (+RM for the 3.8 regression)

    @zooba zooba added 3.9 only security fixes release-blocker labels Oct 2, 2019
    @zooba
    Copy link
    Member

    zooba commented Oct 2, 2019

    Adding this to the end of test_unicode_in_batch_file seems to be sufficient to cause the test to fail:

        self.assertEqual(err.strip(), '')
    

    Potentially we should add that additional check throughout this test module, but I don't think that's needed for a post-RC fix.

    @zooba
    Copy link
    Member

    zooba commented Oct 2, 2019

    Also adding Ned - this made it into 3.7 as well.

    @zooba zooba added the 3.7 (EOL) end of life label Oct 2, 2019
    @zooba
    Copy link
    Member

    zooba commented Oct 7, 2019

    New changeset e310af9 by Steve Dower (James Abel) in branch 'master':
    bpo-38344: Fix syntax in activate.bat (GH-16533)
    e310af9

    @zooba
    Copy link
    Member

    zooba commented Oct 7, 2019

    I've merged the fix so that it can be cherry-picked for the upcoming releases.

    I'd still like to see the tests enhanced to be able to detect error output in the scripts, but those don't need to necessarily make it into the upcoming releases.

    @miss-islington
    Copy link
    Contributor

    New changeset bfb5f9a by Miss Islington (bot) in branch '3.7':
    bpo-38344: Fix syntax in activate.bat (GH-16533)
    bfb5f9a

    @miss-islington
    Copy link
    Contributor

    New changeset 4880e5a by Miss Islington (bot) in branch '3.8':
    bpo-38344: Fix syntax in activate.bat (GH-16533)
    4880e5a

    @ambv
    Copy link
    Contributor

    ambv commented Oct 14, 2019

    (3.8.0 is released with this fix)

    @ambv ambv closed this as completed Oct 14, 2019
    @ned-deily
    Copy link
    Member

    New changeset ab22c8b by Ned Deily (Miss Islington (bot)) in branch '3.7':
    bpo-38344: Fix syntax in activate.bat (GH-16533)
    ab22c8b

    @ned-deily
    Copy link
    Member

    (3.7.5 is released with this fix)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes OS-windows release-blocker type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants