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

Add _testinternalcapi module #80816

Closed
vstinner opened this issue Apr 15, 2019 · 5 comments
Closed

Add _testinternalcapi module #80816

vstinner opened this issue Apr 15, 2019 · 5 comments
Labels
3.8 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

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']

    @vstinner
    Copy link
    Member Author

    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().

    @vstinner vstinner added 3.8 only security fixes tests Tests in the Lib/test dir labels Apr 15, 2019
    @vstinner
    Copy link
    Member Author

    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.

    @vstinner
    Copy link
    Member Author

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

    @vstinner
    Copy link
    Member Author

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

    @vstinner
    Copy link
    Member Author

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

    @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.8 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant