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


Groups > comp.lang.python > #51457

Re: What do you do when a library is outdated?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'languages.': 0.04; '2to3': 0.09; 'deploy': 0.09; 'python': 0.11; 'up-to-date': 0.14; 'useful,': 0.14; 'windows': 0.15; "can't.": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hat,': 0.16; 'modules,': 0.16; 'ought': 0.16; 'perceived': 0.16; 'ported': 0.16; 'subject:library': 0.16; 'subject:when': 0.16; 'time).': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'library': 0.18; 'bit': 0.19; 'module': 0.19; "hasn't": 0.19; 'work,': 0.20; 'written': 0.21; "aren't": 0.24; 'tells': 0.24; 'fairly': 0.24; 'mon,': 0.24; 'question': 0.24; 'first,': 0.26; 'possibly': 0.26; 'url:edu': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'generally': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'asked': 0.31; 'code': 0.31; 'getting': 0.31; 'requests': 0.31; '(usually': 0.31; 'ball': 0.31; 'question:': 0.31; 'up:': 0.31; 'yourself.': 0.31; 'this.': 0.32; 'run': 0.32; 'everyone': 0.33; 'problem': 0.35; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'there': 0.35; 'version': 0.36; 'his/her': 0.36; 'options:': 0.36; 'shows': 0.36; 'subject:?': 0.36; 'easily': 0.37; 'being': 0.38; 'sometimes': 0.38; 'problems': 0.38; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'that,': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'new': 0.61; "you're": 0.61; 'first': 0.61; 'chance': 0.65; 'latest': 0.67; 'between': 0.67; 'forums': 0.68; 'jul': 0.74; 'lack': 0.78; 'interest.': 0.81; 'issues;': 0.84; 'latest,': 0.84; 'subject:you': 0.87; 'have.': 0.93; '2013': 0.98
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 :content-type; bh=E93kR88T0sIkrXoctbKmoOPN1xWy1L1v39ERG/sJ3B8=; b=BHbkG0UDsK3AYaVdt/s3mLKIetcLXK1N9/OaZVGq3aAUsijmsTEGUrPRopEuyDySO1 nkIhdPW57j/lBbmkDReL7wvm/NArJy0kiAZWwn/3i3TW08K8LJyUxZHwDxLMqBEqjzR6 6HaYBF3agDWrL4x00wWlGpBVGM5Gd1nXbVJgxmsv35w20p3odAXOko1vtDoe0cdSc3v7 7BGJxQGa7609D1mlbgv1luC0GxV/4nCQe+uz78AlPFGAErkr1asClgTCF9aW/N4xR0WK WtYyFY/P4dazf5wy33jzLRyVUhjwIjnLqa3zwrdEI05v9CCXs4dlBxWW4eako1eorx2G Qs+Q==
MIME-Version 1.0
X-Received by 10.220.43.19 with SMTP id u19mr8807827vce.3.1375115648395; Mon, 29 Jul 2013 09:34:08 -0700 (PDT)
In-Reply-To <4ca2756b-0fae-4284-85cf-264c3f179d4d@googlegroups.com>
References <4ca2756b-0fae-4284-85cf-264c3f179d4d@googlegroups.com>
Date Mon, 29 Jul 2013 17:34:08 +0100
Subject Re: What do you do when a library is outdated?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5241.1375115656.3114.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1375115656 news.xs4all.nl 15929 [2001:888:2000:d::a6]:38407
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51457

Show key headers only | View raw


On Mon, Jul 29, 2013 at 5:14 PM, Matt <mattgraves7@gmail.com> wrote:
> I'm fairly new to python but have experience in other languages. What do you generally do when a library is outdated? I asked a question on a few forums and everyone has been pointing me to Mechanize, but it will not work with 3.3
>
> What do you do?

Depends what you mean by "outdated". Lots of things don't _need_ to be
up-to-date to be useful, and often, using the very latest version of
something just makes it hard to deploy (look at Debian and Red Hat,
both of which maintain support for a long time). If there's actually a
problem with something not being able to cope with current systems (eg
something that's designed to communicate with Windows and can't talk
to Win 8), then you go looking for a replacement package that can use
the latest, or possibly you write it yourself.

But my crystal ball tells me you're not asking about that, but rather
about a module that was written for Python 2 and hasn't been ported to
Python 3. (Usually there won't be other issues; if something breaks
between Py3.2 and Py3.3, it'll be easily fixed.) There are a few
options:

1) Talk to the author/maintainer. Explain that you want to use his/her
code with Python 3 but can't. Often, the only reason something isn't
ported is because of a perceived lack of interest.
2) Run the module code through the 2to3 utility. That might even be
all you need to do.
3) Port it yourself. Start with 2to3, and then work through any
problems you have. I would recommend getting to know the module on
Python 2 first, so you have a chance of knowing what it ought to be
doing.

You aren't the first to inquire about this. A quick Google search for
'mechanize python 3' brought this up:
http://web.cecs.pdx.edu/~adevore/mechanize/

Also, poking around a bit shows recommendations for the lxml and
requests modules, which may be able to do what you want.

So to answer your general question: Work, sometimes lots of work
(though not always). But for Mechanize specifically, Requests may be
your best bet.

ChrisA

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


Thread

What do you do when a library is outdated? Matt <mattgraves7@gmail.com> - 2013-07-29 09:14 -0700
  Re: What do you do when a library is outdated? Chris Angelico <rosuav@gmail.com> - 2013-07-29 17:34 +0100
    Re: What do you do when a library is outdated? Matt <mattgraves7@gmail.com> - 2013-07-29 09:40 -0700
  Re: What do you do when a library is outdated? Terry Reedy <tjreedy@udel.edu> - 2013-07-29 13:12 -0400

csiph-web