cfv returns Deprecation Warning

Bug #158747 reported by Scott Testerman
48
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cfv
Unknown
Unknown
cfv (Debian)
Fix Released
Unknown
cfv (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by ENOTTY

Bug Description

Binary package hint: cfv

Using: Kubuntu 7.10

When running cfv on a directory containing an SFV file and a group of related RAR files I received the following warning:

"/usr/lib/python2.5/site-packages/cfv.py:705: DeprecationWarning: struct integer overflow masking is deprecated
  return struct.pack('>I',self.value)"

Program execution continued normally after that, so at the moment it is merely an annoyance and not a show-stopper. This warning did not appear on Kubuntu 7.04.

Related branches

Revision history for this message
Lukas Bischof (lukas-bischof) wrote :

It also appears on my Ubuntu 7.04 machine.
Same problem: bunch of rars and the sfv throws a DeprecationWarning.
After the warning, the program resumes normally.

Revision history for this message
yaplik (yaplik) wrote :
Changed in cfv:
status: New → Fix Committed
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Fixed in Intrepid with 1.18.2-1.

Changed in cfv:
status: Fix Committed → Fix Released
Revision history for this message
Schwert (schw3rt) wrote :

it is also possible tu just hide the warning without altering the fonctionement of the program

Revision history for this message
Juan Simón (simonbcn) wrote :

It continues happening.

Description: Ubuntu 9.04
Release: 9.04

cfv:
  Instalados: 1.18.2-1
  Candidato: 1.18.2-1
  Tabla de versión:
 *** 1.18.2-1 0
        500 http://es.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Revision history for this message
Juan Simón (simonbcn) wrote :

The warnings:

/var/lib/python-support/python2.6/cfv.py:670: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
/var/lib/python-support/python2.6/cfv.py:699: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5

Changed in cfv (Ubuntu):
status: Fix Released → New
Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Fixed DeprecationWarning.
I had rewritten debian/rules as it was a mess and didn't work with Python 2.6
Fixed few

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

So I have obviously forgot to change Maintaner to Ubuntu MOTU Developers.. again.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Let's autoclose this bug on upload

Revision history for this message
Andreas Moog (ampelbein) wrote :

Thank you for your work, sponsored. I updated your patch to match https://wiki.ubuntu.com/UbuntuDevelopment/PatchTaggingGuidelines

Otherwise, good work!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cfv - 1.18.2-1ubuntu1

---------------
cfv (1.18.2-1ubuntu1) karmic; urgency=low

  * debian/patches/02_fix_python_warnings.dpatch:
    -Fix DeprecationWarning from md5 and sha modules. (LP: #158747)
  * debian/rules:
    - Simplify rules, make it compatible with Python 2.6.
  * debian/control:
    - Add versioned Build-Depends on debhelper and python packages.
    - Change Maintainer to Ubuntu MOTU Developers.
    - Add Homepage.
    - Make package depends on ${misc:Depends}.
  * debian/copyright:
    - Use GPL-2 instead of GPL symlink.
  * debian/compat:
    - Make package compatible with debhelper 7.

 -- Krzysztof Klimonda <email address hidden> Sat, 06 Jun 2009 03:06:22 +0200

Changed in cfv (Ubuntu):
status: New → Fix Released
Changed in cfv (Debian):
status: Unknown → New
Revision history for this message
Cybjit (cybjit) wrote :

Something in 02_fix_python_warnings.dpatch broke torrent-checking.

With the patch I get this:

$ cfv -f XYZ.torrent
/usr/lib/pymodules/python2.6/BitTornado/__init__.py:8: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  from sha import sha
Traceback (most recent call last):
  File "/usr/bin/cfv", line 3, in <module>
    cfv.main()
  File "/usr/lib/pymodules/python2.6/cfv.py", line 2465, in main
    test(a, typename)
  File "/usr/lib/pymodules/python2.6/cfv.py", line 2125, in test
    cf.test_chksumfile(file, filename)
  File "/usr/lib/pymodules/python2.6/cfv.py", line 862, in test_chksumfile
    self.do_test_chksumfile(file)
  File "/usr/lib/pymodules/python2.6/cfv.py", line 1533, in do_test_chksumfile
    sh = sha.sha()
AttributeError: 'builtin_function_or_method' object has no attribute 'sha'

Without it, it works.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Thanks for your report. Obviously it was my fault. As the new version of cfv was released till then and the only change was Python 2.6 compability I'm going to request a sync with debian instead of fixing my patch.

Changed in cfv (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.