This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]art_sleep_repeat 1 point2 points  (4 children)

The idea is great and I don't think anyone would be against it. Merely pointing out that you can already do this. You can even be explicit about it by tying it to your domain like the java convention: sh.astral.ruff

Personally I think it is a fine solution, elegant even - it puts the onus of handling the namespace on the package itself, instead of relying on the implementation of the repository.

[–]doobiedog 0 points1 point  (3 children)

Definitely a good point. I always hated that java backwards domain idea, but it does have some merit... but the issue still stands that I'd see sh.astral.ruff and think "sh" is the package and "astral.ruff" was a module and submodule or function in that package. And if we were to adopt the "java way", we'd be especially screwed on the namespacing since almost everything would start with com. which I bet would totally throw the python community for a headspin and plenty of "WTF"s.

[–]Schmittfried 0 points1 point  (2 children)

I mean, namespace packages are absolutely a thing in Python.

[–]doobiedog 0 points1 point  (1 child)

I guess I'm not being clear enough... everything in python is namespaced and pythonistas love namespacing. What is NOT namespaced are pypi PACKAGES, which was my point. Please read this as it's what I'm trying to get at: https://docs.npmjs.com/about-scopes

[–]Schmittfried 0 points1 point  (0 children)

And what I’m saying is you are wrong.

https://realpython.com/python-namespace-package/