Skip to content

Remove Python 2 vestiges #729

Closed
Closed

Description

@markcampanelli

With the merging of #728, we can now consider dropping Python2-specific code and workarounds.

Some candidates are:

Activity

  1. added this to the 0.7.0 milestone on Jun 18, 2019
  2. alexandermorgan commented on Jul 21, 2019

    @alexandermorgan
    Contributor

    @markcampanelli your list above is good, but the first point seems to be a separate issue, since it's not clear to me that the current behavior returns the correct number at all, in py2 or py3. At least that's the way the comment on line 214 makes it sound.
    I've made a PR that addresses the future imports. They're mostly importing division, but also one print_statement for the versioneer. Should this versioneer future import be left alone since it's a separate entity? has_python2 checks are also removed from conftest.py and test_conftest.py.
    Do you agree with the plan of closing this issue after merging my PR #757, and then making a new issue to address your first point above?

  3. markcampanelli commented on Jul 22, 2019

    @markcampanelli
    ContributorAuthor

    I think that first item was simply what I discovered from just searching the code for Python 2 references. I think it's fine to address that in a separate issue/PR. I don't see a problem with also removing the versioneer future presently if it is not needed.

    I think you should also search the code for "python 2" and variants. For example, this identifies import checks that are no longer needed, such as

    from urllib2 import urlopen, Request

  4. alexandermorgan commented on Jul 22, 2019

    @alexandermorgan
    Contributor

    Thanks, I've sorted out all the py2-compatible imports. Also, after reading the commit where the comment about python 2 was added in atmosphere.py, I see that we don't need to make a new issue for that. We can just remove the comment because the solution previously found seems to work fine in py2 and py3, and looks a little better than the approach that was only py3 compatible, so no problems there after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions