-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 0.6 depwarns #356
Fix 0.6 depwarns #356
Conversation
The CI failure on 0.4 is caused by using the conditional comprehension syntax which exists on master. |
0.4 syntax error fixed. |
So the error doesn't occur on travis..... Maybe because numpy isn't installed? (It was triggered in a numpy specific test...) |
function pyany_toany(T::Type) | ||
T === Vararg{PyAny} ? Vararg{Any} : T | ||
end | ||
pyany_toany(::Type{PyAny}) = Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type{Vararg{PyAny}}
isn't a valid type anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the full story but it was never an actual type (you can't find a value that matches this type)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, so why does T === Vararg{PyAny}
still work if that is not a type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of it has always been strange. It is essentially only meaningful in a tuple but it's hard to only allow it there without breaking many other things. It is used to be allowed to use it just like a type though almost all types constructed this way are invalid. This is now disallowed.
It is still allowed to be used as a value and is still treated as a type for dispatch purpose even if it never actually was one. I believe the long term goal is to get rid of it or somehow being able to pass it around without dealing with this special case or generating invalid types.
Also fix 0.4 syntax error
Current coverage is 64.59% (diff: 100%)@@ master #356 diff @@
==========================================
Files 15 15
Lines 1374 1384 +10
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 845 894 +49
+ Misses 529 490 -39
Partials 0 0
|
@stevengj Any objection to tagging PyCall now that we have this? |
Tagged 1.9 |
Test on master might fail with an error similar to
and that's JuliaLang/julia#20305
I also decided to work around JuliaLang/julia#19987 since it doesn't seems to have very high priority or trivial to fix (but trivial to workaround)....