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

Error importing from myproxy.client import MyProxyClient with Python=3.12 due to SafeConfigParser being completely retired #19

Closed
valeriupredoi opened this issue Nov 1, 2023 · 0 comments · Fixed by #20

Comments

@valeriupredoi
Copy link
Collaborator

Hi Phil, how's things? We're moving on to Python=3.12 and noticed an issue with pyesgf client that uses MyProxyClient, that buils down to an import issue:

from myproxy.client import MyProxyClient

spits out:

Traceback (most recent call last):
  File "/home/valeriu/ESMValCore/testimp.py", line 1, in <module>
    from myproxy.client import MyProxyClient
  File "/home/valeriu/miniconda3/envs/esmvaltool-fromlock/lib/python3.12/site-packages/myproxy/client/__init__.py", line 44, in <module>
    from myproxy.client.utils.openssl import OpenSSLConfig
  File "/home/valeriu/miniconda3/envs/esmvaltool-fromlock/lib/python3.12/site-packages/myproxy/client/utils/__init__.py", line 11, in <module>
    from six.moves.configparser import SafeConfigParser
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/home/valeriu/miniconda3/envs/esmvaltool-fromlock/lib/python3.12/configparser.py). Did you mean: 'RawConfigParser'?

I am using six=1.16 and myproxyclient=2.1.0. As far as I can see SafeConfigParse was renamed to ConfigParser many moons ago benjaminp/six#218 but only now it has been completely nuked https://docs.python.org/3/whatsnew/3.12.html - I can open a PR fix this here if you OK with that? Many thanks and cheers 🍺

EDIT: cheers to my bud @bouweandela - he spotted the new source for MyProxyClient, I initially opened philipkershaw#9 in good ole Phil's space, which I will now close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant