Skip to content

Fix deprecated unittest asserts in executorch #9960

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
Apr 10, 2025

Conversation

itamaro
Copy link
Contributor

@itamaro itamaro commented Apr 8, 2025

Differential Revision: D72616610

Copy link

pytorch-bot bot commented Apr 8, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9960

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit de41379 with merge base 3a940da (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 8, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72616610

Copy link

github-actions bot commented Apr 8, 2025

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Summary:
In Python 3.2+, a number of asserts were deprecated in the unittest module: https://docs.python.org/3/library/unittest.html#deprecated-aliases.

In Python 3.12, these asserts were deleted completely.
The files in this diff still use the deprecated asserts.

This codemod attempts to fix uses of the deprecated asserts, replacing them with non-deprecated equivalents. It is a naive codemod, using sed.

Reviewed By: yilei

Differential Revision: D72616610
@itamaro itamaro force-pushed the export-D72616610 branch from 6067172 to de41379 Compare April 9, 2025 20:04
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72616610

@facebook-github-bot facebook-github-bot merged commit 0bc52fe into pytorch:main Apr 10, 2025
14 of 17 checks passed
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
Differential Revision: D72616610

Pull Request resolved: #9960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants