5 ms·
I wonder whether it will have a flat namespace that everyone competes over or whether the top-level keys will be user/project identifiers of some sort. I hope t
by Myrmornis 1y ago
I wonder whether it will have a flat namespace that everyone competes over or whether the top-level keys will be user/project identifiers of some sort. I hope the latter.
- tmvphil 1y agoFundamentally we still have the flat namespace of top level python imports, which is the same as the package name for ~95% of projects, so I'm not sure how they could really change that.
- notatallshaw 1y agoPackage names and module names are not coupled to each other. You could have package name like "company-foo" and import it as "foo" or "bar" or anything else. But you can if you want have a non-flat namespace for imports using PEP 420 – Implicit Namespace Packages, so all your different packages "company-foo", "company-bar", etc. can be installed into the "company" namespace and all just work. Nothing stops an index from validating that wheels use the same name or namespace as their package names. Sdists with arbitrary backends would not be possible, but you could enforce what backends were allowed for certain users.
- cr125rider 1y agoOnce we learn to namespace things it’s gonna be so nice. Seems we keep re-learning that lesson…
- Y_Y 1y agoimport io from contextlib import redirect_stdout as r b=io.StringIO() with r(b):import this print(b.getvalue().splitlines()[-1]) > Namespaces are one honking great idea -- let's do more of those!
- actinium226 1y agoI feel like github solved this problem pretty well.