Skip to content

gh-148695: Lint warnings in cases generator, ceval with GIL, and optimizer. - #148696

Open
clin1234 wants to merge 6 commits into
python:mainfrom
clin1234:warning_lint
Open

clin1234 wants to merge 6 commits into
python:mainfrom
clin1234:warning_lint

Conversation

@clin1234

@clin1234 clin1234 commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

def push_cache(self, op_name: str, cached_items:list[str], outputs: int, out: CWriter) -> None:
for i, name in enumerate(cached_items):
out.start_line()
if (op_name == "_CALL_TYPE_1" and outputs == 2) \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too fragile. Can't we just have a maybe unused attribute instead? and what about clang attributes? (AFAICT this is a GCC attribute only).

I do not think the unused variable warnings need to be suppressed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the Py_UNUSED macro be applied to lvalue variables?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. But again is there a need to suppress such warnings? we provide no guarantee for -Wall -Werror/-Wpedantic and I do not see value in suppressing unused variable warninga in general.

@clin1234

clin1234 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@StanFromIreland

Copy link
Copy Markdown
Member

@clin1234 please do not randomly ping people. After three months you can post a little review reminder, but don't ping people (like me) who aren't CODEOWNERs of these files, unless they expressed interest in this earlier.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 10, 2026
@clin1234
clin1234 requested a review from picnixz October 11, 2026 09:28
@clin1234

Copy link
Copy Markdown
Contributor Author

@StanFromIreland

Copy link
Copy Markdown
Member

@clin1234, again, please see #148696 (comment).

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Oct 17, 2026
@clin1234
clin1234 force-pushed the warning_lint branch 2 times, most recently from e5d2fdc to bad8de6 Compare November 19, 2026 11:33
@clin1234

Copy link
Copy Markdown
Contributor Author

Strange error on AArch64 Windows :

     Creating library C:\a\cpython\cpython\PCbuild\arm64\python316.lib and object C:\a\cpython\cpython\PCbuild\arm64\python316.exp
  Generating code
C:\a\cpython\cpython\Objects\unicodetype_db.h(4582): fatal error C1002: compiler is out of heap space in pass 2 [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
  LINK : the 32-bit linker (C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.52.37025\bin\HostX86\arm64\link.exe) ran out of heap space and is going to restart linking with a 64-bit linker
  LINK : restarting link with 64-bit linker `C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.52.37025\bin\HostX64\arm64\link.exe'
     Creating library C:\a\cpython\cpython\PCbuild\arm64\python316.lib and object C:\a\cpython\cpython\PCbuild\arm64\python316.exp
  Generating code
  Finished generating code

Build FAILED.

C:\a\cpython\cpython\Objects\unicodetype_db.h(4582): fatal error C1002: compiler is out of heap space in pass 2 [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
    0 Warning(s)
    1 Error(s)

@clin1234

Copy link
Copy Markdown
Contributor Author

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.

3 participants