Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Fundamentally 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.


Package 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.


Once we learn to namespace things it’s gonna be so nice. Seems we keep re-learning that lesson…


  import 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!


I feel like github solved this problem pretty well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: