Skip to content

Add _testinternalcapi module #80816

Closed
Closed

Description

@vstinner
BPO 36635
Nosy @vstinner
PRs
  • bpo-36635: Add _testinternalcapi module #12841
  • bpo-36635: Change pyport.h for Py_BUILD_CORE_MODULE define #12853
  • bpo-36635, bpo-36696: Fix setup.py on AIX #12922
  • Files
  • exports.txt
  • 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-04-23.15:44:29.485>
    created_at = <Date 2019-04-15.14:51:20.246>
    labels = ['3.8', 'tests']
    title = 'Add _testinternalcapi module'
    updated_at = <Date 2019-04-23.15:44:29.485>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-04-23.15:44:29.485>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-23.15:44:29.485>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-04-15.14:51:20.246>
    creator = 'vstinner'
    dependencies = []
    files = ['48270']
    hgrepos = []
    issue_num = 36635
    keywords = ['patch']
    message_count = 5.0
    messages = ['340282', '340387', '340448', '340477', '340712']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['12841', '12853', '12922']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36635'
    versions = ['Python 3.8']

    Activity

    1. vstinner commented on Apr 15, 2019

      @vstinner
      MemberAuthor

      Python headers are being reorganized to clarify what's public, specific to CPython or "internal". See issues bpo-35134 (Add a new Include/cpython/ subdirectory) and bpo-35081 (Move internal headers to Include/internal/).

      Problem: the _testcapi module designed to only test the *public* API. Functions tested by _testcapi cannot be made internal.

      I propose to add a new _testinternalcapi module reserved to test internal APIs.

      Attached PR implements this idea: it makes _Py_GetConfigsAsDict() private and moves _testcapi.get_configs() to _testinternalcapi.get_configs().

    2. vstinner commented on Apr 17, 2019

      @vstinner
      MemberAuthor

      I listed DLL exports in the Visual Studio Command Prompt:

      dumpbin /exports \vstinner\python\master\PCbuild\amd64\python38_d.dll > \vstinner\python\exports.txt

      To make sure that I don't mess with commands, I started with a fresh Git checkout using:

      git clean -fdx
      PCbuild\build.bat -d -p x64 -e

      Good news: using PR 12853, exports.txt is exactly the same file (I expected memory address to change, but nope, they are the same). My change doesn't introduce any new symbol. See attached exports.txt file. By the way, there is no symbol which contains "PyInit" nor "Py_pickle_init" in DLL exports.

    3. vstinner commented on Apr 17, 2019

      @vstinner
      MemberAuthor

      New changeset 5c75f37 by Victor Stinner in branch 'master':
      bpo-36635: Change pyport.h for Py_BUILD_CORE_MODULE define (GH-12853)
      5c75f37

    4. vstinner commented on Apr 18, 2019

      @vstinner
      MemberAuthor

      New changeset 23bace2 by Victor Stinner in branch 'master':
      bpo-36635: Add _testinternalcapi module (GH-12841)
      23bace2

    5. vstinner commented on Apr 23, 2019

      @vstinner
      MemberAuthor

      New changeset 5749134 by Victor Stinner in branch 'master':
      bpo-36635, bpo-36696: Fix setup.py on AIX (GH-12922)
      5749134

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifetestsTests in the Lib/test dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions