FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(plc4py/umas): resolve Python 3.12+ SyntaxWarnings in UmasTag by Abdylreshit · Pull Request #2535 · apache/plc4x · GitHub

/ plc4x Public

fix(plc4py/umas): resolve Python 3.12+ SyntaxWarnings in UmasTag - #2535

Closed
Abdylreshit wants to merge 1 commit into
apache:developfrom
Abdylreshit:fix/umas-tag-syntax-warnings
Closed

fix(plc4py/umas): resolve Python 3.12+ SyntaxWarnings in UmasTag#2535
Abdylreshit wants to merge 1 commit into
apache:developfrom
Abdylreshit:fix/umas-tag-syntax-warnings

Conversation

Copy link
Copy Markdown

Summary

Fixes three SyntaxWarning messages emitted by Python 3.12+ in plc4py/drivers/umas/UmasTag.py:

  1. Invalid escape sequence \[ in the regex _ADDRESS_PATTERN — converted the string literal to a raw string.
  2. Two occurrences of len(...) is not 0 — replaced with != 0. Comparing int with is/is not is unreliable (works only by CPython small-int caching) and the behavior is deprecated.

Test plan

  • pytest passes (77 passed, 36 xfailed — same as before, now with 0 warnings)
  • No behavioral changes — both fixes are semantics-preserving

- Use raw string for regex pattern (fixes invalid escape sequence '\[')
- Replace 'is not 0' with '!= 0' for int comparison

Copy link
Copy Markdown
Contributor

Any of the python folks able and willing to have a look? @ottlukas @hutcheb ?

sruehl requested review from hutcheb and ottlukas July 9, 2026 05:15

ottlukas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is a minor regex and syntax change. FIne for me. Thanks for catching :-)

sruehl closed this Aug 27, 2026
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL