This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jwilk
Recipients jwilk
Date 2013-06-14.20:34:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The MO file format specification[0] reads:
"A program seeing an unexpected major revision number should stop reading the MO file entirely"
But Python doesn't pay attention to versions at all.

As a test-case I attached a MO file with a bogus major revision number. msgunfmt correcly rejects such a file:

$ msgunfmt 
msgunfmt: file "" is not in GNU .mo format

Yet Python opens it happily:

>>> import gettext
>>> t = gettext.GNUTranslations(open("", "rb"))
>>> t.gettext("foo")

Date User Action Args
2013-06-14 20:34:41jwilksetrecipients: + jwilk
2013-06-14 20:34:41jwilksetmessageid: <>
2013-06-14 20:34:41jwilklinkissue18216 messages
2013-06-14 20:34:41jwilkcreate