Skip to content
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

Support for Python 3.12 #406

Merged
merged 15 commits into from
Jul 11, 2024
Merged

Support for Python 3.12 #406

merged 15 commits into from
Jul 11, 2024

Conversation

dmichaels-harvard
Copy link
Collaborator

No description provided.

Copy link
Member

@willronchetti willronchetti left a comment

Choose a reason for hiding this comment

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

Alex V should deploy/test this out before merging

@@ -143,3 +143,34 @@ jobs:
- name: QA (unit)
run: |
poetry run invoke test --no-flake

build_3_12:
Copy link
Member

Choose a reason for hiding this comment

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

I've just realized this build is not defined correctly - you can re-use all the below by using the matrix syntax, see https://github.com/4dn-dcic/utils/blob/master/.github/workflows/main.yml#L24-L26 as an example

@alexander-veit alexander-veit self-requested a review July 9, 2024 19:13
@alexander-veit
Copy link
Member

alexander-veit commented Jul 9, 2024

I am getting SyntaxWarnings at various places when using Python 3.12, e.g.,

/home/ubuntu/GitHub/tibanna/tibanna/awsem.py:396: SyntaxWarning: invalid escape sequence '\.'
  filename = re.match('(.+)\.{0}$'.format(unzip), filename).group(1)

This is exptected with Python 3.12: https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes
I think we need to use raw strings instead.

Copy link
Member

@alexander-veit alexander-veit left a comment

Choose a reason for hiding this comment

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

I deployed it and ran a test workflow and everything seems to work for Python 3.12. I would just modify the regex expressions to avoid the syntax warnings, e.g., replace

filename = re.match('(.+)\.{0}$'.format(unzip), filename).group(1)

with

filename = re.match(r'(.+)\.{0}$'.format(unzip), filename).group(1)

@dmichaels-harvard dmichaels-harvard merged commit e27ca07 into master Jul 11, 2024
5 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.

3 participants