Skip to content

Remove (most) Python 2 support from C++ code#35614

Closed
dreiss wants to merge 8 commits intogh/dreiss/31/basefrom
gh/dreiss/31/head
Closed

Remove (most) Python 2 support from C++ code#35614
dreiss wants to merge 8 commits intogh/dreiss/31/basefrom
gh/dreiss/31/head

Conversation

@dreiss
Copy link
Copy Markdown
Contributor

@dreiss dreiss commented Mar 28, 2020

Stack from ghstack:

Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: D20842876

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Mar 28, 2020
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Mar 28, 2020

💊 CI failures summary and remediations

As of commit 6b5557e (more details on the Dr. CI page):


  • 3/3 failures possibly* introduced in this PR
    • 3/3 non-CircleCI failure(s)

Extra GitHub checks: 2 failed


ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 49 times.

dreiss added 6 commits April 15, 2020 10:27
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)

[ghstack-poisoned]
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)

[ghstack-poisoned]
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)

[ghstack-poisoned]
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)
// RPC module is only avaialble for Python3
// when build flag "USE_DISTRIBUTED" is on.
!py::module::import("torch._six").attr("PY2").cast<bool>() &&
// RPC module is only avaialble when build flag "USE_DISTRIBUTED" is on.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice find.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Found this while grepping for PY2 as part of for #35615 .

dreiss added 2 commits May 13, 2020 20:50
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan:
CI

Differential Revision: [D20842876](https://our.internmc.facebook.com/intern/diff/D20842876)
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@dreiss merged this pull request in 6d642a6.

@facebook-github-bot facebook-github-bot deleted the gh/dreiss/31/head branch May 18, 2020 14:16
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#35614

Python 2 has reached end-of-life and is no longer supported by PyTorch.
Now we can clean up a lot of cruft that we put in place to support it.
These changes were all done manually, and I skipped anything that seemed
like it would take more than a few seconds, so I think it makes sense to
review it manually as well.

Test Plan: CI

Differential Revision: D20842876

Pulled By: dreiss

fbshipit-source-id: 18abf0d324ed2185ec6d27c864e935d856dcc6ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants