-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use UV as a faster pip implementation #2556
Open
Arusekk
wants to merge
1
commit into
Gallopsled:dev
Choose a base branch
from
Arusekk:uv
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Okay: for some reason this breaks PLT emulation (so unicorn?), breaks it consistently, and only breaks it on py3.10. Why? No idea yet. |
>>> import unicorn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.venv/lib/python3.10/site-packages/unicorn/__init__.py", line 4, in <module>
from .unicorn import Uc, ucsubclass, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__
File "/.venv/lib/python3.10/site-packages/unicorn/unicorn.py", line 14, in <module>
from .unicorn_py3 import *
File "/.venv/lib/python3.10/site-packages/unicorn/unicorn_py3/__init__.py", line 1, in <module>
from .unicorn import *
File "/.venv/lib/python3.10/site-packages/unicorn/unicorn_py3/unicorn.py", line 236, in <module>
uclib = __load_uc_lib()
File "/.venv/lib/python3.10/site-packages/unicorn/unicorn_py3/unicorn.py", line 123, in __load_uc_lib
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources' |
Arusekk
added a commit
to Arusekk/unicorn
that referenced
this pull request
Mar 3, 2025
Previous logic required old setuptools on py3.8 up to py3.11. So if new setuptools was installed, importing unicorn always failed with ImportError on these Python versions. It now tries to use old setuptools on py3.8, but falls back gracefully to not using anything. So it works on py3.9+ fully, and on py3.8 it also works but with more limited path discovery (I think it is enough, since no one complained yet). Fixes: 0c34496 ("Modify canonicals import") Ref: unicorn-engine@0c34496 Ref: Gallopsled/pwntools#2556
Okay, this is a thing probably on Unicorn's side: unicorn-engine/unicorn#2122 |
Huh? // Resolve the seed packages.
let requirements = if interpreter.python_tuple() >= (3, 12) {
vec![Requirement::from(
uv_pep508::Requirement::from_str("pip").unwrap(),
)]
} else {
// Include `setuptools` and `wheel` on Python <3.12.
vec![
Requirement::from(uv_pep508::Requirement::from_str("pip").unwrap()),
Requirement::from(uv_pep508::Requirement::from_str("setuptools").unwrap()),
Requirement::from(uv_pep508::Requirement::from_str("wheel").unwrap()),
]
}; It seems venv does seed itself, but not venv-less things. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2490