t.py poetry run ty check Expected: no error. Result: WARN ty is pre-release software an...">

ty does not find nacl.public with poetry and python 3.13 (original) (raw)

Summary

Steps to reproduces (needs python 3.13):

poetry init
poetry add pynacl ty
echo "import nacl.public" > t.py
poetry run ty check

Expected: no error.

Result:

WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
Checking ------------------------------------------------------------ 1/1 files                         
error[unresolved-import]: Cannot resolve imported module `nacl.public`
 --> t.py:1:8
  |
1 | import nacl.public
  |        ^^^^^^^^^^^
  |
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

The error does not happen with Python 3.12, nor if using uv to manage the project (either with Python 3.12 or 3.13).

Version

ty 0.0.1-alpha.18

Poetry (version 2.1.4)