I just noticed the issue happens on python 3.5 as well, not only python 2.7.
I suspect that in the latest lxml 4.4.0, the attributes that are passed to the Element constructor are casted to a built-in dict, and the latter remembers the insertion order from >= python 3.6.
I just noticed the issue happens on python 3.5 as well, not only python 2.7.
I suspect that in the latest lxml 4.4.0, the attributes that are passed to the Element constructor are casted to a built-in dict, and the latter remembers the insertion order from >= python 3.6.