This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 672352 - Incorrect python bytecode value for python 3.2
Incorrect python bytecode value for python 3.2
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
rawhide
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-24 17:10 EST by Dave Malcolm
Modified: 2011-04-06 20:11 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-06 20:11:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2011-01-24 17:10:06 EST
Description of problem:

Running:
  rpmlint python3
on rawhide, I get numerous:
  python-bytecode-wrong-magic-value
errors of the form:
  python3-libs.x86_64: E: python-bytecode-wrong-magic-value /usr/lib64/python3.2/dbm/__pycache__/gnu.cpython-32.pyc expected 3160 (3.2), found 3180 (unknown)

rpmlint's FilesCheck.py:_python_magic_values  has:
    '3.1': 3150,
    '3.2': 3160,
    }

However, that seems to reflect 3.2a0.  The comment in the latest version of Python 3.2 (3.2rc1) has this comment in Python/import.c:
       Python 3.2a0: 3160 (add SETUP_WITH)
                     tag: cpython-32
       Python 3.2a1: 3170 (add DUP_TOP_TWO, remove DUP_TOPX and ROT_FOUR)
                     tag: cpython-32
       Python 3.2a2  3180 (add DELETE_DEREF)

So I believe that the '3.2' entry needs to be 3180 instead.

Looking at a sample file, I see:
  $ hexdump -C /usr/lib64/python3.2/urllib/__pycache__/__init__.cpython-32.pyc | head -n 1
  00000000  6c 0c 0d 0a f0 e5 a3 4b  63 00 00 00 00 00 00 00  |l......Kc.......|

where the first four bytes:
  0x6c 0x0c 0x0d 0x0a
and 0x0c6c is inddeed 3180.


Version-Release number of selected component (if applicable):
  rpmlint-1.0-3.fc15.noarch
  python3-3.2-0.6.b2.fc15.src.rpm



How reproducible:
100%
Comment 1 Dave Malcolm 2011-01-24 17:12:08 EST
For reference, history of that file in the py3k branch is here:
  http://svn.python.org/view/python/branches/py3k/Python/import.c

and the last relevant change there was:
  http://svn.python.org/view?view=rev&revision=84686
Comment 3 Dave Malcolm 2011-04-06 20:11:30 EDT
Thanks!

rpmlint-1.1.tar.xz contains the fix, and I see that that version is in rawhide, and in the latest F15 version (rpmlint-1.1-3.fc15.src.rpm).

Closing this bug out

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