You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @pabs3, what python version and what command did you run to test the oci-python-sdk? I tried to reproduce it on my end but I was not able to see the warning.
This is with Python 3.10.1-5 from Debian 12 (bookworm).
I discovered it when packaging oci-python-sdk and oci-cli for Debian
on behalf of my employer, who only use software in Debian packages.
I believe this is a new warning in Python 3.10 and later.
The command being run was this:
python3.10 -m pytest tests
The warnings should show up whenever importing oci.base_client though.
The solution is very simple, just turn all strings that contain
a regex into raw strings by prefixing them with an r character:
Convert this:
DICT_VALUE_TYPE_REGEX = re.compile('dict\(str, (.+?)\)$')
To this:
DICT_VALUE_TYPE_REGEX = re.compile(r'dict\(str, (.+?)\)$')
@pabs3, the latest SDK should now have this issue fixed. Please feel free to re-open the issue if another problem comes up. Thank you for contributing to OCI Python SDK.
When running the tests I get a few
DeprecationWarning
messages:Since these are regexes the right thing to do use to use raw strings like this:
The text was updated successfully, but these errors were encountered: