On Mon, Jul 15, 2019 at 07:29:59PM -0700, Christopher Barker wrote:
I think this may be a worthwhile idea — after all, “namespaces are one honking great idea”
This would be an opportunity to clearly define the “standard library” as something other than “all the stuff that ships with cPython”
CPython is the reference implementation. It is expected that anything shipped by CPython ought to be shipped by all other implementations, unless there's a very good reason not to. Compliance is a Quality of Implementation issue, not a deal breaker.
With that in mind:
Would MicroPython include framebuf in stdlib, PyPI include cffi, etc.?
No, they wouldn’t. The Stalin would be, well, a standard. If something is only going to exist on some platforms or implementations, they should not be in that namespace.
"Standard" doesn't mean "available everywhere, in every version of every implementation".
A “pypy” or “upy” namespace would be the place to put those things. Then it’s obvious to everyone where code that uses those will and won’t run.
Granted, something like MicroPython May never support the entire Stdlib, but the goal should be to define what a “complete” stub is.
Please, let's avoid scope-creep. The proposal here is simple and limited: make the std library modules available through a special "stdlib" namespace. It's going to be hard enough to write the PEP and get it approved without blowing the scope out to include defining acceptable levels of functionality for stubs used by alternate implementations. -- Steven