Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap 2.6 support for 3.x in version module #718

Conversation

maxnbk
Copy link
Contributor

@maxnbk maxnbk commented Sep 4, 2019

py 2.6 support was being maintained through a backport of total_ordering, which firstly, now has an implementation maintained through future, but secondarily, appears not to be needed in general with some small implementation changes, along with a couple of print fixes, making the version module py3 compatible.

@maxnbk maxnbk added the topic:py3 Python 3 label Sep 4, 2019
@maxnbk maxnbk requested a review from nerdvegas September 4, 2019 20:11
@nerdvegas
Copy link
Contributor

Just a note. I noticed this in the py docs on total_ordering:

While this decorator makes it easy to create well behaved totally ordered types, it does come at the cost of slower execution and more complex stack traces for the derived comparison methods. If performance benchmarking indicates this is a bottleneck for a given application, implementing all six rich comparison methods instead is likely to provide an easy speed boost.

We should leave as-is now, but given that the version module makes up the majority of where solve time goes, I think we should do as suggested and manually implement all operators in all classes, possibly doing away with _comparable class.

I've made a separate ticket: #719

@nerdvegas nerdvegas merged commit fc0c29e into AcademySoftwareFoundation:master Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:py3 Python 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants