Skip to content

Commit 2a9f077

Browse files
authored
fix depwarn (#1042)
* fix depwarn * bump version
1 parent 0b30000 commit 2a9f077

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PyCall"
22
uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
33
authors = ["Steven G. Johnson <stevenj@mit.edu>", "Yichao Yu <yyc1992@gmail.com>", "Takafumi Arakaki <aka.tkf@gmail.com>", "Simon Kornblith <simon@simonster.com>", "Páll Haraldsson <Pall.Haraldsson@gmail.com>", "Jon Malmaud <malmaud@gmail.com>", "Jake Bolewski <jakebolewski@gmail.com>", "Keno Fischer <keno@alumni.harvard.edu>", "Joel Mason <jobba1@hotmail.com>", "Jameson Nash <vtjnash@gmail.com>", "The JuliaPy development team"]
4-
version = "1.96.0"
4+
version = "1.96.1"
55

66
[deps]
77
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"

src/PyCall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ const _deepcopy = PyNULL()
983983

984984
function Base.deepcopy_internal(obj::PyObject, stackdict::Base.IdDict)
985985
haskey(stackdict, obj) && return stackdict[obj]
986-
ispynull(_deepcopy) && copy!(_deepcopy, pyimport("copy")["deepcopy"])
986+
ispynull(_deepcopy) && copy!(_deepcopy, pyimport("copy")."deepcopy")
987987
ret = pycall(_deepcopy, PyObject, obj)
988988
stackdict[obj] = ret
989989
ret

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ end
622622

623623
@testset "deepcopy #757" begin
624624
l = py"[1,2,3]"o
625-
l2 = deepcopy(l)
625+
l2 = @test_nowarn deepcopy(l)
626626
@test l == l2
627627
l2.append(4)
628628
@test l != l2
@@ -636,7 +636,7 @@ end
636636
self.b = b
637637
"""
638638
obj = py"C757(C757(1,2), C757(3,4))"o
639-
obj2 = deepcopy(obj)
639+
obj2 = @test_nowarn deepcopy(obj)
640640
@test PyPtr(obj) != PyPtr(obj2) # make sure a new Python object is created
641641
@test obj.a.a == obj2.a.a
642642
@test obj.a.b == obj2.a.b
@@ -651,7 +651,7 @@ end
651651

652652
c = py"C757(1,2)"
653653
obj = S(c, c)
654-
obj2 = deepcopy(obj)
654+
obj2 = @test_nowarn deepcopy(obj)
655655
@test obj.a === obj.b
656656
@test obj2.a === obj2.b
657657
obj.a.a = 4

0 commit comments

Comments
 (0)