Skip to content

fix bug checkProxy incompatible #12403

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
Jul 7, 2025

Conversation

Viphava280444
Copy link
Contributor

Fixes #12402

Status

ready

Description

Fixed SyntaxWarning in checkProxy.py by converting the regex pattern to use raw bytes string.

The issue was on line 132 where the pattern b'\d{1,3}[:/]\d{2}[:/]\d{2}' was generating a SyntaxWarning because \d is not a valid escape sequence in Python strings. Changed it to rb'\d{1,3}[:/]\d{2}[:/]\d{2}' to use a raw bytes string, which treats backslashes literally and preserves the intended regex pattern.

This eliminates the warning while maintaining identical functionality.

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

N/A - This is a standalone bug fix.

External dependencies / deployment changes

@dmwm-bot
Copy link

dmwm-bot commented Jul 4, 2025

Jenkins results:

  • Python3 Unit tests: failed
    • 2 new failures
    • 3 changes in unstable tests
  • Python3 Pylint check: failed
    • 3 warnings and errors that must be fixed
    • 24 comments to review
  • Pycodestyle check: succeeded
    • 4 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/WMCore-PR-Report/823/artifact/artifacts/PullRequestReport.html

@anpicci anpicci requested review from amaltaro and anpicci July 4, 2025 20:41
@anpicci
Copy link
Contributor

anpicci commented Jul 4, 2025

Hi @Viphava280444, I would let @amaltaro give a look at the failing tests, for the rest, everything looks fine to me. thanks!

@Viphava280444
Copy link
Contributor Author

Thank you so much @anpicci

Copy link
Contributor

@amaltaro amaltaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ohm, it looks good to me. Unit test failures are unrelated.

@amaltaro amaltaro merged commit f3d8e58 into dmwm:master Jul 7, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SyntaxWarning: invalid escape sequence in checkProxy.py
4 participants