Skip to content

Commit

Permalink
Sequence is in collections.abc in Python 3.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jan 23, 2020
1 parent 06dec7a commit a3912e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jpype/_jarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _JArrayNewClass(cls, ndims=1):

# FIXME JavaArrayClass likely should be exposed for isinstance, issubtype
# FIXME are these not sequences? They act like sequences but are they
# connected to collections.Sequence
# connected to collections.abc.Sequence
# has: __len__, __iter__, __getitem__
# missing: __contains__ (required for in)
# Cannot be Mutable because java arrays are fixed in length
Expand Down
2 changes: 1 addition & 1 deletion test/jpypetest/test_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __setitem__(self, ndx, v):
stop = self.size() + stop
for i in range(start, stop):
self.remove(start)
if isinstance(v, collections.Sequence):
if isinstance(v, collections.abc.Sequence):
ndx = start
for i in v:
self.add(ndx, i)
Expand Down

0 comments on commit a3912e7

Please sign in to comment.