Bug 126377 - DeprecationWarning: the optik interface is deprecated; please use optparse instead
DeprecationWarning: the optik interface is deprecated; please use optparse in...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: up2date (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
Depends On:
Blocks: FC3Target
  Show dependency treegraph
 
Reported: 2004-06-20 14:30 EDT by Kaj J. Niemi
Modified: 2007-11-30 17:10 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-26 15:05:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch to change import from optik for optparse (465 bytes, patch)
2004-08-03 03:15 EDT, Arenas Belon, Carlo Marcelo
no flags Details | Diff

  None (edit)
Description Kaj J. Niemi 2004-06-20 14:30:44 EDT
Description of problem:
After upgrading to python 2.3.4, up2date complains at startup:

# up2date-nox -l
/usr/lib/python2.3/optik.py:8: DeprecationWarning: the optik interface
is deprecated; please use optparse instead
  DeprecationWarning)

Version-Release number of selected component (if applicable):
up2date-4.3.19

How reproducible:
Always
Comment 1 Hans de Goede 2004-07-20 05:43:39 EDT
I also get the following extra deprecated warnings:
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.create_pixmap is deprecated, use
gtk.gdk.Pixmap instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainiteration is deprecated, use
gtk.main_iteration instead
  self.warn(message, DeprecationWarning)

This is with up2date-4.3.19-1.1, this also happens with update-config
Comment 2 Jason 2004-07-22 16:54:25 EDT
I am getting this too.  I am using a fresh install of FC3T1.
Comment 3 Jason 2004-07-22 17:01:34 EDT
/usr/lib/python2.3/optik.py:8: DeprecationWarning: the optik interface
is deprecated; please use optparse instead
  DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainquit is deprecated, use gtk.main_quit
instead
  self.warn(message, DeprecationWarning)
http://fedora.redhat.com/download/up2date-mirrors/fedora-core-rawhide
using mirror:
http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/
 
Fetching Obsoletes list for channel: fedora-core-rawhide...
 
Fetching obsoletes list for
http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/...
#######################################
Fetching rpm headers...
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1271, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 799, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1147, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 62, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 108, in
__findPackagesToUpdate
    self.availableUpdates = plist.getPackagesToInstall()
  File "/usr/share/rhn/up2date_client/packageList.py", line 611, in
getPackagesToInstall
    result = self.__skipPackages(result)
  File "/usr/share/rhn/up2date_client/packageList.py", line 640, in
__skipPackages
    packageList = self.__skipFiles(packageList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 661, in
__skipFiles
    ignoreMsgCallback = self.ignoreMsgCallback)
  File "/usr/share/rhn/up2date_client/packageList.py", line 700, in
buildHeaderList
    hdr = headerList[pkg]
  File "/usr/share/rhn/up2date_client/headers.py", line 37, in __getitem__
    self.__retrievePackage(item)
  File "/usr/share/rhn/up2date_client/headers.py", line 42, in
__retrievePackage    hdr, sourceType =
rpcServer.doCall(self.repos.getHeader, item)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 112, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 31, in
getHeader
    return self.handlers[channel['type']].getHeader(pkg, msgCallback,
progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 210, in
getHeader
    header = source.getHeader(pkg, progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
93, in getHeader
    hdrBuf = fh.read()
  File "/usr/lib/python2.3/gzip.py", line 217, in read
    self._read(readsize)
  File "/usr/lib/python2.3/gzip.py", line 272, in _read
    self._read_eof()
  File "/usr/lib/python2.3/gzip.py", line 308, in _read_eof
    raise IOError, "CRC check failed"
IOError: CRC check failed

Here is what I see when I run up2date -l
Comment 4 Hans de Goede 2004-07-23 01:41:50 EDT
Jason,

You do indeed get the warnings this bug is about, but after that
up2date crashes. Thats a seperate bug, I (and presumably the reporter)
only get the warning not the crash.

Please create a new bug report for the crash, and include detailed
information about how and when it happens, attch for example
/etc/syscobfig/rhn/sources.
Comment 5 Arenas Belon, Carlo Marcelo 2004-08-03 03:14:40 EDT
Python 2.3 includes optik as part of the python library (with the name
optparse)

  http://optik.sourceforge.net/

early versions of python (as the one used on RHES 3 - python 2.2.3),
would need to have at least python-optik 1.4.1 installed for them to
be able to use optparse as the interface to this library (as RHES 3 has).

RHES 2.1 systems (python 1.5) seem to be using python-popt instead and
therefore should be unaffected by this change (not 100% sure though,
as i don't have a RHES 2.1 system at hand to test)

attached, very simple patch (for up2date-4.3.19) which fixes this
Comment 6 Arenas Belon, Carlo Marcelo 2004-08-03 03:15:46 EDT
Created attachment 102381 [details]
patch to change import from optik for optparse
Comment 8 Adrian Likins 2004-08-26 15:05:46 EDT
fixed in current releases 4.3.28 or so

Note You need to log in before you can comment on or make changes to this bug.