Skip to content

Commit

Permalink
Expand precompilation (#1015)
Browse files Browse the repository at this point in the history
* Create expanded precompilation

* Expand conversions for precompile

* Precompile more types

* Add calls from running `runtests.jl`

* Remove overly-specific precompile statements

* `Core.TypeofVarargs` requires newer Julia

* Require Julia >= 1.4

* Remove Julia 1.0 test
  • Loading branch information
MilesCranmer committed Jan 5, 2023
1 parent 38b1061 commit ddfd3ea
Show file tree
Hide file tree
Showing 4 changed files with 534 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/system.yml
Expand Up @@ -20,7 +20,6 @@ jobs:
architecture: [x64]
python-version: ['3.x']
julia-version:
- '1.0'
- '1'
- 'nightly'
include:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Expand Up @@ -16,7 +16,7 @@ VersionParsing = "81def892-9a0e-5fdd-b105-ffc91e053289"
Conda = "1.0"
MacroTools = "0.4, 0.5"
VersionParsing = "1.0"
julia = "0.7, 1.0"
julia = "1.4"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
12 changes: 2 additions & 10 deletions src/PyCall.jl
Expand Up @@ -980,16 +980,8 @@ include("serialize.jl")
include("pyinit.jl")

#########################################################################
# Precompilation: just an optimization to speed up initialization.
# Here, we precompile functions that are passed to cfunction by __init__,
# for the reasons described in JuliaLang/julia#12256.

precompile(pyjlwrap_call, (PyPtr,PyPtr,PyPtr))
precompile(pyjlwrap_dealloc, (PyPtr,))
precompile(pyjlwrap_repr, (PyPtr,))
precompile(pyjlwrap_hash, (PyPtr,))
precompile(pyjlwrap_hash32, (PyPtr,))

# TODO: precompilation of the io.jl functions
include("precompile.jl")

#########################################################################
end # module PyCall

0 comments on commit ddfd3ea

Please sign in to comment.