text = '<br>'
soup = BeautifulSoup(text, "lxml")
for br_tag in soup.find_all('br'):
br_tag.insert_before(soup.new_tag('br'))
In 4.6.3 I get `<html><body><br/><br/></body></html>`, whereas in 4.7.0 I get `ValueError: Can't insert an element before itself.`
It looks like there is also a minor API change that didn't make it into the changelog. In 4.6.3 I was using this hacky code snippet as a navigation-safe way of getting the class of a tag as a string:
`tag.get('class', [''])[0]`
In 4.6.3 that worked, whereas in 4.7.0 I'm getting `IndexError: list index out of range`. And it looks like now I can just do `tag.get('class', '')`.
Alex