# Getting PyCall tests to work with Julia 1.7 / Core.TypeofVararg

**URL:** https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257
**Category:** Community
**Tags:** pycall, nightly, python, aot
**Created:** [January 12, 2021, 9:55pm UTC](https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257 "2021-01-12T21:55:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [January 12, 2021, 9:55pm UTC](https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257/1 "2021-01-12T21:55:53Z")

</div>

Last night I waged war with PyCall.jl’s tests. Today I have a minimal PR to fix them. I’m writing up the story in case anyone encounters similar issues with `Core.TypeofVararg` or AOT compilation tests.

[https://github.com/JuliaPy/PyCall.jl/pull/877/checks](https://github.com/JuliaPy/PyCall.jl/pull/877/checks)

PyCall’s tests were failing on Julia nightly since the type of `Vararg` changed to `Core.TypeofVararg` in Julia nightly (1.7) since there was no method `pyany_toany(::Core.TypeofVararg)`.

```julia
MethodError: no method matching pyany_toany(::Core.TypeofVararg)

```

[https://github.com/JuliaPy/PyCall.jl/runs/1669135329#step:10:51](https://github.com/JuliaPy/PyCall.jl/runs/1669135329#step:10:51)

`Core.TypeofVararg` was introduced in [#38136](https://github.com/JuliaLang/julia/pull/38136), version v"1.7.0-DEV.77", with commit [80ace52b](https://github.com/JuliaLang/julia/commit/80ace52b03d9476f3d3e6ff6da42f04a8df1cf7b). Thanks to @ararslan and @simeonschaub for teaching me how to use `contrib/commit-name.sh` to find this information.

While I thought I had fixed this by [adding an if statement](https://github.com/JuliaPy/PyCall.jl/pull/876/commits/5520835f454501bc6479df4c638608715945be56) to add the appropriate method to PyCall, the AOT tests were still [stubbornly failing](https://github.com/JuliaPy/PyCall.jl/runs/1686625611#step:11:48).

Eventually I figured out that the AOT tests were actually [testing master](https://github.com/JuliaPy/PyCall.jl/blob/318c23f3323d859b37ab4682339c03cb339e9135/.github/workflows/aot.yml#L50) rather than my changes in my pull request since there was a call to `pkg"dev PyCall"` just before running the tests and the environment had not been changed. It turns out a command line option for `--project` was missing, and Julia was having trouble finding the version of PyCall cloned a few steps earlier.

Ultimately, I was able to resolve all the issues in few lines of a [compact commit](https://github.com/JuliaPy/PyCall.jl/pull/877/commits/459cf453ef3e2c03f5d70bd8b646322eb75a55ff).

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [January 15, 2021, 7:06am UTC](https://discourse.julialang.org/t/getting-pycall-tests-to-work-with-julia-1-7-core-typeofvararg/53257/2 "2021-01-15T07:06:52Z")

</div>

According to [JuliaLang/julia#39239 (comment)](https://github.com/JuliaLang/julia/pull/39239#issuecomment-760016914), `Core.TypeofVararg` should be spelled `typeof(Vararg)`.
