Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Add support for Python 3.7 #151

Open
tomviner opened this issue Jul 14, 2018 · 6 comments · May be fixed by #153
Open

Add support for Python 3.7 #151

tomviner opened this issue Jul 14, 2018 · 6 comments · May be fixed by #153

Comments

@tomviner
Copy link

Python 3.7 is out now, and so it would be great to support it.

After adding the new deadsnakes ppa I submitted in #150 I discovered that we need to run the tests on Xenial for Python 3.7 to work. See travis-ci/travis-ci#9069 (comment)

As a user (but not developer) of pyflame this is basically as far as I've got. I tried catching Python 3.7 and applying the 3.6 ABI but that's just guess work.

Currently:

18 failed, 19 passed

Hopefully someone with some pyflame dev experience can have a go at getting it working :-)

See:

@henryzhangsta henryzhangsta linked a pull request Aug 29, 2018 that will close this issue
@altendky
Copy link

altendky commented Nov 1, 2018

Mostly adding this so it might show up in searches for the error. 3.6 is nicely reported as unsupported but 3.7 fails with an error suggesting a ptrace configuration issue (at least per #120 where searches for the error lead you).

altendky@lt:~$ git -C pyflame rev-parse HEAD
d67c353b13b6950b48bbb8fcb1dde498637a4e28
altendky@lt:~$ pyflame/src/pyflame --version
pyflame 1.6.6 linux-gnu x86_64 (ABI list: 26 34)
altendky@lt:~$ cat /proc/sys/kernel/yama/ptrace_scope
0
altendky@lt:~$ pyflame/src/pyflame -o outfile -t python3.7 -c 'import time; time.sleep(5)'
Failed to locate libpython within timeout period.
altendky@lt:~$ pyflame/src/pyflame -o outfile -t python3.6 -c 'import time; time.sleep(5)'
Target has Python ABI 36, which is not supported by this pyflame build.
altendky@lt:~$ pyflame/src/pyflame -o outfile -t python3.5 -c 'import time; time.sleep(5)'
altendky@lt:~$ pyflame/src/pyflame -o outfile -t python3.4 -c 'import time; time.sleep(5)'
altendky@lt:~$ pyflame/src/pyflame -o outfile -t python2.7 -c 'import time; time.sleep(5)'
altendky@lt:~$

Note that 2.7/3.4/3.5 did run for five seconds as expected prior to completing.

@rim-odoo
Copy link

I'm also facing the Failed to locate libpython within timeout period. when running Python 3.7.2

@ganiganesh92
Copy link

I am trying to attach python app running on pypy env i am also facing same issue can any one help here...

@randomstuff
Copy link

For 3.7, there is no _PyThreadState_Current symbol anymore.

#  define _PyThreadState_Current _PyRuntime.gilstate.tstate_current 

@rpodgorny
Copy link

...any progress on this? i see many forks with python3.7 support but not a single pull request merged... :-(

@GeniusWiki
Copy link

I got same error "Failed to locate libpython within timeout period" on Ubuntu18.04 + Python 3.7 Gunicorn. It works all configurations are same but python2.7.

Can anyone make Pyflame working with 3.7? @randomstuff looks give some hint, but I cannot figure out how as I have minor knowledge on C/C++ code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants