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

Use use assertRegex instead of deprecated assertRegexpMatches #7496

Conversation

janvrany
Copy link
Contributor

My personal RISC-V CI jobs started failing recently due to jitbuilder's apigen tests
using assertRegexpMatches.

assertRegexpMatches has been deprecated in Python 3.2 and compatibility
alias was apparently removed in Python 3.12. Howeve, Debian Sid (which is
used on CI nodes) now only ships Python 3.12, so tests started failing.

This PR updates cppgentests.py to use assertRegex instead of
assertRegexpMatches.

This commit updates cppgentests.py to use assertRegex instead of
assertRegexpMatches which has been deprecated in Python 3.2 [1]
and removed in Python 3.12.

This caused failures on RISC-V since Debian port ships only
Python 3.12.7 (at the time of writing.

[1]: https://docs.python.org/release/3.11.0/library/unittest.html#unittest.TestCase.assertRegex
@mstoodle
Copy link
Contributor

Thanks for the work to fix this, @janvrany , but it's a dup of #7279 . I believe this PR is waiting on infrastructure work to make sure the right Python version is available everywhere

@mstoodle mstoodle closed this Oct 31, 2024
@janvrany janvrany deleted the pr/jitbuilder-fix-deprecated-method-in-apigen-tests branch November 1, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants