Skip to content

Remove future, __future__ and py2/py3 #1726

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

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

anders-kiaer
Copy link
Contributor

@anders-kiaer anders-kiaer commented Aug 24, 2021

As Python 2 support is dropped in dev 🎉 here is a community PR on the transition of the code base.

grep -rnw . -e 'substring' now returns an empty list for all substrings py2, py3, from future, import future, __future__, _strings.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Checked for the substrings above and removed them + simplified code that followed from that.
  • I have run the tests locally and they passed. (refer to testing section in contributing)

@anders-kiaer anders-kiaer marked this pull request as ready for review August 24, 2021 15:17
@@ -109,7 +103,7 @@ def strip_relative_path(requests_pathname, path):

# pylint: disable=no-member
def patch_collections_abc(member):
return getattr(collections if utils.PY2 else collections.abc, member)
return getattr(collections.abc, member)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact we should be able to 🔪 patch_collections_abc entirely

@@ -1,5 +1,3 @@
from __future__ import print_function
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, there will be a little merge conflict with #1734 where we remove all these build artifacts... (dash/dash_table, dash/dcc, dash/html)

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic @anders-kiaer - thanks for doing this! 💃

@alexcjohnson alexcjohnson merged commit 66c7847 into plotly:dev Aug 31, 2021
@anders-kiaer anders-kiaer deleted the future_remove branch September 1, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants