Skip to content

Commit

Permalink
fix depwarn (#1042)
Browse files Browse the repository at this point in the history
* fix depwarn

* bump version
  • Loading branch information
ranocha committed Jun 28, 2023
1 parent 0b30000 commit 2a9f077
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
@@ -1,7 +1,7 @@
name = "PyCall"
uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
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"]
version = "1.96.0"
version = "1.96.1"

[deps]
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Expand Down
2 changes: 1 addition & 1 deletion src/PyCall.jl
Expand Up @@ -983,7 +983,7 @@ const _deepcopy = PyNULL()

function Base.deepcopy_internal(obj::PyObject, stackdict::Base.IdDict)
haskey(stackdict, obj) && return stackdict[obj]
ispynull(_deepcopy) && copy!(_deepcopy, pyimport("copy")["deepcopy"])
ispynull(_deepcopy) && copy!(_deepcopy, pyimport("copy")."deepcopy")
ret = pycall(_deepcopy, PyObject, obj)
stackdict[obj] = ret
ret
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Expand Up @@ -622,7 +622,7 @@ end

@testset "deepcopy #757" begin
l = py"[1,2,3]"o
l2 = deepcopy(l)
l2 = @test_nowarn deepcopy(l)
@test l == l2
l2.append(4)
@test l != l2
Expand All @@ -636,7 +636,7 @@ end
self.b = b
"""
obj = py"C757(C757(1,2), C757(3,4))"o
obj2 = deepcopy(obj)
obj2 = @test_nowarn deepcopy(obj)
@test PyPtr(obj) != PyPtr(obj2) # make sure a new Python object is created
@test obj.a.a == obj2.a.a
@test obj.a.b == obj2.a.b
Expand All @@ -651,7 +651,7 @@ end

c = py"C757(1,2)"
obj = S(c, c)
obj2 = deepcopy(obj)
obj2 = @test_nowarn deepcopy(obj)
@test obj.a === obj.b
@test obj2.a === obj2.b
obj.a.a = 4
Expand Down

2 comments on commit 2a9f077

@stevengj
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/86403

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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.96.1 -m "<description of version>" 2a9f07725b1bce8c07ac5437d66701dd9579a221
git push origin v1.96.1

Please sign in to comment.