Skip to content

Change doctests to Python 3 #3690

@mrocklin

Description

@mrocklin

Subtle differences between Python 2 and 3 mean that it is inconvenient to test doctests in both versions. Today our CI systems only run doctests in Python 2. This policy was made several years ago, when Python 2 was more common.

It would be nice to switch our CI to test docstrings in Python 3 instead. This requires two changes:

  1. Change the .travis.yml file to set coverage in the newest Python build (3.6 today) rather than the 2.7 build. This coverage flag controls whether or not we run doctests (see continuous_integration/travis/run_tests.sh for more information)
  2. Fix all of the failing tests in our docstrings that used to rely on Python 2 syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprove or add to documentationgood first issueClearly described and easy to accomplish. Good for beginners to the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions