Skip to content

Conversation

kmod
Copy link
Collaborator

@kmod kmod commented Oct 4, 2016

No description provided.

kmod and others added 11 commits October 4, 2016 06:18
We fast-pathed "type has __init__ but not __new__" by saying
that the default __new__ would always succeed, but this isn't true for abstract classes.
Specifically, for the case that locals==NULL (which Cython exercises), which
wasn't previously working.

now using ctypes to test the c api
A function at risk of "naive misuse", it is only accessible via the C API.

This commit adds basic support for it using the same mechanism we use for
signals.  We also have the GIL-check mechanism, but that would be a bit more
work to get working right now due to the fact that our GIL-checks don't support
throwing exceptions.  Doing the async-exc check during signal checking means
that we will throw the async exc faster than CPython does.  It also means
that there are some pathological cases where with a lot of threads and a lot
of async excs we will probably have much worse performance.  But as long as they
are rare I think this commit shouldn't add any steady-state performance costs.
Too many things want this to be able to remove it completely.  Surprisingly,
having imp.get_magic exist but return a changing value seems to make all those
libraries happy.
We weren't properly reducing the stack depth when yielding from a generator,
meaning that the recursion depth was effectively decreased by the number
of active generators.
google's protobuf library gives away one too many refs to one of its types.

This workaround feels excessively specific, but this is a common mistake to
make, and it works just fine in CPython, so let people get away with it
as well in Pyston.
Specifically, when passed to PyArg_ParseTuple when a dict argument
is asked for.
- Fix a test to do the correct number of iterations
- Catch more exceptions in PyDict_GetItem/createModule (now that more things can throw)
@kmod kmod force-pushed the metaserver_merge branch from 949ad62 to b596a71 Compare October 5, 2016 16:17
@kmod kmod merged commit 1961ce6 into pyston:master Oct 6, 2016
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

Successfully merging this pull request may close these issues.

1 participant