[Cython] longintrepr.h issues with MinGW

2018-10-22 Thread Robert Bradshaw
Given that https://bugs.python.org/issue4709 results in extension
modules that seem to work, but silently produce completely incorrect
answers, I'm thinking we should either disable our long-unpacking code
on these platforms, or at the very least give a runtime error if we
detect issues like sizeof(void*) != SIZEOF_VOID_P (or both).

I'm not sure what has made this issue pop up more lately (Python 3),
but perhaps we should even consider releasing bugfixes for previous
Cython versions.

- Robert
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Failing test reimport_from_subinterpreter

2018-10-22 Thread Jeroen Demeyer

On 2018-10-21 15:44, Stefan Behnel wrote:

Maybe print "sys.path" and "sys.meta_path" in a couple of places?


So I did and the problem is indeed related to sys.path.

When running *only* the reimport_from_subinterpreter tests, sys.path 
starts with the following entries:


''
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src/TEST_TMP/support/lib.linux-ppc64le-2.7'
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src'
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src/TEST_TMP/run/reimport_from_subinterpreter' 
 # <

'/home/jdemeyer/sage-test/local/lib/python27.zip'
'/home/jdemeyer/sage-test/local/lib/python2.7'

When running all tests, sys.path starts with the following entries:

''
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src/TEST_TMP/support/lib.linux-ppc64le-2.7'
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src' 
'/home/jdemeyer/sage-test/local'  # <

'/home/jdemeyer/sage-test/local/lib/python27.zip'
'/home/jdemeyer/sage-test/local/lib/python2.7'

The entries marked with # < are different but I don't know why. 
Further suggestions for debugging are more than welcome...


In both cases, the initial entry ('') is dropped in the sub-interpreter. 
I assume that this is a feature.

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Failing test reimport_from_subinterpreter

2018-10-22 Thread Jeroen Demeyer

n 2018-10-22 16:44, Jeroen Demeyer wrote:

The entries marked with # < are different but I don't know why.


There is a difference in $PYTHONPATH.

When it works, PYTHONPATH equals 
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src/TEST_TMP/support/lib.linux-ppc64le-2.7:/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src:'


Note the trailing colon, which is what makes everything work since that 
gets translated to the current working directory!


When it fails, PYTHONPATH equals 
'/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src/TEST_TMP/support/lib.linux-ppc64le-2.7:/home/jdemeyer/sage-test/local/var/tmp/sage/build/cython-0.29/src:/home/jdemeyer/sage-test/local'


...which has sys.prefix added for some reason.
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Failing test reimport_from_subinterpreter

2018-10-22 Thread Jeroen Demeyer

OK, I finished analyzing the problem. It's a combination of:

1. the Sage wrapper around the Cython installer setting PYTHONPATH

2. the reimport_from_subinterpreter test failing if PYTHONPATH is set

I'll open a PR quick.
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel