Update assertRaisesRegex pattern for Python 3.12 compatibility#17396
Open
drinkmorewaterr wants to merge 1 commit intopytorch:mainfrom
Open
Update assertRaisesRegex pattern for Python 3.12 compatibility#17396drinkmorewaterr wants to merge 1 commit intopytorch:mainfrom
drinkmorewaterr wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17396
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 4ff0898 with merge base 429925d ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
@drinkmorewaterr has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92997414. |
JacobSzwejbka
requested changes
Feb 11, 2026
| with self.assertRaisesRegex( | ||
| AttributeError, | ||
| "can't set attribute 'spec'", | ||
| "(can't set attribute|has no setter)", |
Contributor
There was a problem hiding this comment.
I believe we still test earlier python versions in oss (or we should be if not) can you make the regex pass on either string
Author
|
@pytorchbot label "release notes: Update test for py3.12 compat" |
|
Didn't find following labels among repository labels: release notes: Update test for py3.12 compat |
Author
|
@pytorchbot label "release notes: none" |
…ch#17396) Summary: Python 3.12 changed the error message for read-only property assignment from "can't set attribute 'spec'" to "property 'spec' of ... object has no setter". Update the regex pattern to match both versions. Differential Revision: D92997414
58525fd to
4ff0898
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Python 3.12 changed the error message for read-only property assignment from "can't set attribute 'spec'" to "property 'spec' of ... object has no setter". Update the regex pattern to match both versions.
Differential Revision: D92997414