cstjean / ScikitLearn.jl

Julia implementation of the scikit-learn API https://cstjean.github.io/ScikitLearn.jl/dev/
Other
546 stars 75 forks source link

getindex(o::PyObject, s::Symbol) is deprecated #55

Closed tmamedzadeh closed 5 years ago

tmamedzadeh commented 5 years ago

I got this warning.

┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│   caller = import_sklearn() at Skcore.jl:120

How to resolve it?

cstjean commented 5 years ago

It's fixed in the latest master. Do ]add ScikitLearn#master.

Someone just needs to write the Project.toml file so that we can do a release. PRs are very appreciated.

tosalonijain commented 5 years ago

Dear @cstjean , I tried doing that but maybe I am still getting the warning, I also updated the ScikitLearn package. But, nothing changed.

cstjean commented 5 years ago

Hi, I'm very sorry that I haven't had the time to properly maintain this package. However, the warnings are really just that - warnings, that can be ignored for now. Everything should still work correctly.

tosalonijain commented 5 years ago

It's absolutely fine @cstjean , it's better for now I ignore them. Anyways, thanks for addressing :)

alexmorley commented 5 years ago

@cstjean I actually missed one of the depwarnings that should have been fixed in #53 :disappointed: .

I'm done writing my thesis in the next week or so and will fix then :)

alexmorley commented 5 years ago

@tosalonijain or Tarlan0001 if you fancied giving it a go it won't not be too hard to fix (famous last words) although it involves a tiny bit of metaprogramming.

It's just because PyCall recently allowed the sytax pythonobject.attribute as oppsed to pythonobject[:attribute] which is much nicer so the warning are to encourage people to switch... ScikitLearn.jl has a bit of metaprogramming to generate all of the function calls for scikitlearn without having to write them individually, and one of those is still generating functions that do this pythonobject[:attribute].

cstjean commented 5 years ago

This should be completely fixed now, right? If anyone hits any of these warnings, please report it here.