google-deepmind / mathematics_dataset

This dataset code generates mathematical question and answer pairs, from a range of question types at roughly school-level difficulty.
Apache License 2.0
1.8k stars 249 forks source link

Refactor deprecated unittest aliases for Python 3.11 compatibility. #16

Closed tirkarthi closed 3 years ago

tirkarthi commented 3 years ago

The deprecated aliases were removed in Python 3.11 in https://github.com/python/cpython/pull/28268 . Use six for a compatible function present in both Python 2 and Python 3.

davidsaxton commented 3 years ago

Instead of using six (which looks a bit messy - I don't think we need to support python 2), could this just replace assertRaisesRegexp with assertRaisesRegex? This should solve all compatibility problems (unless I've missed something). Thanks!

tirkarthi commented 3 years ago

The project had Python 2.7 classifier and I assumed it supports Python 2.7 but I will be happy to remove six code if you can confirm Python 2.7 is no longer supported.

davidsaxton commented 3 years ago

I can confirm that Python 2.7 should no longer be supported in this project.