berkerpeksag / astor

Python AST read/write
https://pypi.org/project/astor/
BSD 3-Clause "New" or "Revised" License
803 stars 102 forks source link

Replaced `inspect.isclass(...)` with `isinstance(..., type)` #165

Closed KOLANICH closed 4 years ago

isidentical commented 4 years ago

I am not sure what this patch aims, can you explain it?

KOLANICH commented 4 years ago

https://github.com/berkerpeksag/astor/commit/51c9e70f1b3a8877cb531ab9c5b1a814eefe7532#commitcomment-36324207

KOLANICH commented 4 years ago

In python 3 there are no old-style classes. (object) is not needed. I suggest to just drop python 2.

berkerpeksag commented 4 years ago

Dropping Python 2 support in a bug fix release is not an option.

KOLANICH commented 4 years ago

You can just wait with merging it untill 2020-01-01

isidentical commented 4 years ago

@berkerpeksag do astor have a roadmap about dropping py2 support? I guess it will make codebase alot clear

berkerpeksag commented 4 years ago

I doubt we are going to drop Python 2 support before reaching to 1.0. Of course, we can drop it earlier if we had to deal with tooling issues again (it was impossible to run tests under 2.6 and 3.2 due to pip's policy changes)