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

Replace 'default' with 'main' as default in sys.version #89695

Closed
ezio-melotti opened this issue Oct 19, 2021 · 9 comments
Closed

Replace 'default' with 'main' as default in sys.version #89695

ezio-melotti opened this issue Oct 19, 2021 · 9 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@ezio-melotti
Copy link
Member

BPO 45532
Nosy @ezio-melotti, @corona10, @miss-islington, @youknowone
PRs
  • bpo-45532: Replace 'default' with 'main' as default in sys.version #29100
  • [3.10] bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100) #29106
  • [3.9] bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100) #29107
  • 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 2021-10-20.17:55:32.446>
    created_at = <Date 2021-10-19.23:40:13.821>
    labels = ['interpreter-core', 'easy', 'type-bug', '3.9', '3.10', '3.11']
    title = "Replace 'default' with 'main' as default in sys.version"
    updated_at = <Date 2021-10-20.17:55:32.445>
    user = 'https://github.com/ezio-melotti'

    bugs.python.org fields:

    activity = <Date 2021-10-20.17:55:32.445>
    actor = 'corona10'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-20.17:55:32.446>
    closer = 'corona10'
    components = ['Interpreter Core']
    creation = <Date 2021-10-19.23:40:13.821>
    creator = 'ezio.melotti'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45532
    keywords = ['patch', 'easy (C)']
    message_count = 9.0
    messages = ['404380', '404383', '404384', '404410', '404412', '404499', '404504', '404505', '404506']
    nosy_count = 4.0
    nosy_names = ['ezio.melotti', 'corona10', 'miss-islington', 'youknowone']
    pr_nums = ['29100', '29106', '29107']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45532'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @ezio-melotti
    Copy link
    Member Author

    sys.version returns '3.10.0 (default, Oct 5 2021, 23:49:26) [GCC 10.2.1 20210110]'

    'default' is supposed to represent the name of the branch, and it's been there since the HG days:

    hgid = "default";

    When the code was updated for Git in bpo-27593, the default remained the same:

    gitid = "default";

    The default should be updated to 'main'.

    Note that _Py_gitidentifier is supposed to return meaningful values while building from within a git checkout -- when it fails to do so the default value is used. This can also be tested through sys._git (which returns ('CPython', '', '')), but at the moment I can't build from a git checkout and verify that _Py_gitidentifier returns the correct branch. If not, a separate issue should be created.

    @ezio-melotti ezio-melotti added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Oct 19, 2021
    @corona10
    Copy link
    Member

    +1

    @corona10
    Copy link
    Member

    youknowone

    Do you want to take a look?

    @youknowone
    Copy link
    Mannequin

    youknowone mannequin commented Oct 20, 2021

    Thanks! I will look in it

    @corona10
    Copy link
    Member

    Note that _Py_gitidentifier is supposed to return meaningful values while building from within a git checkout

    '3.11.0a1+ (heads/main:3163e68c34, Oct 20 2021, 18:39:18) [Clang 12.0.0 (clang-1200.0.32.29)]

    FYI, it retrieves branch information well

    @corona10
    Copy link
    Member

    New changeset d2cd5ee by Jeong YunWon in branch 'main':
    bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
    d2cd5ee

    @miss-islington
    Copy link
    Contributor

    New changeset 696a89f by Miss Islington (bot) in branch '3.10':
    bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
    696a89f

    @miss-islington
    Copy link
    Contributor

    New changeset 1249ce7 by Miss Islington (bot) in branch '3.9':
    bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
    1249ce7

    @corona10
    Copy link
    Member

    Thank you Ezio and youknowone :)

    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants