-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Fix typos in variable names, function names, and comments #101868
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -521,7 +521,7 @@ def gcc_get_limited_api_macros(headers): | |
|
||
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16 | ||
|
||
preprocesor_output_with_macros = subprocess.check_output( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure who the current maintainer here would be (@encukou?) but someone should check that all references have been handled. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, me. I won't get to reviewing a typo in an internal variable name any time soon though. Generally we avoid such cosmetic changes, anyway. |
||
preprocessor_output_with_macros = subprocess.check_output( | ||
sysconfig.get_config_var("CC").split() | ||
+ [ | ||
# Prevent the expansion of the exported macros so we can | ||
|
@@ -540,7 +540,7 @@ def gcc_get_limited_api_macros(headers): | |
return { | ||
target | ||
for target in re.findall( | ||
r"#define (\w+)", preprocesor_output_with_macros | ||
r"#define (\w+)", preprocessor_output_with_macros | ||
) | ||
} | ||
|
||
|
@@ -561,7 +561,7 @@ def gcc_get_limited_api_definitions(headers): | |
Requires Python built with a GCC-compatible compiler. (clang might work) | ||
""" | ||
api_hexversion = sys.version_info.major << 24 | sys.version_info.minor << 16 | ||
preprocesor_output = subprocess.check_output( | ||
preprocessor_output = subprocess.check_output( | ||
sysconfig.get_config_var("CC").split() | ||
+ [ | ||
# Prevent the expansion of the exported macros so we can capture | ||
|
@@ -581,13 +581,13 @@ def gcc_get_limited_api_definitions(headers): | |
stderr=subprocess.DEVNULL, | ||
) | ||
stable_functions = set( | ||
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocesor_output) | ||
re.findall(r"__PyAPI_FUNC\(.*?\)\s*(.*?)\s*\(", preprocessor_output) | ||
) | ||
stable_exported_data = set( | ||
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocesor_output) | ||
re.findall(r"__EXPORT_DATA\((.*?)\)", preprocessor_output) | ||
) | ||
stable_data = set( | ||
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocesor_output) | ||
re.findall(r"__PyAPI_DATA\(.*?\)[\s\*\(]*([^);]*)\)?.*;", preprocessor_output) | ||
) | ||
return stable_data | stable_exported_data | stable_functions | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@python/macos-team Looks like a potentially impactful change here. Can you review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a bug fix to me. If someone could demonstrate undesired behavior caused by this typo, it would warrant a bug report and a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR, Ned responded here: #101868 (review)