simon-weber/gpsoauth

AttributeError: module 'urllib3.util.ssl_' has no attribute 'OP_NO_TICKET'

bergercookie opened this issue · 1 comments

I'm trying to run the latest version of gpsoath to see if I can get around this issue with gkeepapi. After explicitly upgrading to the latest gpsoauth version I'm getting the following error:

  File "/home/berger/.cache/pypoetry/virtualenvs/taskwarrior-syncall-mK6ZpwPC-py3.8/lib/python3.8/site-packages/gpsoauth/__init__.py", line 70, in init_poolmanager
    context.options &= ~ssl_.OP_NO_TICKET
    │       │           └ <module 'urllib3.util.ssl_' from '/home/berger/.cache/pypoetry/virtualenvs/taskwarrior-syncall-mK6ZpwPC-py3.8/lib/python3.8/s...
    │       └ <property object at 0x7f91b5d84680>
    └ <gpsoauth.SSLContext object at 0x7f91b0d901c0>

AttributeError: module 'urllib3.util.ssl_' has no attribute 'OP_NO_TICKET'

Explicitly upgrading urllib3 from 1.25.11 to 1.26.9 inside my virtualenv seems to solve it. My guess is that you should be bumping the requests version here to a more recent one.

Good find!

It looks like urllib3 wrapped the built in ssl flag for python <3.6 compat (here). Since we're not supporting 3.6 we should be good to use it directly.