berkerpeksag / astor

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

1.0 plans and general API stability #149

Closed nicoddemus closed 5 years ago

nicoddemus commented 5 years ago

Hello,

Recently we started to use astor (in a limited way) in pytest (https://github.com/pytest-dev/pytest/pull/3479, not yet released), so I'm wondering about the long term stability of the API, and if there are plans for a 1.0 release?

Also, are there planned breakages in the next releases? Any pinnings we should do in pytest regarding astor, for example pin to astor >=0.8,<0.9 so updates don't break pytest? Thanks!

Cheers!

berkerpeksag commented 5 years ago

Thank you for your questions! astor has ben gaining some popularity over the past year, so I don't think we are going to break API deliberately in the future.

We are going to remove deprecated names in 1.0: https://astor.readthedocs.io/en/latest/#deprecations

75 is a huge refactoring task and may break some APIs, but we are going to try to preserve backwards compatibility. For now, it's the only task that may require releasing 0.9.

nicoddemus commented 5 years ago

Thank you for your questions!

Thanks for the quick answer!

so I don't think we are going to break API deliberately in the future.

Great to hear! FTR we actually use only a single function:

https://github.com/pytest-dev/pytest/blob/65fbdf25680c68799f628ecfec9e8b155cdac64a/src/_pytest/assertion/rewrite.py#L741

We are going to remove deprecated names in 1.0

Thanks, so it seems it shouldn't affect pytest anytime soon.

Again, thanks for the quick response, it makes me much more confident on using astor on pytest.

Also thanks for all the work you guys put into it! 👍

Cheers, 🍻

berkerpeksag commented 5 years ago

Great to hear! FTR we actually use only a single function:

https://github.com/pytest-dev/pytest/blob/65fbdf25680c68799f628ecfec9e8b155cdac64a/src/_pytest/assertion/rewrite.py#L741

I just noticed that #75 may even have simplify that code since it tries not to add superfluous parenthesis around expressions. I'll keep in mind this and try to test pytest's master branch when I have time to work on it.

Also thanks for all the work you guys put into it! 👍

Likewise for pytest! :)