These are chat archives for dropbox/pyston

22nd
Jun 2016
Marius Wachtler
@undingen
Jun 22 2016 15:06
so I tried to help with tracking down this has_getattribute is false while tp_getattr = fortran_getattr
Marius Wachtler
@undingen
Jun 22 2016 15:11
Did I understood correctly that the root cause is that we set has_getattribute depending on if __getattribute__ is overridden but the problem is that only tp_getattro is supposed to set __getattribute__ and tp_getattr will not set it (because it has no wrapper function set)?
So we have to add an explicitly check for tp_getattr when initializing has_getattribute because the tp_getattr is not exposed as a python attribute?
an example for this is: _ssl.SSLType
Alan Justino da Silva
@alanjds
Jun 22 2016 18:08
Hi.
Had anyone tried to install uwsgi over Pyston?
Kevin Modzelewski
@kmod
Jun 22 2016 21:22
It looks like we fail during their installation
when they try to inspect some of the state of the Python executable they're building under
Alan Justino da Silva
@alanjds
Jun 22 2016 21:23
I got a generic AttributeError: 'NoneType' object has no attribute 'split'
when trying under the docker image
Kevin Modzelewski
@kmod
Jun 22 2016 21:24
yeah, I had to modify the *uwsgi setup script to give me a more informative message
Alan Justino da Silva
@alanjds
Jun 22 2016 21:24
ah ok
Kevin Modzelewski
@kmod
Jun 22 2016 21:24
  File "uwsgiconfig.py", line 1605, in <module>
    build_uwsgi(uc, is_cflags, gcll=gcll)
  File "uwsgiconfig.py", line 458, in build_uwsgi
    execfile('%s/uwsgiplugin.py' % path, up)
  File "plugins/python/uwsgiplugin.py", line 20, in <module>
    LIBS = sysconfig.get_config_var('LIBS').split() + sysconfig.get_config_var('SYSLIBS').split()
AttributeError: 'NoneType' object has no attribute 'split'
Alan Justino da Silva
@alanjds
Jun 22 2016 21:24
yes. this one
so, it is a no-go for now
Kevin Modzelewski
@kmod
Jun 22 2016 21:25
so it looks we should look into populating LIBS/SYSLIBS a bit better (or maybe as an empty string instead of as None)
I was able to hack around that :)
but then we have some issues with their extension modules
since 1) they have a profiler, which usually wants to insert itself pretty deeply, and 2) they want to do direct frame management in another one of their extensions
I think it would be pretty easy to get to the point that it works (maybe minus the profiler) if we are willing to change/upstream some changes to uwsgi
Alan Justino da Silva
@alanjds
Jun 22 2016 21:27
and this extensions can be disabled?
I did not knew that uwsgi had a profiler inbuilt
Kevin Modzelewski
@kmod
Jun 22 2016 21:30
me neither :)
I'm trying to look through the uwsgi sources, I'm not sure if the extension is necessary or not, but I'm guessing that it is
Alan Justino da Silva
@alanjds
Jun 22 2016 21:30
I got a better time with UWSGI_PROFILE=minimal, but not far enough
what one you are looking for?
I can create an issue, but did not knew if it is to pyston or to uwsgi
Kevin Modzelewski
@kmod
Jun 22 2016 21:33
with UWSGI_PROFILE=minimal I was able to get uwsgi to install, but it installed an empty library
Alan Justino da Silva
@alanjds
Jun 22 2016 21:33
yes
pyston uwsgiconfig.py --build pyonly minimal gone the far
but did not built
Kevin Modzelewski
@kmod
Jun 22 2016 21:34
my assumption is we need to get python_plugin.c compiling to actually use uwsgi. I'm not sure whose "responsibility" that is but the work would probably get done from the pyston side
Alan Justino da Silva
@alanjds
Jun 22 2016 21:35
Ok. Thanks
I just wanted to know it ir already worked. It did not
This message was deleted
Kevin Modzelewski
@kmod
Jun 22 2016 21:36
Should be fairly straightforward if we wanted to add support, but yes it doesn't work currently :/
Alan Justino da Silva
@alanjds
Jun 22 2016 21:37
no problem. Will cross-post github issues
Can attach or send the patched stuff later please?
Kevin Modzelewski
@kmod
Jun 22 2016 21:52
sure :)
re: has_getattribute -- I think the assert might be wrong, not that we should be setting has_getattribute more often
oh shoot nevermind.
hmm maybe it is easiest to get rid of has_getattribute and just check tp_getattr and tp_getattro directly
Kevin Modzelewski
@kmod
Jun 22 2016 21:58
I was thinking we could add a check to PyType_Ready that checks for tp_getattr and if so sets has_getattribute, but it's possible that someone does del C.__getattribute__ which will update has_attribute again