{"action":"created","issue":{"url":"https://api.github.com/repos/python/cpython/issues/10274","repository_url":"https://api.github.com/repos/python/cpython","labels_url":"https://api.github.com/repos/python/cpython/issues/10274/labels{/name}","comments_url":"https://api.github.com/repos/python/cpython/issues/10274/comments","events_url":"https://api.github.com/repos/python/cpython/issues/10274/events","html_url":"https://github.com/python/cpython/pull/10274","id":376228134,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NDk0MDYy","number":10274,"title":"[WIP] bpo-35081: _testcapi is now compiled with Py_BUILD_CORE","user":{"login":"vstinner","id":194129,"node_id":"MDQ6VXNlcjE5NDEyOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/194129?v=4","gravatar_id":"","url":"https://api.github.com/users/vstinner","html_url":"https://github.com/vstinner","followers_url":"https://api.github.com/users/vstinner/followers","following_url":"https://api.github.com/users/vstinner/following{/other_user}","gists_url":"https://api.github.com/users/vstinner/gists{/gist_id}","starred_url":"https://api.github.com/users/vstinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstinner/subscriptions","organizations_url":"https://api.github.com/users/vstinner/orgs","repos_url":"https://api.github.com/users/vstinner/repos","events_url":"https://api.github.com/users/vstinner/events{/privacy}","received_events_url":"https://api.github.com/users/vstinner/received_events","type":"User","site_admin":false},"labels":[{"id":536945472,"node_id":"MDU6TGFiZWw1MzY5NDU0NzI=","url":"https://api.github.com/repos/python/cpython/labels/CLA%20signed","name":"CLA signed","color":"0e8a16","default":false},{"id":790204342,"node_id":"MDU6TGFiZWw3OTAyMDQzNDI=","url":"https://api.github.com/repos/python/cpython/labels/DO-NOT-MERGE","name":"DO-NOT-MERGE","color":"c11f32","default":false},{"id":666980059,"node_id":"MDU6TGFiZWw2NjY5ODAwNTk=","url":"https://api.github.com/repos/python/cpython/labels/awaiting%20merge","name":"awaiting merge","color":"fbca04","default":false},{"id":667924166,"node_id":"MDU6TGFiZWw2Njc5MjQxNjY=","url":"https://api.github.com/repos/python/cpython/labels/skip%20news","name":"skip news","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-01T02:22:33Z","updated_at":"2018-11-01T12:20:31Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/10274","html_url":"https://github.com/python/cpython/pull/10274","diff_url":"https://github.com/python/cpython/pull/10274.diff","patch_url":"https://github.com/python/cpython/pull/10274.patch"},"body":"* setup.py now defines Py_BUILD_CORE to build the _testcapi module\r\n  (_testcapimodule.c).\r\n* pycore_pathconfig.h now requires Py_BUILD_CORE to be defined.\n\n<!-- issue-number: [bpo-35081](https://bugs.python.org/issue35081) -->\nhttps://bugs.python.org/issue35081\n<!-- /issue-number -->\n"},"comment":{"url":"https://api.github.com/repos/python/cpython/issues/comments/435023830","html_url":"https://github.com/python/cpython/pull/10274#issuecomment-435023830","issue_url":"https://api.github.com/repos/python/cpython/issues/10274","id":435023830,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTAyMzgzMA==","user":{"login":"vstinner","id":194129,"node_id":"MDQ6VXNlcjE5NDEyOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/194129?v=4","gravatar_id":"","url":"https://api.github.com/users/vstinner","html_url":"https://github.com/vstinner","followers_url":"https://api.github.com/users/vstinner/followers","following_url":"https://api.github.com/users/vstinner/following{/other_user}","gists_url":"https://api.github.com/users/vstinner/gists{/gist_id}","starred_url":"https://api.github.com/users/vstinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstinner/subscriptions","organizations_url":"https://api.github.com/users/vstinner/orgs","repos_url":"https://api.github.com/users/vstinner/repos","events_url":"https://api.github.com/users/vstinner/events{/privacy}","received_events_url":"https://api.github.com/users/vstinner/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T12:20:31Z","updated_at":"2018-11-01T12:20:31Z","author_association":"MEMBER","body":"> Is not intended to build it without Py_BUILD_CORE for testing the same C API that is available in external extensions?\r\n\r\nHonestly, the exact purpose of _testcapi is now unclear to me :-) This module became giant. Maybe we need a new module to the test the Py_BUILD_CORE API? _testcapi.get_coreconfig() converts PyInterpreterState.core_config to a Python function, from my point of view, this code is not part of the public Python C API.\r\n\r\n--\r\n\r\nOther options:\r\n\r\n* Copy/paste _Py_wstrlist_as_pylist() function from main.c to _testcapimodule.c: I would prefer to not duplicate code!\r\n* Move get_coreconfig() from _testcapimodule.c to coreconfig.c: But this function is only used for an unit test (at least, now ;-)), so I would prefer to not always compile the function in Python binary (or in libpython), not waste memory/disk space.\r\n"}}
{"actor":{"display_login":"vstinner"}}