-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Deprecation: non-bare project name in URL/VCS egg=
fragments
#13157
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
Comments
Hmm, editable VCS installs don't support the direct URL syntax. This means the egg fragment is the only supported way to request an extra for VCS URLs. We'd need to revive #9471 before raising an error. It's probably best to punt this to a later release. |
I think uv already supports the syntax |
I use requirements.txt If I add add optional dependency in egg, it complains about wrong syntax, but allows me to install the requirements.txt If I add add optional dependency as a prefix, it works just fine. No complains. pip version: 25.0.1 |
egg=
fragments
egg=
fragmentsegg=
fragments
Uh oh!
There was an error while loading. Please reload this page.
Last updated on April 26, 2025.
What's being deprecated
Hello! If you've received this deprecation warning, you are using an unsupported
egg=<pkg>
URL fragment. The most likely cause is having a version specifier (e.g.,#egg=mypackage>=2.0.0
) or an extra specifier (e.g.,#egg=mypackage[full]
).What should I do?
The
#egg=<pkg>
fragment is a legacy feature inherited from setuptools. It was not meant to include anything but a valid project name (as per the formal rules for distributions names).If there is a version specifier, pip has not and will not honor it, instead choosing to install whatever is served by the URL even if the version is not allowed. Extras were an accepted extension to the
#egg=<pkg>
fragment syntax (when there wasn't any replacement syntax available), but now there is standard syntax for URL references.You are strongly encouraged to switch to the Direct URL syntax which allows for the project name to stated in a standard way. Alternatively, you may also simply drop the
#egg=<pkg>
fragment. It is not required for pip to function in many situations today.For example, if you have something like:
You should change it to use the following syntax:
Other examples:
Warning
Editable VCS installs do NOT yet support the Direct URL syntax. This means the egg fragment is the only supported way to request an extra for a VCS URL. If this is your situation, you will need to wait until pip adds Direct URL support for editable VCS installs. We will NOT remove support for URLs with invalid egg fragments until there is a supported alternative for all use-cases.
Thank you. ~Richard
Original issue description (for maintainers)
We deprecated anything that isn't a bare project name in an egg fragment in #11567. It's scheduled for removal in pip 25.0. Let's make this an error.
pip/src/pip/_internal/models/link.py
Lines 459 to 475 in 1452429
cc @woodruffw
The text was updated successfully, but these errors were encountered: