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

3.43.0 fails on python 3.12.x with invalid escape sequence errors #787

Closed

Conversation

gerstle
Copy link

@gerstle gerstle commented Jun 6, 2024

Attempts to fixes #785 by utilizing raw strings.

Initial issue:

  1. brew install oci-cli
❯ oci --version
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/cli_util.py:1125: SyntaxWarning: invalid escape sequence '\['
  list_type = {'module': complex_type_definition['module'], 'class': re.match('list\[(.*)\]', complex_type_definition['class']).group(1)}  # noqa: W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/cli_util.py:2335: SyntaxWarning: invalid escape sequence '\s'
  json_page_matcher = re.compile("(^\s*\[)([\s\S]*?)(}\s*\]$)")  # noqa: W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/cli_util.py:2386: SyntaxWarning: invalid escape sequence '\s'
  json_page_matcher = re.compile("(^[\s\S]*\[\s)([\s\S]*?)(}\s*\]\s*}$)")  # noqa: W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/cli_util.py:2427: SyntaxWarning: invalid escape sequence '\`'
  'with double escape character \`.\ne.g. --query data[*].\`"display-name\`"',  # noqa: E127, W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/json_skeleton_utils.py:252: SyntaxWarning: invalid escape sequence '\['
  sub_kls = re.match('list\[(.*)\]', cls).group(1)  # noqa: W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/json_skeleton_utils.py:269: SyntaxWarning: invalid escape sequence '\('
  key_sub_kls = re.match('dict\(([^,]*), (.*)\)', cls).group(1)    # noqa: W605
/opt/homebrew/Cellar/oci-cli/3.43.0/libexec/lib/python3.12/site-packages/oci_cli/json_skeleton_utils.py:270: SyntaxWarning: invalid escape sequence '\('
  value_sub_kls = re.match('dict\(([^,]*), (.*)\)', cls).group(2)  # noqa: W605
3.43.0

After modifications here:

❯ oci --version
3.43.0

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

  • PR author: gerstle

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jun 6, 2024
@gerstle
Copy link
Author

gerstle commented Jun 27, 2024

Also fails on 3.44.0

@stephanuzzell
Copy link

Seems still broken in 3.47.0

@karthik-k-kamath
Copy link
Member

Hi all, OCI CLI only supports till Python 3.11.
The support for Python 3.12 is planned in a couple of months, till them kindly use 3.11 or lower.
Thanks!

@stephanuzzell
Copy link

❯ brew remove [email protected]
Error: Refusing to uninstall /opt/homebrew/Cellar/[email protected]/3.12.5
because it is required by oci-cli, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.43.0 fails on python 3.12.x with invalid escape sequence errors
3 participants