Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82491

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ncoghlan@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.04; 'static': 0.04; 'cpython': 0.05; 'subject:Python': 0.06; 'barry,': 0.07; 'pypi': 0.07; '2to3': 0.09; 'bindings': 0.09; 'worse': 0.09; 'api': 0.11; 'cc:addr:python-list': 0.11; 'python': 0.11; '(without': 0.16; 'bindings.': 0.16; "brett's": 0.16; 'feasible': 0.16; 'migration.': 0.16; 'non-python': 0.16; 'nowadays': 0.16; 'porting': 0.16; 'pypi.': 0.16; 'similarly,': 0.16; 'subject:Dev': 0.16; 'subject:edition': 0.16; 'there...': 0.16; 'underlying': 0.16; 'folks': 0.16; 'wrote:': 0.18; 'library': 0.18; 'implementing': 0.19; 'replacing': 0.19; 'subject:] ': 0.20; 'email addr:gmail.com&gt;': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; "aren't": 0.24; 'helpful': 0.24; '&gt;': 0.26; 'extension': 0.26; 'header:In- Reply-To:1': 0.27; 'wondering': 0.29; "doesn't": 0.30; 'converting': 0.30; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'easier': 0.31; 'usually': 0.31; 'gcc': 0.31; 'libraries': 0.31; 'anyone': 0.31; 'linux': 0.33; 'url:python': 0.33; 'cc:no real name:2**1': 0.33; 'could': 0.34; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'useful': 0.36; 'url:org': 0.36; 'example,': 0.37; 'level': 0.37; 'desirable': 0.38; 'that,': 0.38; 'sure': 0.39; 'dave': 0.60; 'worry': 0.60; 'most': 0.60; 'deliver': 0.61; 'url:3': 0.61; 'high': 0.63; 'provide': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'details': 0.65; 'techniques': 0.66; 'latest': 0.67; 'covers': 0.68; '\xe2\x80\x93': 0.77; 'potentially': 0.81; '*and*': 0.84; 'employed,': 0.84; 'subject:survey': 0.84; 'updates,': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/JpEX/myaZ0DmPZPX5AYdDfKkp+ZcWpN65RLHUSSsCM=; b=aKcoZdA3gkdkTbmrsA6EjXyLbvRcFXag129+rUUklCTgY9vLhyuI03z8jPI9BuYVgG c/UDaJMAAAtHwbF6ElBp/oKKx2m7UHsRJUkDhZkiqO132x6Ksc1tBIoqa7Efkhn9n84W U2o9HyTD+CrV6pxi10zfXirOfC0EkBS81IPWb9Yl5Sa16WYgTUxCQ9KIp3kngRcqe3UL mgE48DHMPOg6/2y4LNNXY+3DV02hlLWfMHiwvh1D4x1F6MrZ7yPG13fDTvBcfgZ97+cu TCqTFSftkYU9dzSu5W0bxvwuDiYhcj76FNdAssqspdtW7Umrb4lzeBwQHeKOnT2r2iM3 CwBg==
MIME-Version 1.0
X-Received by 10.66.220.134 with SMTP id pw6mr38176534pac.91.1418516082937; Sat, 13 Dec 2014 16:14:42 -0800 (PST)
In-Reply-To <CA+=+wqCcJSe0VaA3UU-_TL4_M6bqcdUq00=Z3_kCLVqXnShwTA@mail.gmail.com>
References <CAMA3c488xXJFVrO8Qt82A-oAQ3AAoavB956eYTNsd6TXO5g8hQ@mail.gmail.com> <CAFYqXL-PqQ2qzs3G2CZG5TKvOXr0DjnHsWoJ4T3jD24cMjrsyg@mail.gmail.com> <CACbEM1eM+SpZe9uf1i1un7tkrg8KayM41dOwwcydtfy2ux0kfw@mail.gmail.com> <CAGGBd_rw_w8KeTWRejTzxZ1dVc=_+8fumUMMc2FC5Bwc8_476Q@mail.gmail.com> <CACbEM1c2G46uznU+jzLe7gDgMPZcxBwyPM_4BE=UNvyv7x8ALg@mail.gmail.com> <CA+=+wqCcJSe0VaA3UU-_TL4_M6bqcdUq00=Z3_kCLVqXnShwTA@mail.gmail.com>
Date Sun, 14 Dec 2014 10:14:42 +1000
Subject Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
From Nick Coghlan <ncoghlan@gmail.com>
To Petr Viktorin <encukou@gmail.com>
Content-Type multipart/alternative; boundary=047d7b5db9083b5865050a2203ce
Cc python-list@python.org, python-dev@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16938.1418516091.18130.python-list@python.org> (permalink)
Lines 105
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418516091 news.xs4all.nl 2954 [2001:888:2000:d::a6]:50917
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82491

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 13 Dec 2014 05:19, "Petr Viktorin" <encukou@gmail.com> wrote:
>
> Also keep in mind that not all Python libraries are on PyPI.
> For non-Python projects with Python bindings (think video players,
> OpenCV, systemd, Samba), distribution via PyPI doesn't make much
> sense. And since the Python bindings are usually second-class
> citizens, the porting doesn't have a high priority.
>
> If anyone is wondering why their favorite Linux distribution is stuck
> with Python 2 – well, I can only speak for Fedora, but nowadays most
> of what's left are CPython bindings.
> No pylint --py3k or 2to3 will help there...

That's a good point. I actually think
https://docs.python.org/3/howto/cporting.html#cporting-howto is actually in
a worse state than the state the Python level porting guide was in until
Brett's latest round of updates, as it covers the underlying technical
details of the incompatibilities moreso than the available tools and
recommended processes for *executing* a migration.

For example, replacing a handcrafted Python extension with a normal C
library plus cffi, Cython or SWIG generated Python bindings can deliver
both an easier to maintain extension *and* Python 3 compatibility.

Similarly, converting an extension from C to Cython outright (without a
separate C library) can provide both benefits.

It's mainly when converting to one of those isn't desirable and/or feasible
that you really need to worry about C API level porting.

For that, tools like Dave Malcolm's static CPython extension analyser for
gcc could potentially be helpful (as pylint was to Brett's update to the
Python level guide), and Lennart also provides some more detailed practical
suggestions in http://python3porting.com/cextensions.html

I'm sure there are other useful techniques that can be employed, but aren't
necessarily well known outside the folks that have been busy implementing
these migrations.

Barry, Petr, any of the other folks working on distro level C extension
ports, perhaps one of you would be willing to consider an update to the C
extension porting guide to be more in line with Brett's latest version of
the Python level porting guide?

Regards,
Nick.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition Nick Coghlan <ncoghlan@gmail.com> - 2014-12-14 10:14 +1000

csiph-web