Closed ocefpaf closed 10 years ago
Hi @ocefpaf - this is looking good. Thanks! (Sorry for the slow response - not sure how I've only just spotted your PR! :expressionless:)
I'll have look at the issues you mention.
Are you OK to sign the CLA available from http://scitools.org.uk/governance.html?
my version is returning the key as a numpy.int64 instead. Any ideas?
Python 3 changes int
from a fixed-width type to the variable width type. As a result, the NumPy integer array scalars (such as np.int64) no longer inherit from int
(see http://docs.scipy.org/doc/numpy/reference/arrays.scalars.html#built-in-scalar-types). So all the checks for isinstance(..., int)
need to be changed to reflect that. Perhaps isinstance(..., (int, np.integer))
?
NB. Once the int/np.integer thing is fixed, attempting to index the result of a zip() will break.
I know that some people prefer six, but I think that six is better once the code base is python3 and one wants to make it backwards compatible.
I'm fine with that. This PR doesn't stop us making that change in the future.
Hello @rhattersley,
I have no problem with the CLA. I already signed and emailed according to the instructions.
Thanks for the information on the int issue. I will take a look and fix this PR ASAP.
Do you think it is better if I squash these commits into one?
Hi @rhattersley,
I'm between a rock and a hard place here with travis:
python setup.py build
works for python3 but not for python2 (the build for python2 takes place in a different directory!)python setup.py install
works for python2 but not for python3 (no idea why, because that works on my local machine).I'm not used to travis-ci, but I will investigate this further.
Hi @ocefpaf - thanks for persevering with this!
To avoid the problems with testing I've added a tweak to use the test_suite
option of setuptools. I've also tidied the commits and rebased on to the latest master (so the pep8 tests will pass with the latest version of the pep8 tool) and pushed it all up as a new PR: #69.
So... thanks to your hard work we now have Python 3 support. :tada: Thank you! :smile:
Thanks!
Hi,
I'm trying to get biggus to work with python3. However, I need some help to move forward.
map(None, shape, keys)
tolist(itertools.izip_longest(shape, keys))
. I hope that does not impact performance or anything else.biggus.tests.test_linear_mosaic.TestLinearMosaic
, more specifically_cleanup_new_key()
. It tests the key (at line 560) for int, but my version is returning the key as a numpy.int64 instead. Any ideas?