Skip to content

Fix invalid escape sequences in Python files#1588

Open
tuhaihe wants to merge 1 commit intoapache:mainfrom
tuhaihe:fix-syntax-warning-ubuntu2404
Open

Fix invalid escape sequences in Python files#1588
tuhaihe wants to merge 1 commit intoapache:mainfrom
tuhaihe:fix-syntax-warning-ubuntu2404

Conversation

@tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Mar 2, 2026

Fix SyntaxWarning caused by invalid escape sequences in mainUtils.py and logfilter.py. These warnings appear on Python 3.12+ (e.g., Ubuntu 24.04) and will become SyntaxError in Python 3.14.

Changes:

  • mainUtils.py: Use raw strings for shell commands containing '$'
  • logfilter.py: Use raw docstrings for functions containing regex examples

See: #1587

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


Fix SyntaxWarning caused by invalid escape sequences in mainUtils.py
and logfilter.py. These warnings appear on Python 3.12+ (e.g., Ubuntu
24.04) and will become SyntaxError in Python 3.14.

Changes:
- mainUtils.py: Use raw strings for shell commands containing '\$'
- logfilter.py: Use raw docstrings for functions containing regex examples

See: apache#1587
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.

2 participants