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

DM-7069: Port to Python 3 #19

Merged
merged 18 commits into from
Aug 9, 2016
Merged

DM-7069: Port to Python 3 #19

merged 18 commits into from
Aug 9, 2016

Commits on Jul 29, 2016

  1. Modernize to python 2.7

    timj committed Jul 29, 2016
    Configuration menu
    Copy the full SHA
    f7cf7c1 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2016

  1. Remove trailing whitespace

    timj committed Aug 6, 2016
    Configuration menu
    Copy the full SHA
    5c44b7b View commit details
    Browse the repository at this point in the history
  2. Modernize asserts in tests

    timj committed Aug 6, 2016
    Configuration menu
    Copy the full SHA
    c80f098 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee0a38e View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2016

  1. Run futurize on codebase

    With some manual tweaks where futurize doesn't quite do the
    right thing.
    
    ReadProxy can not inherit from future object as this breaks the proxy
    on Python 2.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    9b5a6a5 View commit details
    Browse the repository at this point in the history
  2. Switch pyfits to astropy.io.fits

    The interfaces are compatible so this just changes the namespace.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    1d1e088 View commit details
    Browse the repository at this point in the history
  3. Refactor check for iterable

    On Python 3 str has __iter__ so all the tests that are checking
    for an iterable in the codebase have to also be careful not to
    include str by mistake. Refactor the code that looks for __iter__
    to use routines from utils where possible. Where not possible
    add instance checks for string.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    b345d21 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    86a44d7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    37908b7 View commit details
    Browse the repository at this point in the history
  6. Determine root directory from test file

    Use __file__ to find the test file and then derive repository
    locations from it.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    c7bb6a7 View commit details
    Browse the repository at this point in the history
  7. Catch TypeError from getargspec

    Future object does not have an __init__ method so we have to catch
    that case in the MRO.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    8ce08a5 View commit details
    Browse the repository at this point in the history
  8. Explcitly try UserDict variants

    Python 3 collections.UserDict is iterable but not on Python 2.
    Python 2 requires we use UserDict.IterableUserDict so try that
    first and then revert to collections.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    ba08c09 View commit details
    Browse the repository at this point in the history
  9. Mark expected test failures as expected test failures

    This allows the tests to be visible to the test runner and is better
    than globally disabling all testing in the file and hiding the tests.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    5827082 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c7a3e96 View commit details
    Browse the repository at this point in the history
  11. Use str type for filter not bytes, and compare int not type(1)

    Futurize converted types.StringType to bytes (technically correct
    on python2) when it should have converted to str.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    fbc523c View commit details
    Browse the repository at this point in the history
  12. DbStorage class is not iterable

    The next() method is just a method that iterates but is
    not providing an iterable interface allowing the next() function
    to work.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    bd6bbd2 View commit details
    Browse the repository at this point in the history
  13. Fix pytest warnings about class names

    pytest assumes that classes with names starting with Test are test
    classes that should be analyzed for test methods. When it can't
    find any it warns that something might be wrong. Rename the tests
    to remove the warnings.
    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    e629340 View commit details
    Browse the repository at this point in the history
  14. PEP8 and Flake8 fixes

    timj committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    def6809 View commit details
    Browse the repository at this point in the history