← 返回首页
bpo-36876: Add a tool that identifies unsupported global C variables. by ericsnowcurrently · Pull Request #15877 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

bpo-36876: Add a tool that identifies unsupported global C variables.#15877
ericsnowcurrently merged 118 commits into
python:masterfrom
ericsnowcurrently:globals-checker

Conversation

ericsnowcurrently commented Sep 10, 2019
edited
Loading

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

Copy link
Copy Markdown
Member

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

vstinner commented Sep 10, 2019
edited by bedevere-bot
Loading

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 changed the title bpo-36876: Make sure no new globals get added. bpo-36876: Add a tool that identifies unsupported global C variables. Sep 11, 2019

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.

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 merged commit ee536b2 into python:master Sep 11, 2019
ericsnowcurrently deleted the globals-checker branch September 11, 2019 18:49

Copy link
Copy Markdown

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

82 hidden items Load more…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.