Python 3.7 support - deprecation of classes in the collections module
Change the base classes in the pyabc.i file to use the collections.abc module instead of collections due to the deprecation of the classes in the collections module in Python 3.7.
This commit is contained in:
parent
47297f3453
commit
4079fb927b
4 changed files with 53 additions and 18 deletions
|
|
@ -1,10 +1,10 @@
|
|||
%define %pythonabc(Type, Abc)
|
||||
%feature("python:abc", #Abc) Type;
|
||||
%enddef
|
||||
%pythoncode %{import collections%}
|
||||
%pythonabc(std::vector, collections.MutableSequence);
|
||||
%pythonabc(std::list, collections.MutableSequence);
|
||||
%pythonabc(std::map, collections.MutableMapping);
|
||||
%pythonabc(std::multimap, collections.MutableMapping);
|
||||
%pythonabc(std::set, collections.MutableSet);
|
||||
%pythonabc(std::multiset, collections.MutableSet);
|
||||
%pythoncode %{import collections.abc%}
|
||||
%pythonabc(std::vector, collections.abc.MutableSequence);
|
||||
%pythonabc(std::list, collections.abc.MutableSequence);
|
||||
%pythonabc(std::map, collections.abc.MutableMapping);
|
||||
%pythonabc(std::multimap, collections.abc.MutableMapping);
|
||||
%pythonabc(std::set, collections.abc.MutableSet);
|
||||
%pythonabc(std::multiset, collections.abc.MutableSet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue