elastic / rally

Macrobenchmarking framework for Elasticsearch
Apache License 2.0
1.91k stars 314 forks source link

Update Yappi to latest #1821

Closed mlissner closed 2 months ago

mlissner commented 5 months ago

I'm using Python 3.12, and I was unable to install this without upgrading to the latest version of yappi. When I didn't have the latest yappi, I got:

Building wheels for collected packages: yappi
  Building wheel for yappi (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for yappi (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      copying yappi/yappi.py -> build/lib.linux-x86_64-cpython-312
      running build_ext
      building '_yappi' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/yappi
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DLIB_RT_AVAILABLE=1 -I/usr/local/include/python3.12 -c yappi/_yappi.c -o build/temp.linux-x86_64-cpython-312/yappi/_yappi.o
      yappi/_yappi.c: In function ‘IS_SUSPENDED’:
      yappi/_yappi.c:240:18: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
        240 |     return (frame->f_stacktop != NULL);
            |                  ^~
      yappi/_yappi.c: In function ‘_code2pit’:
      yappi/_yappi.c:697:29: error: ‘PyCodeObject’ has no member named ‘co_varnames’; did you mean ‘co_names’?
        697 |         co_varnames = cobj->co_varnames;
            |                             ^~~~~~~~~~~
            |                             co_names
      yappi/_yappi.c: In function ‘IS_SUSPENDED’:
      yappi/_yappi.c:242:1: warning: control reaches end of non-void function [-Wreturn-type]
        242 | }
            | ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yappi
Failed to build yappi
ERROR: Could not build wheels for yappi, which is required to install pyproject.toml-based projects

That's not your problem, but it was a showstopper for me!

This is just a small change that pulls the latest yappi into rally.

gbanasiak commented 5 months ago

Buildkite test this please

mlissner commented 5 months ago

Buildkite test this please

Sorry, is this a message to a bot or to me? If it's to me, I'm sorry, but I'm not able to take this further, but hopefully somebody can pick this up and run with it if more work is needed.

gbanasiak commented 5 months ago

@mlissner That was for a bot, please ignore.

gbanasiak commented 2 months ago

Included in https://github.com/elastic/rally/pull/1839, closing.