Skip to content

Use \d#6423

Open
jburel wants to merge 2 commits into
ome:developfrom
jburel:parse_version
Open

Use \d#6423
jburel wants to merge 2 commits into
ome:developfrom
jburel:parse_version

Conversation

@jburel

@jburel jburel commented Mar 13, 2025

Copy link
Copy Markdown
Member

Upgrading the GitHub action to run on Ubuntu 24.04 with Python 3.12 to synchronize the documentation from various repositories has led to some failures
See https://github.com/ome/omero-documentation/actions/runs/13825561909

This is the first part of the puzzle.
Changes are required in other repositories e.g. omeroweb-install and ansible

@joshmoore

Copy link
Copy Markdown
Member

Interesting. What changed to make this start failing, @jburel ?

@jburel

jburel commented Mar 13, 2025

Copy link
Copy Markdown
Member Author
documentation/OMERO.server/components/antlib/scripts/parse_version:76: SyntaxWarning: invalid escape sequence '\d'   "(?P<STRIP>([-]DEV)?-\d+-[a-f0-9]+?(-dirty)?)" /home/runner/work/omero-documentation/OMERO.server/components/antlib/scripts/parse_version:118: SyntaxWarning: invalid escape sequence '\d'   m = re.match("^([^\d]*\d+[.]\d+[.])(\d+)-SNAPSHOT$", omero_version) 5.6.14-ice36-SNAPSHOT). Use forcedeliver or update.

This is due to the fact that we are running with 3.12

@joshmoore

Copy link
Copy Markdown
Member

This is due to the fact that we are running with 3.12

Gotcha.

@sbesson sbesson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This matches the language changes announced in https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes

I would suggest we follow the official recommendation and use raw strings for regular expressions

@sbesson sbesson closed this Jun 17, 2025
@sbesson sbesson reopened this Jun 17, 2025
See gh-67 for the discussion.
"""
m = re.match((
re.compile()

@sbesson sbesson Jun 17, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be reverted?

Suggested change
re.compile()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jburel converted my comment into a suggestion

@sbesson sbesson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

3 participants