# Stop using file in Python code

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
0.5
• Sprint:
AP F18-1
• Team:

#### Description

We are still using the old file class in some Python code, even though it is not available in Python 3. It should be replaced with open.

Also, pep8 catches this so I suggest making the packages pep8 compliant, enabling automatic checking and removing python 2 support (all of which should be trivial).

#### Activity

Hide
Russell Owen added a comment -

Please have a look. I did not work on doc string or comment length (except in a few cases where it was trivial, in passing).

Once this is merged one of us make travis checking required for merging to master for both packages.

Show
Russell Owen added a comment - Please have a look. I did not work on doc string or comment length (except in a few cases where it was trivial, in passing). Once this is merged one of us make travis checking required for merging to master for both packages.
Hide
Tim Jenness added a comment -

Looks good. Thanks.

Show
Tim Jenness added a comment - Looks good. Thanks.
Hide
Russell Owen added a comment - - edited

Thank you for the quick review. I made Travis a requirement for merging to master for both packages.

Show
Russell Owen added a comment - - edited Thank you for the quick review. I made Travis a requirement for merging to master for both packages.

#### People

Assignee:
Russell Owen
Reporter:
Russell Owen
Reviewers:
Tim Jenness
Watchers:
Russell Owen, Tim Jenness