Skip to content

bpo-36876: Add a tool that identifies unsupported global C variables. - #15877

Merged
ericsnowcurrently merged 118 commits into
python:masterfrom
ericsnowcurrently:globals-checker
Sep 11, 2019
Merged

ericsnowcurrently merged 118 commits into
python:masterfrom
ericsnowcurrently:globals-checker

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Sep 10, 2019 •

Copy link
Copy Markdown
Member

This PR does 2 things:

  • make the globals checker tool more robust and maintainable
  • add a test that invokes the checker and fails if any unsupported globals have been added

For now the test is marked as a known failure. I'll be working to fix all of unsupported globals, at which point I'll unmark the test.

Note that this PR adds code to Tools/c-analyzer or adds new tests. The only existing code I touch is where I factor out an existing testing helper from tests for another tool.

https://bugs.python.org/issue36876

@vstinner

Copy link
Copy Markdown
Member

115 commits, 51 files changes, and wow, that's a huge PR.

@vstinner

vstinner commented Sep 10, 2019 •

Copy link
Copy Markdown
Member

" bpo-36876: Make sure no new globals get added."

So far, the C API don't provide any solution for function "static PyObject *local_global_var = ...;" :-)

@ericsnowcurrently ericsnowcurrently changed the title bpo-36876: Make sure no new globals get added. Sep 11, 2019
@ericsnowcurrently

Copy link
Copy Markdown
Member Author

Yeah, it's a lot, but it's all under Tools/. :) Also, I've updated the title to be more clear.

@ericsnowcurrently

Copy link
Copy Markdown
Member Author

FYI, all the failures are strictly with patchcheck, which is complaining about whitespace in some files. I cannot reproduce that locally.

@ericsnowcurrently
ericsnowcurrently merged commit ee536b2 into python:master Sep 11, 2019
@ericsnowcurrently
ericsnowcurrently deleted the globals-checker branch September 11, 2019 18:49
@bedevere-bot

Copy link
Copy Markdown

@ericsnowcurrently: Please replace # with GH- in the commit message next time. Thanks!

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

4 participants