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

Fix misc DeprecationWarnings #6188

Merged
merged 13 commits into from
Apr 30, 2024
Merged

Fix misc DeprecationWarnings #6188

merged 13 commits into from
Apr 30, 2024

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Apr 24, 2024

This extracts @nzlosh's DeprecationWarning fixes from #6157.

  • Fix for DeprecationWarning: the imp module is deprecated in favour of importlib

  • Fix for DeprecationWarning: This method will be removed in Python 3.12. Use 'parser.read_file()' instead.

  • Fix semver DeprecationWarning: Function semver.match is deprecated and other semver warnings

  • Fix semver patch strip function and replace deprecated self.assertItemsEqual with assert.

  • Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

  • Fixed more DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

  • Replace 'warn' with 'warning' method

  • Skip test_warn_on_bad_config_permissions when run as root user.

  • Skip test_get_cached_auth_token_invalid_permissions if run as root

  • Skip test_cache_auth_token_invalid_permissions if run as root

@cognifloyd cognifloyd added this to the 3.9.0 milestone Apr 24, 2024
@cognifloyd cognifloyd self-assigned this Apr 24, 2024
@cognifloyd cognifloyd requested review from amanda11, nzlosh, winem and a team April 24, 2024 14:07
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Apr 24, 2024
@cognifloyd
Copy link
Member Author

cognifloyd commented Apr 25, 2024

Dropped the log warn/warning change for now. That can go in a dedicated PR to figure out why the st2client token tests were failing.

I found the commit I missed cherry-picking, so I re-added the logger.warning deprecation fixes.

@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines. Requires some effort to review. and removed size/M PR that changes 30-99 lines. Good size to review. labels Apr 25, 2024
@cognifloyd cognifloyd requested review from mamercad and a team April 25, 2024 23:48
@cognifloyd
Copy link
Member Author

rebased on master

@cognifloyd cognifloyd merged commit 7c335b3 into master Apr 30, 2024
29 checks passed
@cognifloyd cognifloyd deleted the fix_deprecation_warnings branch April 30, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maintenance size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants