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

Legacy Python2 and early Python3 leftovers #42919

Open
vadimkantorov opened this issue Aug 12, 2020 · 4 comments
Open

Legacy Python2 and early Python3 leftovers #42919

vadimkantorov opened this issue Aug 12, 2020 · 4 comments
Labels
better-engineering Relatively self-contained tasks for better engineering contributors OSS contribution wanted PR from open source contributors welcome to solve this issue. shadow review Request the triage shadow to take a second look at your triage and see if they agree or not triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@vadimkantorov
Copy link
Contributor

vadimkantorov commented Aug 12, 2020

  1. A lot of references to Python 2 and workarounds: https://github.com/pytorch/pytorch/blob/master/torch/tensor.py
  2. L631:
        if array.dtype == bool:
            # Workaround, torch has no built-in bool tensor
            array = array.astype('uint8')

But PyTorch has built-in bool tensor since a long while

cc @ezyang

@vadimkantorov
Copy link
Contributor Author

Are python-enum and python-six third_party dependencies still needed?

@vadimkantorov vadimkantorov changed the title Legacy workarounds in tensor.py Legacy Python2 and early Python3 leftovers Aug 21, 2020
@albanD albanD added better-engineering Relatively self-contained tasks for better engineering contributors OSS contribution wanted PR from open source contributors welcome to solve this issue. shadow review Request the triage shadow to take a second look at your triage and see if they agree or not triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Aug 21, 2020
@ezyang
Copy link
Contributor

ezyang commented Aug 24, 2020

These should all be doable. python-enum/python-six should be droppable, but it looks like it came from nnpack so we would to make sure they've gone Python 3 only, or at least it's an optional dependency.

@bugra bugra mentioned this issue Sep 24, 2020
facebook-github-bot pushed a commit that referenced this issue Dec 23, 2020
Summary:
This is basically a reborn version of #45254 .

Ref: #42919

Pull Request resolved: #48077

Reviewed By: ngimel

Differential Revision: D25687042

Pulled By: bugra

fbshipit-source-id: 05f20a6f3c5212f73d0b1505b493b720e6cf74e5
facebook-github-bot pushed a commit to pytorch/botorch that referenced this issue Feb 8, 2021
Summary:
See pytorch/pytorch#42919

Pull Request resolved: pytorch/pytorch#49785

Reviewed By: mruberry

Differential Revision: D25963833

Pulled By: bugra

fbshipit-source-id: 11c90d6b8d3f206c9d0a4d8621b773beb10c6ba2
facebook-github-bot pushed a commit to facebookresearch/ClassyVision that referenced this issue Feb 8, 2021
Summary:
See pytorch/pytorch#42919

Pull Request resolved: pytorch/pytorch#49785

Reviewed By: mruberry

Differential Revision: D25963833

Pulled By: bugra

fbshipit-source-id: 11c90d6b8d3f206c9d0a4d8621b773beb10c6ba2
facebook-github-bot pushed a commit that referenced this issue Feb 8, 2021
Summary:
See #42919

Pull Request resolved: #49785

Reviewed By: mruberry

Differential Revision: D25963833

Pulled By: bugra

fbshipit-source-id: 11c90d6b8d3f206c9d0a4d8621b773beb10c6ba2
facebook-github-bot pushed a commit that referenced this issue Mar 14, 2021
Summary:
See #42919

Pull Request resolved: #53349

Reviewed By: malfet

Differential Revision: D27039089

Pulled By: bugra

fbshipit-source-id: 8063dc184248604506a8dbb1bcb73da8ec85bb18
xsacha pushed a commit to xsacha/pytorch that referenced this issue Mar 31, 2021
Summary:
See pytorch#42919

Pull Request resolved: pytorch#49785

Reviewed By: mruberry

Differential Revision: D25963833

Pulled By: bugra

fbshipit-source-id: 11c90d6b8d3f206c9d0a4d8621b773beb10c6ba2
xsacha pushed a commit to xsacha/pytorch that referenced this issue Mar 31, 2021
Summary:
See pytorch#42919

Pull Request resolved: pytorch#53349

Reviewed By: malfet

Differential Revision: D27039089

Pulled By: bugra

fbshipit-source-id: 8063dc184248604506a8dbb1bcb73da8ec85bb18
@lithomas1
Copy link
Contributor

@ezyang It seems like a lot of legacy Python 2 code is in the caffe2 module. Are you still taking PRs for that section of the code even though it is deprecated?

@ezyang
Copy link
Contributor

ezyang commented Jan 6, 2022

No, it's not worth it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-engineering Relatively self-contained tasks for better engineering contributors OSS contribution wanted PR from open source contributors welcome to solve this issue. shadow review Request the triage shadow to take a second look at your triage and see if they agree or not triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants