latchset / jwcrypto

Implements JWK,JWS,JWE specifications using python-cryptography
GNU Lesser General Public License v3.0
439 stars 118 forks source link

ValueError: wrapper has not been initialized in jwcrypto Library #338

Closed david-homelend closed 10 months ago

david-homelend commented 10 months ago

Issue Title:

ValueError: wrapper has not been initialized in jwcrypto Library (Python 3.12, jwcrypto 1.51, macOS)

Description:

I am encountering an issue with the jwcrypto library in my Python 3.12 project on macOS. The error message ValueError: wrapper has not been initialized is being raised during the initialization of a Python debugging tool.

Environment:

Steps to Reproduce:

  1. Start the Python debugging tool on pycharm.
  2. Observe the error ValueError: wrapper has not been initialized during tool initialization.

stacktrace

  File "/venv/lib/python3.12/site-packages/jwcrypto/jwk.py", line 301, in <module>
    class JWK(dict):
  File "/venv/lib/python3.12/site-packages/jwcrypto/jwk.py", line 769, in JWK
    @deprecated
     ^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/deprecated/classic.py", line 276, in deprecated
    @wrapt.decorator(adapter=adapter)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/wrapt/decorators.py", line 427, in decorator
    return _build(wrapper, _wrapper, adapter=decorator)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/wrapt/decorators.py", line 239, in _build
    return AdapterWrapper(wrapped=wrapped, wrapper=wrapper,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_pydevd_bundle/pydevd_pep_669_tracing_cython.pyx", line 504, in _pydevd_bundle.pydevd_pep_669_tracing_cython.PyRaiseCallback.__call__
  File "_pydevd_bundle/pydevd_pep_669_tracing_cython.pyx", line 47, in _pydevd_bundle.pydevd_pep_669_tracing_cython.PEP669CallbackBase.frame
ValueError: wrapper has not been initialized