[BE] Apply pep604 to torch/_dynamo#175555
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/175555
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 80d7f51 with merge base 85cf583 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
20eb655 to
37a3d65
Compare
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Since python>=3.10 is defined in the pyproject.toml, we can enable [pep604](https://peps.python.org/pep-0604/) (in python >=3.10) Why? * Fewer imports making code simpler * Standardization - prior to this change, we could have Optional or the | None intermixed in the codebase * Future proof for direction of python type system We apply this to `torch/_functorch` in this PR See #175555 for another application Pull Request resolved: #175659 Approved by: https://github.com/aorenste
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
508a03a to
80d7f51
Compare
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (default, 6, 6, linux.rocm.gpu.gfx950.1) Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge -I |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchmergebot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: trunk / linux-jammy-rocm-py3.10 / test (default, 6, 6, linux.rocm.gpu.gfx950.1) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (distributed, 1, 3, linux.rocm.gpu.gfx950.4) Details for Dev Infra teamRaised by workflow job |
|
@pytorchmergebot merge -i |
Merge startedYour change will be merged while ignoring the following 2 checks: trunk / linux-jammy-rocm-py3.10 / test (default, 6, 6, linux.rocm.gpu.gfx950.1), trunk / linux-jammy-rocm-py3.10 / test (distributed, 1, 3, linux.rocm.gpu.gfx950.4) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: Since python>=3.10 is defined in the pyproject.toml, we can enable [pep604](https://peps.python.org/pep-0604/) (in python >=3.10) Why? 1) Fewer imports making code simpler 2) Standardization - prior to this change, we could have `Optional` or the `| None` intermixed in the codebase 3) Future proof for direction of python type system X-link: pytorch/pytorch#175555 Approved by: https://github.com/aorenste, https://github.com/zou3519 Reviewed By: jeanschmidt Differential Revision: D94811748 fbshipit-source-id: ca8ca84d7872b78f3d27e60d7fb8402eeb5c6c54
Since python>=3.10 is defined in the pyproject.toml, we can enable [pep604](https://peps.python.org/pep-0604/) (in python >=3.10) Why? * Fewer imports making code simpler * Standardization - prior to this change, we could have Optional or the | None intermixed in the codebase * Future proof for direction of python type system We apply this to `torch/_functorch` in this PR See pytorch#175555 for another application Pull Request resolved: pytorch#175659 Approved by: https://github.com/aorenste
Since python>=3.10 is defined in the pyproject.toml, we can enable [pep604](https://peps.python.org/pep-0604/) (in python >=3.10) Why? 1) Fewer imports making code simpler 2) Standardization - prior to this change, we could have `Optional` or the `| None` intermixed in the codebase 3) Future proof for direction of python type system Pull Request resolved: pytorch#175555 Approved by: https://github.com/aorenste, https://github.com/zou3519
…orch#175676)" This reverts commit fa1ac62. Reverted pytorch#175676 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see [D94699653](https://www.internalfb.com/diff/D94699653) ([comment](pytorch#175676 (comment)))
This reverts commit 2958025. Reverted pytorch#175765 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94699609 ([comment](pytorch#175765 (comment)))
pytorch#174751)" This reverts commit 1b9046a. Reverted pytorch#174751 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94699526 ([comment](pytorch#174933 (comment)))
)" This reverts commit ba59c42. Reverted pytorch#174933 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94699526 ([comment](pytorch#174933 (comment)))
…h/_* (pytorch#175870)" This reverts commit 4802e2a. Reverted pytorch#175870 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94699362 ([comment](pytorch#175870 (comment)))
This reverts commit 45c625b. Reverted pytorch#175510 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94598146 ([comment](pytorch#175510 (comment)))
This reverts commit 205e399. Reverted pytorch#175555 on behalf of https://github.com/jeanschmidt due to see D94598146 ([comment](pytorch#175555 (comment)))
Since python>=3.10 is defined in the pyproject.toml, we can enable [pep604](https://peps.python.org/pep-0604/) (in python >=3.10) Why? 1) Fewer imports making code simpler 2) Standardization - prior to this change, we could have `Optional` or the `| None` intermixed in the codebase 3) Future proof for direction of python type system Pull Request resolved: pytorch#175555 Approved by: https://github.com/aorenste, https://github.com/zou3519
Since python>=3.10 is defined in the pyproject.toml, we can enable pep604 (in python >=3.10)
Why?
Optionalor the| Noneintermixed in the codebasecc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @xmfan @aditvenk