-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support PEP 420 -- Implicit Namespace Packages #13293
Comments
add to S169 |
See also #8164 Since you don't need Python 2, your situation is way simpler than it was when I created that issue, but might give you some insights. Feel free to contact me if you have questions on packaging. |
#2951 aimed to remove This also brings up another question: what is the purpose of |
Yes, you can kill them now, their only purpose is Python 2, that you don't handle anymore. Remove them all from everywhere. |
I think we are going to onboard this, have to change the way to find Python Package in setup.py from |
Not quite true. Python resolves namespace packages by searching every By adding the But the point is that the You also need them if you put the (Minor aside - the reason for the So my recommendations are (completely unchanged from when I first designed the current SDK structure):
(Find/replace for |
The current recommendation I push is:
So I think the only contentious part is: should we install Adding @brettcannon and @johanste for two cents |
Side note @jiasli that I didn't realize before @zooba comment, in real life CLI installation, you shouldn't have the If you do have |
I don't have time for 2 cents (plus I live in a country without a penny so I couldn't give you 2 cents even if I wanted to 😉 ). |
Regarding real-life CLI installation's
|
Regarding the empty
|
The debate we have with @zooba is solely about this line, and nothing else, the rest of the recommended guidelines still applies. Once everything else is fixed, and we're down the decide this, we'll settle the debate :). In the meantime, keep this line since it's there, but there is many things to still fix it seems. |
@jiasli @fengzhou-msft I created a dedicated issue for the content of the wheels file |
Thanks @lmazuel. One thing I noticed is that |
No, it contains: No reference to |
Sorry, I mean https://pypi.org/project/azure-nspkg/1.0.0/, which Azure CLI uses. pip_cmd("install -q -I azure-nspkg==1.0.0", "Installing `azure-nspkg`...") @johanste do you mind sharing more context about #2951? I am a little bit confused about why We can schedule a meeting some time around 5pm Redmond time for a quick sync. |
The Its sole purpose is to get around the fact that None of this particularly matters for CLI when you have a "static" install (i.e. anything besides |
In my mind, the name does matter because it indicates the purpose of this package:
I think we need more clarification on the initial naming motivation, and also an investigation on why |
Close this for CLI will support this in 2.11.0 (#14372). |
As Python 2 has been deprecated, we should move away from the
pkg_resources
approach and use PEP 420 -- Implicit Namespace Packages.Importing
pkg_resources
will add a 100ms~200ms delay to CLI's loading time.This is discussed at pypa/setuptools#510 which affects many projects but still doesn't have a proper fix.
Moreover, on Linux, the wrapper
~/env38/bin/az
created by Easy Install also requirespkg_resources
:This makes
az
installed viaazdev
even slower.For comparison, directly run
azure.cli
:Run the Easy Install wrapper:
In our Linux release, we package our own wrapper
src/azure-cli/az
, so it doesn't suffer from the slowness of this Easy Install wrapper.The text was updated successfully, but these errors were encountered: