JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
717 stars 61 forks source link

Using development version of package opens Julia REPL #451

Closed MilesCranmer closed 4 months ago

MilesCranmer commented 4 months ago

Affects: JuliaCall

Describe the bug

If I add a development dependency to my juliapkg.json, and then import my Python package, the Julia REPL will open. For example, on the pythoncall-try-3 branch of PySR, I modified juliapkg.json as follows:

{
    "julia": "1.6",
    "packages": {
        "SymbolicRegression": {
            "uuid": "8254be44-1295-4e6a-a16d-46603ac705cb",
            "dev": true,
            "path": "../SymbolicRegression.jl"
        },
        "ClusterManagers": {
            "uuid": "34f1f09b-3a8b-5176-ab39-66d58a4d544e",
            "version": "0.4"
        }
    }
}

I then install PySR and do import pysr. This gives me the following:

Screenshot 2024-02-07 at 14 28 52

I am able to exit the Julia REPL which returns me to the Python REPL.

I tried with the version of PythonCall.jl in main and I still see this issue.

MilesCranmer commented 4 months ago

@cjdoris Seems like the same thing also happens when specifying a particular revision of a Git repository.

MilesCranmer commented 4 months ago

Can a fix for this be back ported to 0.9?

cjdoris commented 4 months ago

The main branch is 0.9.

I thought I fixed this on main a while back. Can you check again? If seems really weird that it would only happen for dev packages. Maybe juliapkg is not getting the version of PythonCall you think it's getting?

MilesCranmer commented 4 months ago

I haven’t seen this issue ever since. It must have been an old package. Closing until it reappears..