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
I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
Steps to reproduce
Upgrade to Python 3.11.5 and use it as PDM interpreter
Run any PDM command that accesses the internet
Actual behavior
short:
/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/cli/actions.py:318: RuntimeWarning: Failed to get latest version: Can't connect to HTTPS URL because the SSL module is not available. warnings.warn(f"Failed to get latest version: {e}", RuntimeWarning, stacklevel=1)
verbose:
➜ ~ pdm search -v ssl
Project is not found, fallback to the global project
Project is not found, fallback to the global project
Project is not found, fallback to the global project
Traceback (most recent call last):
File "/home/kali/.local/bin/pdm", line 8, in<module>sys.exit(main())
^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/core.py", line 290, in main
returnCore().main(args or sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/core.py", line 208, in main
raise cast(Exception, err).with_traceback(traceback) from None
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/core.py", line 203, in main
self.handle(project, options)
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/core.py", line 157, in handle
command.handle(project, options)
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/cli/commands/search.py", line 63, in handle
result = project.get_repository().search(options.query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/models/repositories.py", line 415, in search
resp = session.get(search_url, params={"q": query})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/cachecontrol/adapter.py", line 76, in send
resp = super().send(request, stream, timeout, verify, cert, proxies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 769, in urlopen
conn = self._get_conn(timeout=pool_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 295, in _get_conn return conn or self._new_conn()
^^^^^^^^^^^^^^^^
File "/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1056, in _new_conn
raise ImportError(
ImportError: Can't connect to HTTPS URL because the SSL module is not available.
repl:
➜ ~ /home/kali/.local/share/pdm/venv/bin/python
Python 3.11.4 (main, Jun 7 2023, 10:13:09) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/usr/lib/python3.11/ssl.py", line 100, in<module>
import _ssl # if we can't import it, let the error propagate
^^^^^^^^^^^
ImportError: /usr/lib/python3.11/lib-dynload/_ssl.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyModule_Add
>>> quit()
# Paste the output of `pdm info && pdm info --env` below:
➜ ~ pdm info && pdm info --env
Project is not found, fallback to the global project
Project is not found, fallback to the global project
Project is not found, fallback to the global project
PDM version:
2.9.2
Python Interpreter:
/usr/bin/python3 (3.11)
Project Root:
/home/kali/.config/pdm/global-project
Local Packages:
/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/cli/actions.py:318: RuntimeWarning: Failed to get latest version: Can't connect to HTTPS URL because the SSL module is not available. warnings.warn(f"Failed to get latest version: {e}", RuntimeWarning, stacklevel=1)Project is not found, fallback to the global projectProject is not found, fallback to the global projectProject is not found, fallback to the global project{ "implementation_name": "cpython", "implementation_version": "3.11.5", "os_name": "posix", "platform_machine": "x86_64", "platform_release": "6.5.0-kali1-amd64", "platform_system": "Linux", "platform_version": "#1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1kali1 (2023-09-19)", "python_full_version": "3.11.5", "platform_python_implementation": "CPython", "python_version": "3.11", "sys_platform": "linux"}/home/kali/.local/share/pdm/venv/lib/python3.11/site-packages/pdm/cli/actions.py:318: RuntimeWarning: Failed to get latest version: Can't connect to HTTPS URL because the SSL module is not available.
warnings.warn(f"Failed to get latest version: {e}", RuntimeWarning, stacklevel=1)
The text was updated successfully, but these errors were encountered:
This has little to do with PDM. Confirm the following:
Can you use ssl module in the host interpreter Python 3.11.5?
Can you use ssl module in a virtualenv python created with Python 3.11.5? You can create one with virtualenv --python /usr/bin/python3, install the tool if not existing.
Uh oh!
There was an error while loading. Please reload this page.
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
Actual behavior
short:
verbose:
repl:
Expected behavior
PDM correctly imports the ssl module.
See the issue here where Poetry has to be updated:
python/cpython#108525
Environment Information
The text was updated successfully, but these errors were encountered: