Closed cdeil closed 9 years ago
There might be some strings/bytes barrier issues when dealing with xpa, but I think the barrier there is probably pretty clear and fast.
I don't think I need 2to3 for imexam, actually, I didn't realize it was set to true, and I can compile it on python3 without issue (per the other ticket where we discusse pyfits in stsci.tools I removed stsci.tools)
@sosey There's only a few things pointed out by 2to3 imexam
, I think these are the only ones you need to change:
-import connect as _connect
+from . import connect as _connect
-def gaussian2dc((y, x), amp, xo, yo, sigma, offset):
+def gaussian2dc(xxx_todo_changeme, amp, xo, yo, sigma, offset):
-def gaussian2de((y, x), amp, xo, yo, sigmax, sigmay, theta, offset):
+def gaussian2de(xxx_todo_changeme1, amp, xo, yo, sigmax, sigmay, theta, offset):
(I didn't look at the gaussian
functions that currently have a tuple listed as the first argument ... I've never see this, probably you should rename to position
or accept two arguments x
and y
?)
Then all that needs to be done is set use_2to3=False
in setup.py
.
ah, forgot about that math module. will fix and update later today
changes commited in ddfe956308328e3e7d76c97378b35156306bafb0
Thanks!
As mentioned in https://github.com/astropy/package-template/pull/93 it would be nice if Astropy and all affiliated packages worked with a single Python 2 / 3 codebase.
This is usually not hard to achieve ... set
use_2to3=False
insetup.py
and then once run2to3
on your package and manually go through the suggested changes to see which ones make sense.@sosey I don't know, for
imexam
it might be difficult to get everything to work without2to3
?