coralnet icon indicating copy to clipboard operation
coralnet copied to clipboard

Improve code with Python 3.x-only features

Open StephenChan opened this issue 6 years ago • 0 comments

Go through Python 3.x changelogs for new features to use sooner rather than later. Prominent examples:

  • 3.1 simplified super() (done in PR #383)
  • 3.2 TemporaryDirectory to improve our unit test framework with regards to media cleanup
  • 3.3 list copy() instead of [:]
  • 3.3 revisit our circular import workarounds since import behavior has changed
  • 3.3 datetime.datetime.timestamp()
  • 3.4 enums, and 3.6 enum.auto
  • 3.4 TestCase.subTest()
  • 3.5 type hints

Prerequisite: #59, and getting all systems onto Python 3.x. Related: #364 (cleaning up 2.x compatibility code)

StephenChan avatar Jun 14 '18 23:06 StephenChan