Add Python < 3.3 support for pyabc.i

pyabc.i for abstract base classes now supports versions of Python
prior to 3.3 by using the collection module for these older versions.
Python-3.3 and later continue to use the collections.abc module.
The -py3 option no longer has any effect on the %pythonabc feature.
This commit is contained in:
William S Fulton 2022-03-21 23:56:54 +00:00
commit f068f2c2d6
6 changed files with 51 additions and 36 deletions

View file

@ -4480,10 +4480,9 @@ public:
/* dealing with abstract base class */
String *abcs = Getattr(n, "feature:python:abc");
if (py3 && abcs) {
if (Len(base_class)) {
if (abcs) {
if (Len(base_class) > 0)
Printv(base_class, ", ", NIL);
}
Printv(base_class, abcs, NIL);
}