nerdvegas/rez — pull request #104 by mstreatfield (2014-10-07 07:02:32+00:00)
Title: Remove pyparsing From Version Module

This change attempts to resolve issue #95, and remove pyparsing from the `rez.vendor.version` implementation. A regular expression based approach is used instead. Depending on the version range being parsed, this is between 5 and 20 times faster than pyparsing.

While the pyparsing solution was more pleasing on the eyes, this turned out better than expected. I have tried to preserve the debug options as best I can, more work could potentially be done here depending on what you want to see.

Both the rez selftests and version module unit tests pass. The version module unit tests were previously broken (even before my changes) - should they be hooked up with the selftest to ensure they run? I have not tested beyond this.

There is a regression in that the following syntax is no longer supported: `<` and `><`. Previously these would raise an invalid range exception, whereas they now raise an invalid syntax. As they are edge cases I think this is ok.

Additional syntax/version ranges were discussed in pull request #92 (`3,3.5+` and `<6,4+`) however these were not originally supported in rez 2 so I've made no attempt to support them here. They are also edge cases.

I have also fixed a few other import and undefined variable errors elsewhere in the module.