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


Groups > comp.lang.python > #51453 > unrolled thread

What do you do when a library is outdated?

Started byMatt <mattgraves7@gmail.com>
First post2013-07-29 09:14 -0700
Last post2013-07-29 13:12 -0400
Articles 4 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  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

#51453 — What do you do when a library is outdated?

FromMatt <mattgraves7@gmail.com>
Date2013-07-29 09:14 -0700
SubjectWhat do you do when a library is outdated?
Message-ID<4ca2756b-0fae-4284-85cf-264c3f179d4d@googlegroups.com>
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? 

[toc] | [next] | [standalone]


#51457

FromChris Angelico <rosuav@gmail.com>
Date2013-07-29 17:34 +0100
Message-ID<mailman.5241.1375115656.3114.python-list@python.org>
In reply to#51453
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

[toc] | [prev] | [next] | [standalone]


#51458

FromMatt <mattgraves7@gmail.com>
Date2013-07-29 09:40 -0700
Message-ID<3e3a63f4-8e47-47a2-970d-7544e9c169ff@googlegroups.com>
In reply to#51457
On Monday, July 29, 2013 12:34:08 PM UTC-4, Chris Angelico wrote:
> 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

I appreciate this. I did not know of 2to3, and I am going to give that a shot right now. Thank you!

[toc] | [prev] | [next] | [standalone]


#51465

FromTerry Reedy <tjreedy@udel.edu>
Date2013-07-29 13:12 -0400
Message-ID<mailman.5248.1375118109.3114.python-list@python.org>
In reply to#51453
On 7/29/2013 12:14 PM, Matt 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?

Update it yourself, ask someone else to update it, or use something else.

Or regress to an older Python that it will work with.



-- 
Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web