Skip to content

Conversation

annagav
Copy link
Contributor

@annagav annagav commented Feb 24, 2025

What are the relevant tickets?

Related to https://github.com/mitodl/hq/issues/5951

Description (What does it do?)

Upgrade python to 3.12
uwsgi

How can this be tested?

Nothing should break

@annagav annagav changed the title Ag/upgrade python Upgrade python to 3.12 Feb 24, 2025
@cp-at-mit cp-at-mit self-assigned this Feb 25, 2025
@jkachel
Copy link
Contributor

jkachel commented Feb 27, 2025

FWIW, I opened an issue in the upstream CyberSource repo for the SyntaxWarning issue we discussed: CyberSource/cybersource-rest-client-python#143

I also figured out a workaround. You can use the warnings module to filter out SyntaxWarning when importing the payment_gateway library (or this can be migrated up to ol-django - that might be easier since less imports to deal with). This would obvs be temporary but it would make it work for the short term:

import warnings

with warnings.catch_warnings():
	warnings.filterwarnings("ignore", category=SyntaxWarning)
	from CyberSource import ApiClient, OrdersApi

(this will need updates for the actual imports and such)

I tested this in a test app I did up (see the issue) and this was sufficient to make pytest stop failing.

@annagav annagav force-pushed the ag/upgrade_python branch from 62ab5b0 to ba24588 Compare March 18, 2025 18:13
@pdpinch
Copy link
Member

pdpinch commented Mar 24, 2025

Need some help from @rhysyngsun on a hypothesis test error

@rhysyngsun
Copy link
Collaborator

I poked at this for about an hour. An upgrade to celery-redbeat is needed too because I can't build the docker container without doing that first. It's probably a good day or so to dig into what changed with hypothesis as it's several major version upgrades all at once.

I'd suggest instead holding off on this until we finish switching over to keycloak at which point we'll just be removing the failing code here anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants