Repository navigation
WIP: Python 3.5 support - #4027
Conversation
|
Oh -- and I forgot we're using Conda here. We'll also need to wait until Conda has a Python 3.5 channel (or write a dependency script based on pyenv...) |
|
@mdboom - for the deprecation warning, could we also not just filter that here? https://github.com/astropy/astropy/blob/master/astropy/tests/helper.py#L440 We are already doing it for some other warnings. |
|
@astrofrog: This PR adds such a filter. However, it's not sufficient because the (a) warning is emitted on import before the filter even has a chance, and (b) it still spams the user during normal operation (which is different from the other warnings we filter for). Also, in this case it does indicate a real shortcoming in our code -- mainly that some features aren't compatible with keyword-only-arguments, so, long term at least, we should fix all the call sites. |
|
Regarding |
|
Ah -- I didn't know about the backport of signature. That seems like the way to go. |
|
Yes, it's a much nicer interface. Admittedly, more work to change over to in all the relevant places. |
|
This has been updated to use signature in place of getargspec. I think we should still wait on py.test here before merging this -- don't know when they plan to release a Python 3.5-compatible version. Maybe after 3.5 is released. |
|
I just ran py.tests's test suit (from its latest trunk) on Python 3.5b4 and it passed, so presumably their next release will be Python 3.5-compatible if it isn't already. |
|
This PR updates py.test to the latest git master as well (which is why it works at all)... I just think we should wait for a py.test release and not vendor an unreleased version. |
5933f17 to
9049a1f
Compare
|
I've removed the py.test upgrade from this PR -- this should then pass on Travis for everything but Python 3.5 (if all goes well). |
|
What about adding 3.5 to the allowed failures for now on Travis, but merge (if it passes otherwise) so that the fixes we know are needed are at least in master? |
|
@astrofrog: I was thinking of something like that. Still working out the last kinks and then will make the appropriate action on Travis. |
|
Thanks @mdboom for prioritizing this! |
|
I want to include this in v1.0.5. The backport probably won't be completely clean, but I'll take care of that. |
|
Once this is ready please also add a note about Python 3.5 support in the changes for 1.0.5. |
There was a problem hiding this comment.
You'll need to add this to the allow_failures line below (in addition to here)
There was a problem hiding this comment.
Yeah -- I just wanted to test it first, because the failures on 3.5 have been spurious, and I was hoping I could knock them out altogether.
|
In the end, I've marked Python 3.5 as an allowed failure -- the failures there are nondeterministic, but do seem related to py.test itself and not us. |
|
This seems to be passing now -- though 3.5 is still an "allowed failure". We'll still need py.test to catch up for that one, I think. |
|
py.test 2.7.3 (with Python 3.5 support) was just announced minutes ago. I'm going to test this with that and see how it goes. |
py.test 2.7.3 now warns about these things
This is now required in py.test 2.7.3
|
I think the AppVeyor failure here is a network timeout (probably unrelated to this change). Other than that, I think this is good to go. Official fully-working Python 3.5 support! |
|
fingers crossed Once this passes I'll try to get v1.0.5 out. |
|
This seems to be good to go. |
|
👍 |
|
Thanks in particular for updating all the argument parsing stuff--that looks like it was a pain. |
|
Thanks @mdboom! \o/ |
WIP: Python 3.5 support Conflicts: .travis.yml astropy/cosmology/core.py astropy/modeling/core.py astropy/modeling/utils.py astropy/stats/bayesian_blocks.py astropy/time/formats.py astropy/utils/tests/test_decorators.py astropy/visualization/hist.py
WIP: Python 3.5 support Conflicts: .travis.yml astropy/cosmology/core.py astropy/modeling/core.py astropy/modeling/utils.py astropy/stats/bayesian_blocks.py astropy/time/formats.py astropy/utils/tests/test_decorators.py astropy/visualization/hist.py
WIP: Python 3.5 support Conflicts: .travis.yml astropy/cosmology/core.py astropy/modeling/core.py astropy/modeling/utils.py astropy/stats/bayesian_blocks.py astropy/time/formats.py astropy/utils/tests/test_decorators.py astropy/visualization/hist.py
There were two classes of issues:
re.subnow cares about the replacement string looking reasonable in terms of escape characters, and we were doing%Yto\d\d\d\detc. (and it doesn't like the\d). It turns out that where we were using it,str.replaceworks just as well.inspect.getargspecnow raises aDeprecationWarning. I made a little wrapper around it that doesn't do that, but long term, we should look at all of the call sites that use it to make sure that the logic makes sense in the face of non-positional-keyword arguments (a Python 3.x feature). My fix here essentially papering that over, which allows our tests to pass since we don't use that Python 3.x feature anywhere, but it could bite us in the future.Also, this required upgrading pytest to git master. I think we should put this PR on ice until there is a py.test release made that's officially Python 3.5 compatible.