Skip to content

Commit

Permalink
Fix deprecation warning from collections.abc (#3568)
Browse files Browse the repository at this point in the history
Fix a deprecation warning that will break espresso in Python 3.9.
  • Loading branch information
kodiakhq[bot] authored Mar 9, 2020
2 parents 729a677 + ae08014 commit 19a0b9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/espressomd/particle_data.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ cdef class ParticleHandle:
cdef Vector3d gamma

# We accept a single number by just repeating it
if not isinstance(_gamma, collections.Iterable):
if not isinstance(_gamma, collections.abc.Iterable):
_gamma = 3 * [_gamma]

check_type_or_throw_except(
Expand Down Expand Up @@ -942,7 +942,8 @@ cdef class ParticleHandle:
def __set__(self, _gamma_rot):
cdef Vector3d gamma_rot
# We accept a single number by just repeating it
if not isinstance(_gamma_rot, collections.Iterable):
if not isinstance(
_gamma_rot, collections.abc.Iterable):
_gamma_rot = 3 * [_gamma_rot]

check_type_or_throw_except(
Expand Down

0 comments on commit 19a0b9c

Please sign in to comment.