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


Groups > comp.lang.python > #87390

Re: Python 2 to 3 conversion - embrace the pain

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <songofacandy@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'broken': 0.04; 'resulting': 0.04; 'yet.': 0.04; 'configure': 0.05; 'tree': 0.05; 'url:launchpad': 0.05; 'subject:Python': 0.06; 'deployed': 0.07; 'filing': 0.07; 'fixes': 0.07; 'modified': 0.07; 'reason,': 0.07; 'report.': 0.07; 'bug.': 0.09; 'claimed': 0.09; 'converted': 0.09; 'deploy': 0.09; 'fixed,': 0.09; 'lines.': 0.09; 'release,': 0.09; 'report,': 0.09; 'spec': 0.09; 'url:github': 0.09; 'cc:addr :python-list': 0.11; 'developers,': 0.11; 'python': 0.11; 'bug': 0.12; '2.7': 0.14; 'changes': 0.15; 'posted': 0.15; 'buffers,': 0.16; 'discussion.': 0.16; 'does,': 0.16; 'fine.': 0.16; 'fork': 0.16; 'hierarchy': 0.16; 'link,': 0.16; 'maintainer': 0.16; 'pypi.': 0.16; 'subclass': 0.16; 'url:issues': 0.16; 'exception': 0.16; 'sat,': 0.16; 'language': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'do.': 0.18; 'library': 0.18; 'module': 0.19; 'trying': 0.19; 'seems': 0.21; '(the': 0.22; 'appears': 0.22; 'memory': 0.22; 'cc:addr:python.org': 0.22; 'load': 0.23; 'error': 0.23; '(such': 0.24; "aren't": 0.24; 'browsers': 0.24; 'fixed.': 0.24; 'module,': 0.24; 'parse': 0.24; 'specifies': 0.24; 'ssl': 0.24; 'versions': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'push': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'url:bugs': 0.29; 'am,': 0.29; 'thus': 0.29; "doesn't": 0.30; 'converting': 0.30; 'involving': 0.30; 'specified': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; 'too.': 0.31; 'crash': 0.31; 'fixing': 0.31; 'giant': 0.31; 'obscure': 0.31; 'pickle': 0.31; 'routine': 0.31; 'though.': 0.31; 'workaround': 0.31; 'file': 0.32; 'this.': 0.32; 'another': 0.32; 'says': 0.33; 'url:python': 0.33; 'bugs': 0.33; 'implemented': 0.33; 'core': 0.34; 'subject:the': 0.34; 'message.': 0.35; 'problem': 0.35; "can't": 0.35; 'created': 0.35; 'possible.': 0.35; 'problem.': 0.35; 'good.': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; '14,': 0.36; 'url:listinfo': 0.36; 'next': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'reports': 0.37; 'skip:4 10': 0.37; 'application': 0.37; 'two': 0.37; 'being': 0.38; 'server': 0.38; 'handle': 0.38; 'bad': 0.39; 'supporting': 0.39; 'though,': 0.39; 'url:mail': 0.40; 'skip:u 10': 0.60; 'problems.': 0.60; 'ago.': 0.61; 'gone': 0.61; 'deliver': 0.61; 'new': 0.61; 'browser': 0.61; 'entire': 0.61; 'john': 0.61; 'great': 0.65; 'between': 0.67; 'mar': 0.68; 'results': 0.69; 'default': 0.69; 'discover': 0.82; '2015': 0.84; '3.4': 0.84; 'diagnosing': 0.84; 'fails,': 0.84; 'resulted': 0.84; 'tolerance': 0.84; 'discovering': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=8X+5r2iZgaFoEBJGgEOBCyWW3msDffnlfRRQrvAlU9A=; b=QJ+NXgu9MNSX8OOS5q9lHLaTx9Ul0WXzABsm+tsO9+IBweCQo1AyFKXsiWxEaeL/Ea glclJyHEydfQnrPTNXbOFPk611kye2TSqDmYU54WsApAgT1JcuhjBkmuJ7W+hDubNCWS OjqF/ASrhgd6ZO0jN166ZUIp21u8TgCQas6lN7vL4pvZd/WjqWkzo69fP8pf8a6YVf8h BnAOH/wVQCsoQW3/1ULreyPjvnjSkuhiXJIe25Gi9oeLWpn2d/MuPYkSCKkrIQC5cwZW iY7cQyNva6CLVsY40VYgVJCJEppwhKXhfU29we/jHzwoOQvx9G+4k3gxC9Nj7XFBGogk Ui/w==
X-Received by 10.182.81.98 with SMTP id z2mr40468005obx.35.1426285685130; Fri, 13 Mar 2015 15:28:05 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <550351BF.5020108@animats.com>
References <550351BF.5020108@animats.com>
From INADA Naoki <songofacandy@gmail.com>
Date Sat, 14 Mar 2015 07:27:44 +0900
Subject Re: Python 2 to 3 conversion - embrace the pain
To John Nagle <nagle@animats.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
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.339.1426285687.21433.python-list@python.org> (permalink)
Lines 111
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1426285687 news.xs4all.nl 2955 [2001:888:2000:d::a6]:35314
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:87390

Show key headers only | View raw


Hi, John.  I'm maintainer of PyMySQL.

I'm sorry about bug of PyMySQL.  But the bug is completely unrelated
to Python 3.
You may encounter the bug on Python 2 too.

I've already made mysqlclient, the fork of MySQLdb supporting Python 3.


On Sat, Mar 14, 2015 at 6:08 AM, John Nagle <nagle@animats.com> wrote:
>   I'm approaching the end of converting a large system from Python 2 to
> Python 3.  Here's why you don't want to do this.
>
>   The language changes aren't that bad, and they're known and
> documented.  It's the package changes that are the problem.
> Discovering and fixing all the new bugs takes a while.
>
>
> BeautifulSoup:
>
> BeautifulSoup 3 has been phased out. I had my own version of
> BeautifulSoup 3, modified for greater robustness.  But that was
> years ago.  So I converted to BeautifulSoup 4, as the documentation
> says to do.
>
> The HTML5parser module is claimed to parse as a browser does, with
> all the error tolerance specified in the HTML5 spec. (The spec
> actually specifies how to handle bad HTML consistently across
> browsers in great detail, and HTML5parser has code in it for that.)
>
> It doesn't deliver on that promise, though. Some sites crash
> BeautifulSoup 4/HTML5parser.  Try "kroger.com", which has HTML with
> <head><head>.  The parse tree constructed has a bad link,
> and trying to use the parse tree results in exceptions.
> Submitted bug report.  Appears to be another case of
> a known bug.  No workaround at this time.
>
> https://bugs.launchpad.net/beautifulsoup/+bug/1270611
> https://bugs.launchpad.net/beautifulsoup/+bug/1430633
>
>
> PyMySQL:
>
> "Pymysql is a pure Python drop-in replacement for MySQLdb".
> Sounds good.  Then I discover that LOAD DATA LOCAL wasn't
> implemented in the version on PyPi.  It's on Github, though,
> and I got the authors to push that out to PyPi.  It
> works on test cases.  But it doesn't work on a big job,
> because the default size of MySQL packets was set to 16MB.
> This made the LOAD DATA LOCAL code try to send the entire
> file being loaded as one giant MySQL packet.  Unless you
> configure the MySQL server with 16MB buffers, this fails, with
> an obscure "server has gone away" message.  Found the
> problem, came up with a workaround, submitted a bug report,
> and it's being fixed.
>
> https://github.com/PyMySQL/PyMySQL/issues/317
>
>
> SSL:
>
> All the new TLS/SSL support is in Python 3. That's good.
> Unfortunately, using Firefox's set of SSL certs, some
> important sites (such as "verisign.com") don't validate.
> This turned out to be a complex problem involving Verisign
> cross-signing a certificate, which created a certificate
> hierarchy that some versions of OpenSSL can't handle.
> There's now a version of OpenSSL that can handle it, but
> the Python library has to make a call to use it, and
> that's going in but isn't deployed yet.  This bug
> resulted in much finger-pointing between the Python
> and OpenSSL developers, the Mozilla certificate store
> maintainers, and Verisign.  It's now been sorted out,
> but not all the fixes are deployed.  Because "ssl" is
> a core Python module, this will remain broken until the
> next Python release, on both the 2.7 and 3.4 lines.
>
> Also, for no particularly good reason, the exception
> "SSL.CertificateError" is not a subclass of "SSL.Error",
> resulting in a routine exception not being recognized.
>
> Bug reports submitted for both OpenSSL and Python SSL.
> Much discussion.  Problem fixed, but fix is in next
> version of Python.  No workaround at this time.
>
> http://bugs.python.org/issue23476
>
>
> Pickle:
>
> As I just posted recently, CPickle on Python 3.4 seems to
> have a memory corruption bug.  Pure-Python Pickle is fine.
> So a workaround is possible.  Bug report submitted.
>
> http://bugs.python.org/issue23655
>
>
> Converting a large application program to Python 3
> thus required diagnosing four library bugs and filing
> bug reports on all of them.  Workarounds are known
> for two of the problems.  I can't deploy the Python 3
> version on the servers yet.
>
>                                 John Nagle
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
INADA Naoki  <songofacandy@gmail.com>

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


Thread

Python 2 to 3 conversion - embrace the pain John Nagle <nagle@animats.com> - 2015-03-13 14:08 -0700
  Re: Python 2 to 3 conversion - embrace the pain INADA Naoki <songofacandy@gmail.com> - 2015-03-14 07:27 +0900
    Re: Python 2 to 3 conversion - embrace the pain John Nagle <nagle@animats.com> - 2015-03-13 16:01 -0700
      Re: Python 2 to 3 conversion - embrace the pain Ned Deily <nad@acm.org> - 2015-03-13 16:14 -0700
      Re: Python 2 to 3 conversion - embrace the pain Chris Angelico <rosuav@gmail.com> - 2015-03-14 12:40 +1100
      Re: Python 2 to 3 conversion - embrace the pain INADA Naoki <songofacandy@gmail.com> - 2015-03-15 16:01 +0900
        Re: Python 2 to 3 conversion - embrace the pain wxjmfauth@gmail.com - 2015-03-15 01:11 -0700
  Re: Python 2 to 3 conversion - embrace the pain Marko Rauhamaa <marko@pacujo.net> - 2015-03-14 10:00 +0200
    Re: Python 2 to 3 conversion - embrace the pain John Nagle <nagle@animats.com> - 2015-03-15 12:05 -0700
      Re: Python 2 to 3 conversion - embrace the pain Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-15 19:16 +0000
      Re: Python 2 to 3 conversion - embrace the pain "Fetchinson ." <fetchinson@googlemail.com> - 2015-03-15 21:59 +0100
      Re: Python 2 to 3 conversion - embrace the pain Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-15 21:05 +0000
        Re: Python 2 to 3 conversion - embrace the pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-16 11:25 +1100
          Re: Python 2 to 3 conversion - embrace the pain Chris Angelico <rosuav@gmail.com> - 2015-03-16 11:38 +1100
          Re: Python 2 to 3 conversion - embrace the pain Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-16 01:07 +0000
      Re: Python 2 to 3 conversion - embrace the pain Mario Figueiredo <marfig@gmail.com> - 2015-03-16 00:23 +0100
        Re: Python 2 to 3 conversion - embrace the pain Roy Smith <roy@panix.com> - 2015-03-15 19:43 -0400
          Re: Python 2 to 3 conversion - embrace the pain Chris Angelico <rosuav@gmail.com> - 2015-03-16 11:00 +1100
          Re: Python 2 to 3 conversion - embrace the pain Mario Figueiredo <marfig@gmail.com> - 2015-03-16 01:19 +0100
          Re: Python 2 to 3 conversion - embrace the pain John Nagle <nagle@animats.com> - 2015-03-17 23:37 -0700
            Re: Python 2 to 3 conversion - embrace the pain Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-18 08:41 +0000
            Re: Python 2 to 3 conversion - embrace the pain Ned Deily <nad@acm.org> - 2015-03-18 02:11 -0700
              Re: Python 2 to 3 conversion - embrace the pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-18 21:53 +1100
                Re: Python 2 to 3 conversion - embrace the pain Rustom Mody <rustompmody@gmail.com> - 2015-03-18 06:42 -0700
                Re: Python 2 to 3 conversion - embrace the pain wxjmfauth@gmail.com - 2015-03-18 07:23 -0700
                Re: Python 2 to 3 conversion - embrace the pain Paul Rubin <no.email@nospam.invalid> - 2015-03-18 09:35 -0700
                Re: Python 2 to 3 conversion - embrace the pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-20 09:48 +1100
        Re: Python 2 to 3 conversion - embrace the pain Kishan Thobhani <thobhanikishan@gmail.com> - 2015-03-16 05:05 +0530
        Re: Python 2 to 3 conversion - embrace the pain Kishan Thobhani <thobhanikishan@gmail.com> - 2015-03-16 05:23 +0530
  Re: Python 2 to 3 conversion - embrace the pain Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-14 09:05 +0000

csiph-web