Skip to content

Conversation

@MrSerth
Copy link
Contributor

@MrSerth MrSerth commented Apr 19, 2024

Description of the change

This PR changes two additional occurrences of RegEx character classes to work with upcoming Python versions

Benefits

The existing code continues to work with Python 3.12+. Otherwise, the following error is returned:

/sbin/my_init:25: SyntaxWarning: invalid escape sequence '\W'
  SHENV_NAME_WHITELIST_REGEX = re.compile('\W')
/sbin/my_init:96: SyntaxWarning: invalid escape sequence '\Z'
  value = re.sub('\n\Z', '', f.read())

Possible drawbacks

None, backward compatible change.

Applicable issues

None

Additional information

None

@samip5 samip5 merged commit c17acec into phusion:master Apr 19, 2024
@MrSerth MrSerth deleted the python-regex branch April 20, 2024 09:48
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