Closed lonnen closed 2 years ago
I rebased these changes against master now that CI has landed and is working again, which required a force push over the branch. No changes to the patches were made as part of this force push
one more force push here to catch the update that triggers CI on PRs
I let this sit for a day, then self-reviewed it line-by-line. I'm satisfied with it
parsimonious is all-in on python 3, so six can be removed.
Most of the changes are simple replacements, but there are a few more complicated replacements:
catching
unwrapped_exceptions
was moved into the generalexcept Exception
block because python 3 does not allowexcept tuple[()]
though python 2 did. see parsimonious/nodes.py:217python 3 totally changed how retrieving exception info and reraising works. The code is much simpler than was six required, involving fewer intermediary variables. see parsimonious/nodes.py:225
six documentation suggests using the
__metaclass__
property to set a metaclass, which did not work. The python 3 reference suggested using themetaclass=MyClass
keyword, which works well.$ tox
passes locally for me across all versions. Travis-CI is failing to install or run anything in the python 3.10 environment, though the other environments pass