charlesll/Spectra.jl

pycall api updates

Closed this issue · 9 comments

PyCall 1.90.0 is now released, which change o[:foo] and o["foo"] to o.foo and o."foo", respectively, for python objects o; see also JuliaPy/PyCall.jl#629.

The old getindex methods still work but are deprecated, so you'll want to put out a new release that uses the new methods and REQUIREs PyCall 1.90.0 to avoid having zillions of deprecation messages.

Ok thanks for the warning. I will update Spectra accordingly!

@stevengj tried to switch from o[:foo] to o.foo in my functions.

I must be doing something wrong but I get the traditional 'LoadError: type PyObject has no field foo'??

(see for instance src/baseline.jl)

but calling rampy.baseline in a notebook works, so I don't understand what is wrong there?

Probably the version of PyCall you are using is too old?

1.91... so this should be OK?

Yes, PyCall 1.91 in Julia 0.7 or later should be okay. Are you accidentally running in an older Julia version? Or maybe you are running in a Pkg environment where PyCall is pinned to an older version?

No... I'm running in Julia 1.1.0... And PyCall was 1.91... I will triple check with a brand new installation I think.

Problem solved, everything working. Release of v0.4.1.

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/1071

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.1 -m "<description of version>" 6408b4fe2c21bb6fc514775fd856e72dd0188a26
git push origin v0.4.1