Bug 678458

Summary: Add detection of Python 3.2 bytecode
Product: [Fedora] Fedora Reporter: bouloumag
Component: fileAssignee: Jan Kaluža <jkaluza>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: jkaluza
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-01 08:58:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description bouloumag 2011-02-18 02:01:58 UTC
Description of problem:

Please add detection of Python 3.2 bytecode for the .pyc/.pyo files. pyc files are detected as "data". 

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


How reproducible:

# file something.pyo
# file something.pyc

Steps to Reproduce:
1.
2.
3.
  
Actual results:

type data

Expected results:

python files

Additional info:

Comment 1 Jan Kaluža 2011-02-23 12:45:47 UTC
If you have Python 3.2, could you please run following code and send me a output? it will show magic bytes used by pyc compiled in that Python version:

>>> import binascii, imp
>>> binascii.hexlify(imp.get_magic())

I don't have any Python 3.2 here and I want to be sure... Thanks.

Comment 2 bouloumag 2011-02-24 14:08:46 UTC
I have Python 3.2 :

>>> import binascii, imp
>>> >>> binascii.hexlify(imp.get_magic())
b'6c0c0d0a'

Comment 3 bouloumag 2011-02-25 01:41:06 UTC
Adding the following line to file-5.05/magic/Magdir/python works for me :

 belong          0x6c0c0d0a      python 3.2 byte-compiled

Comment 4 Jan Kaluža 2011-02-28 12:09:40 UTC
Thanks, I'll backport it soon.

Comment 5 Jan Kaluža 2011-03-01 08:58:36 UTC
Fixed in file-5.05-4.fc16.