Skip to content
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

pyston -c "import imp; print(imp.get_magic())" dumps core on Ubuntu 16.04 64-bit and Docker 1.12.1 #1373

Closed
Samureus opened this issue Sep 25, 2016 · 2 comments

Comments

@Samureus
Copy link

Hi. I'm trying to adapt pyston 0.5.1 to install under pyenv and I get this, it also happens from the console:

$ pyston
Pyston v0.5.1 (rev abb4b132d260e5858a458462f71fd94955647195), targeting Python 2.7.7
>> import imp
>> imp.get_magic()
Someone called abort!
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Abortado (`core' generado)

Tested also using LANG=C pyston and LANG=POSIX. Also tested on the latest Docker image:

$ docker run -it pyston/pyston
Unable to find image 'pyston/pyston:latest' locally
latest: Pulling from pyston/pyston
51f5c6a04d83: Already exists 
a3ed95caeb02: Pull complete 
7004cfc6e122: Pull complete 
5f37c8a7cfbd: Pull complete 
8ad7684cace4: Pull complete 
c5fb79133e81: Pull complete 
531df8b58239: Pull complete 
42be8fbc9884: Pull complete 
Digest: sha256:54043e274e27aedb7053ab4252d32f81be9200e90a140d645efe4106408c3e71
Status: Downloaded newer image for pyston/pyston:latest
(pyston_env)root@cce0ea52fa7d:/# pyston
Pyston v0.5.1 (rev abb4b132d260e5858a458462f71fd94955647195), targeting Python 2.7.7
>> import imp
>> imp.get_magic()
Someone called abort!
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Aborted (core dumped)
@kmod
Copy link
Collaborator

kmod commented Sep 25, 2016

Sorry you ran into that, this is something we're actively working on. The problem is that we don't have a reasonable return value for imp.get_magic, so we abort in order to know if anyone was trying to call it. (Side note -- throwing an exception in Python is not always a safe way to signal an error like this, since there are many times that Python will swallow all exceptions, so our only choice is to abort.)

This behavior has changed on master: we took out imp.get_magic so now you get an AttributeError. I have a WIP patch that changes this again, to have imp.get_magic return a random value -- this is hacky but seems to have the best compatibility properties.

So anyway, if you have the chance I'd recommend testing against the latest master. We made some pretty big changes to these sorts of issues in #1357, beyond just imp.get_magic, so you're likely to have better luck.

Building Pyston is currently pretty time-consuming, so separately, we should work on getting out pre-built releases more often. In the meantime I can get out a quick point-release if you're interested.

@Samureus
Copy link
Author

Not a problem, I was able to work around it on install time in a very hackish PR in the meantime, see pyenv/pyenv#718. If you want to do a point-release later I can update the PR.

I could also try hacking a pyston-dev definition to pull and build pyston against master but it would be another day.

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

No branches or pull requests

2 participants