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

pyd type dependencies are not downloaded correctly #1400

Open
x-haose opened this issue Sep 28, 2024 · 0 comments
Open

pyd type dependencies are not downloaded correctly #1400

x-haose opened this issue Sep 28, 2024 · 0 comments

Comments

@x-haose
Copy link

x-haose commented Sep 28, 2024

Steps to Reproduce

pyd type dependency download is incorrect

Initialize the project

rye init rye_test
cd rye_test
rye pin 3.11
rye add pydantic
ls ./.venv/Lib/site-packages/pydantic_core/

This is displayed as correct:

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2024/9/28 18:05 4337 __init__.py
-a--- 2024/9/28 18:05 5031936 _pydantic_core.cp311-win_amd64.pyd
-a--- 2024/9/28 18:05 46790 _pydantic_core.pyi
-a--- 2024/9/28 18:05 145622 core_schema.py
-a--- 2024/9/28 18:05 0 py.typed

Switch version to 3.12

rye pin 3.12
rye sync -f
ls ./.venv/Lib/site-packages/pydantic_core/

It still shows cp311 at this time:

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2024/9/28 18:05 4337 __init__.py
-a--- 2024/9/28 18:05 5031936 _pydantic_core.cp311-win_amd64.pyd
-a--- 2024/9/28 18:05 46790 _pydantic_core.pyi
-a--- 2024/9/28 18:05 145622 core_schema.py
-a--- 2024/9/28 18:05 0 py.typed

View python-version content:

cat .\.python-version
3.12.3

Actual run to view the version:

PS E:\rye_test> .\.venv\Scripts\python.exe
Python 3.12.3 (main, Apr 15 2024, 17:48:16) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Switch version to 3.10

rye pin 3.10
rye sync -F
ls ./.venv/Lib/site-packages/pydantic_core/

The last version displayed is 3.11

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2024/9/28 18:05 4337 __init__.py
-a--- 2024/9/28 18:05 5031936 _pydantic_core.cp311-win_amd64.pyd
-a--- 2024/9/28 18:05 46790 _pydantic_core.pyi
-a--- 2024/9/28 18:05 145622 core_schema.py -a--- 2024/9/28 18:05 0 py.typed ````

### Expected Result

When using pin to switch versions, rye sync should download the package of the switched version instead of the package before the switch.

### Actual Result

Logs

### Version Info

rye 0.40.0
commit: 0.40.0 (a928cd53a 2024-09-22)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

### Stacktrace

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

No branches or pull requests

1 participant