[code-quality] release 0.6 of RedBaron, high level parser/modifier of python source file

Laurent Peuch cortex at worlddomination.be
Mon Mar 28 11:30:42 EDT 2016


Hello,

One year later I've finally made a new release for RedBaron. For those
of you that don't know RedBaron, it's a library that allows you to
modify you python *source* file with a high level API pretty much like
BeautifulSoup with a lot of helper to make this way-harder-than-expected
task doable.

Life being life, I don't have the same time that I used to have to
work on this project, therefor this release mark my decision to now
focus on brigging a 1.0 without adding any new big feature but instead
focusing on stability, bugfixing and fully support the python 3
grammar (if they stop adding new things all the time). This release
also mark the decision of being backward compatible from now one
until 2.0.

I know that this mailing list is full of "without any free time"
people and that this project is quite complicated but I wouldn't be
against new contributors :)

I'm adding the release notes at the end of this email.

Have a nice day,

> 0.6 (2016-03-28)
> ----------------
> 
> This release is guaranteed to have a retro-compatible public documented API
> from now on until maybe 2.0.
> There might be the only exception that if you directly call specific nodes
> constructors with FST that this API change, but this is not documented and
> simply horribly unpracticable, so I'm expecting no one to do that.
> 
> From now on the focus will be on moving to a stable 1.0 meaning: bugs fixes and
> API additions for missing needed features and no more big modifications, this
> will be for other releases, the workload is already big enough.
> 
> - BIG improvement on the proxy list merging algorithm, it is not perfect yet (comments aren't handled yet) but it's really a big move forward
> - possible retrocompatibility breaking change: from now on the node.find("name") to node.name shortcut ONLY works with possible nodes identifiers. For example node.i_dont_exist_as_an_identifier will raise AttributeError
> - new helper method .to_python that wrap ast.literal_eval on compatibile nodes https://redbaron.readthedocs.org/en/latest/other.html#to-python
> - breaking: IntNode no longer return an int on .value but a .string instead, use .to_python to have an evaluated version
> - fix node.decrease_indentation (that was simply not working)
> - fix code_block_node.value was broken on node with no parent
> - add string representation for Path object
> - now redbaron Path() class can be compared directly to baron paths
>   without using to_baron_path() helper.
> - fix by novocaine: 'function' was used as a function type detector instead of 'def'
> - add getitem() method with same api on NodeList and ProxyList
> - fix: inconsistencies when inserting lines around code blocks
> - inserting a blank lines inserts effectively a \n in a LineProxyList
> - new helper methods: .next_recursive and .previous_recursive https://redbaron.readthedocs.org/en/latest/other.html
> - fix: doc is tested in CI now, it shouldn't break anymore
> - more rendering test for python3, it shouldn't break anymore
> - pygments is now an optional dependancy, "pip install redbaron" won't install it, "pip install redbaron[pygments"] will
> - new node.next_intuitive and node.previous_intuitive methods for situations where .next/previous doesn't behave the way the user expect it http://redbaron.readthedocs.org/en/latest/other.html#next-intuitive-previous-intuitive

-- 

Laurent Peuch -- Bram


More information about the code-quality mailing list