[Python-ideas] namespace for backported stdlib modules?

Sebastian Kreft skreft at gmail.com
Tue Oct 21 23:49:58 CEST 2014


I think the decentralized namespace idea is doomed, for several reasons:

- The namespace is not private and anyone can create a backport there
without adhering to any standards. This has the problem of false security
for potential users and code that is not thoroughly tested.
- Some projects flatten the name of the backport, specially when they just
want to backport one function. Which result in awfully long names.
- You need to import all the namespace boilerplate in your backport project.
- Licensing: Not all people put their backports with the PSF license.
- it is not clear from which version/revision things were backported.
- at the end, one still needs to have this conditional imports that force
you to have this compatibility layer, so naming is not that important.

What I would do is instead of having a namespace is to actually have just
one project (no strong opinions about the name) with community curated
backports.
The project should/could:
- enforce the PSF license
- define different namespaces for the different backports, like backport27,
backport33, backport34
- keep track of revision used in the latest backport and notify to
maintainers of changes
- be tested in all platforms specified
- have guidelines for backporters
- provide diffs of what was changed and limitations of the backport
- generate different packages for different python versions or maybe even
allow people to select their own bundle.
- it could even provide some import magic like:
  import backports33
  backports33.install('shutil.wich')

  import shutil
  shutil.wich(...)


Note: I am maintaining two backports:
https://pypi.python.org/pypi/backport_ipaddress and
https://pypi.python.org/pypi/backport_collections.

On Tue, Oct 21, 2014 at 9:48 PM, Robert Collins <robertc at robertcollins.net>
wrote:

> https://pypi.python.org/pypi/backports/1.0
>
> Question now is whether its active :)
>
> On 22 October 2014 04:43, Ethan Furman <ethan at stoneleaf.us> wrote:
> > On 10/21/2014 02:34 AM, Georg Brandl wrote:
> >>
> >> On 10/21/2014 03:18 AM, Robert Collins wrote:
> >>>
> >>>
> >>> try:
> >>>      from stdlib import unitest
> >>> except ImportError:
> >>>      import unittest
> >>
> >>
> >> Seeing this as a newcomer, I'd be wondering which one is the one that's
> >> actually coming from the standard library.
> >>
> >> Please don't commandeer "stdlib" for something that's *not* the stdlib.
> >
> >
> > Indeed.  `backports` is a much better name for things that have been, um,
> > backported.
> >
> > _______________________________________________
> > Python-ideas mailing list
> > Python-ideas at python.org
> > https://mail.python.org/mailman/listinfo/python-ideas
> > Code of Conduct: http://python.org/psf/codeofconduct/
>
>
>
> --
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
Sebastian Kreft
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141021/6c00ff1a/attachment.html>


More information about the Python-ideas mailing list