Skip to content

Move and clarify Py_Main documentation #78387

Description

@ncoghlan
BPO 34206
Nosy @ncoghlan, @ericsnowcurrently, @emilyemorehouse
PRs
  • bpo-34206: Improve docs and test coverage for pre-init functions #8023
  • Dependencies
  • bpo-34008: Do we support calling Py_Main() after Py_Initialize()?
  • 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 = 'https://github.com/ncoghlan'
    closed_at = None
    created_at = <Date 2018-07-24.13:37:49.167>
    labels = ['type-feature', '3.8', '3.9', '3.10', 'docs']
    title = 'Move and clarify Py_Main documentation'
    updated_at = <Date 2020-06-29.10:35:59.565>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2020-06-29.10:35:59.565>
    actor = 'vstinner'
    assignee = 'ncoghlan'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2018-07-24.13:37:49.167>
    creator = 'ncoghlan'
    dependencies = ['34008']
    files = []
    hgrepos = []
    issue_num = 34206
    keywords = ['patch']
    message_count = 3.0
    messages = ['322301', '372503', '372504']
    nosy_count = 3.0
    nosy_names = ['ncoghlan', 'eric.snow', 'emilyemorehouse']
    pr_nums = ['8023']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34206'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. ncoghlan commented on Jul 24, 2018

      @ncoghlan
      ContributorAuthor

      In resolving bpo-34008, we determined that we *do* support calling Py_Main after Py_Initialize, but it's not clear from that current documentation that this implies a Py_Finalize() call, so you don't need to call that again yourself (and it's actually an error to do so).

      So this issue covers updating the draft PR I wrote at #8023 to move the Py_Main documentation into the initialization and finalization section, and clarify how it relates to the other initialization and finalization functions.

    2. self-assigned this
      on Jul 24, 2018
    3. added
      docsDocumentation in the Doc dir
      type-featureA feature request or enhancement
      on Jul 24, 2018
    4. ncoghlan commented on Jun 28, 2020

      @ncoghlan
      ContributorAuthor

      Adjusted target versions, as I never previously got around to merging this PR.

    5. ncoghlan commented on Jun 28, 2020

      @ncoghlan
      ContributorAuthor

      Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts.

    6. transferred this issue fromon Apr 10, 2022
    7. ncoghlan commented on Jan 14, 2024

      @ncoghlan
      ContributorAuthor

      I was reminded of this issue by https://gist.github.com/hugovk/a028d882c9bceb6410fc899ab5e4e3cf

      It's still valid, since the Py_Main docs are still separate from the other initialisation and finalisation APIs: https://docs.python.org/3/c-api/veryhigh.html#c.Py_Main

      PR is rather outdated, though!

    8. added
      3.12only security fixes
      3.13only security fixes
      3.14bugs and security fixes
      and removed on Sep 26, 2024
    9. ncoghlan commented on Sep 26, 2024

      @ncoghlan
      ContributorAuthor

      PR has been updated to be suitable for 3.12/3.13/3.14 (although the deprecations in this area over the past few releases may mean the backports aren't fully automatic).

    10. ncoghlan commented on Oct 8, 2024

      @ncoghlan
      ContributorAuthor

      Since 3.13.0 was released before this landed, I only backported it as far as the 3.13 docs.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.13only security fixes3.14bugs and security fixesdocsDocumentation in the Doc dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions