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

Asdf Auto Reshim #1887

Open
nizarakbarm opened this issue Feb 5, 2025 · 5 comments
Open

Asdf Auto Reshim #1887

nizarakbarm opened this issue Feb 5, 2025 · 5 comments

Comments

@nizarakbarm
Copy link

How can we improve the documentation?

Some plugin like python if installed in asdf 0.15.0 usually can do auto reshiming after pip install. But in asdf 0.16.0, there is no auto rhesim again after installing package using pip install.

If there is a change of mechanism for this, can it added to the documentation?

@Stratus3D
Copy link
Member

Hi @nizarakbarm , can you provide more information on this? How does the Python plugin perform auto reshimming? What callback/hook is used to trigger it?

I'm not aware of any changes in 0.16.x that would affect any auto reshimming features.

@nizarakbarm
Copy link
Author

Hi @Stratus3D, sorry for the late reply, this is the example of asdf 0.15.0:

[nizarakb@kronos ~]$ asdf --version
v0.15.0-31e8c93
[nizarakb@kronos ~]$ python --version
Python 3.13.2
[nizarakb@kronos ~]$ pip --version
pip 25.0 from /home/nizarakb/.asdf/installs/python/3.13.2t/lib/python3.13t/site-packages/pip (python 3.13)
[nizarakb@kronos ~]$ pip install django
Collecting django
  Using cached Django-5.1.6-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: asgiref<4,>=3.8.1 in ./.asdf/installs/python/3.13.2t/lib/python3.13t/site-packages (from django) (3.8.1)
Requirement already satisfied: sqlparse>=0.3.1 in ./.asdf/installs/python/3.13.2t/lib/python3.13t/site-packages (from django) (0.5.3)
Using cached Django-5.1.6-py3-none-any.whl (8.3 MB)
Installing collected packages: django
Successfully installed django-5.1.6
Reshimming asdf python...
[nizarakb@kronos ~]$ ls -la .asdf/shims/
total 88
drwxrwxr-x  2 nizarakb nizarakb 4096 Feb  6 16:19 .
drwxrwxr-x 16 nizarakb nizarakb 4096 Feb  6 16:16 ..
-rwxrwxr-x  1 nizarakb nizarakb  133 Feb  6 16:20 django-admin

this is the example of asdf 0.15.0:

[nizarakb@kronos ~]$ asdf --version
asdf version v0.16.1
[nizarakb@kronos ~]$ asdf plugin list
python
[nizarakb@kronos ~]$ python --version
Python 3.13.2
[nizarakb@kronos ~]$ pip install --upgrade pip
Requirement already satisfied: pip in ./.asdf/installs/python/3.13.2/lib/python3.13/site-packages (24.3.1)
Collecting pip
  Using cached pip-25.0-py3-none-any.whl.metadata (3.7 kB)
Using cached pip-25.0-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.3.1
    Uninstalling pip-24.3.1:
      Successfully uninstalled pip-24.3.1
Successfully installed pip-25.0
[nizarakb@kronos ~]$ pip install django
Collecting django
  Using cached Django-5.1.6-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: asgiref<4,>=3.8.1 in ./.asdf/installs/python/3.13.2/lib/python3.13/site-packages (from django) (3.8.1)
Requirement already satisfied: sqlparse>=0.3.1 in ./.asdf/installs/python/3.13.2/lib/python3.13/site-packages (from django) (0.5.3)
Using cached Django-5.1.6-py3-none-any.whl (8.3 MB)
Installing collected packages: django
Successfully installed django-5.1.6
[nizarakb@kronos ~]$ ls .adsf/^C  
[nizarakb@kronos ~]$ ls .asdf
.asdf/             .asdf completions/ 
[nizarakb@kronos ~]$ ls .asdf/shims/
idle  idle3  idle3.13  pip  pip3  pip3.13  pydoc  pydoc3  pydoc3.13  python  python-config  python3  python3-config  python3.13  python3.13-config  python3.13-gdb.py
[nizarakb@kronos ~]$ ls .asdf/shims/
idle  idle3  idle3.13  pip  pip3  pip3.13  pydoc  pydoc3  pydoc3.13  python  python-config  python3  python3-config  python3.13  python3.13-config  python3.13-gdb.py

I also didn't know where the reshimming is processed but in 0.15.0 always has reshimming everytime installing using package manager like pip.

@nizarakbarm
Copy link
Author

Oh i just found out the reshimming was ran by the pip itself in 0.15.0, i will try to check in 0.16.0 again.

@nizarakbarm
Copy link
Author

The reason reshimming didn't work because when installing python using asdf install, the pip which include reshimming in https://github.com/asdf-community/asdf-python/tree/master/shims was not downloaded.

@nizarakbarm
Copy link
Author

Ah, it is related to syscall.Exec.

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

No branches or pull requests

2 participants