Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563560 - games-util/nml-0.4.x with >=dev-python/pillow-3.0.0 uses deprecated tostring() function call
Summary: games-util/nml-0.4.x with >=dev-python/pillow-3.0.0 uses deprecated tostring(...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-20 13:25 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2015-10-30 14:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nml-0.4.2-replace_deprecated_tostring_call.patch (nml-0.4.2-replace_deprecated_tostring_call.patch,1.38 KB, patch)
2015-10-20 13:25 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-10-20 13:25:42 UTC
Created attachment 414992 [details, diff]
nml-0.4.2-replace_deprecated_tostring_call.patch

As written in the summary. 
This leads to failues during emerge of games-misc/opengfx like this:

nmlc -c -p DOS -M --MF=ogfxi_logos.grf.dep --grf ogfxi_logos.grf ogfxi_logos.nml
^MReading lang ...^MReading lang ...^MReading lang ...^MReading lang ...^MReading lang ...^MReading lang ...^M^M^MReading ...^MReading ...^M^M^MInit parser ...^MInit parser ...^M^M^MReading
 ...^MReading ...^M^M^MInit parser ...^MReading ...^M^MInit parser ...^M^MInit parser ...^M^MReading ...^M^MInit parser ...^M^MParsing ...^M^MParsing ...^M^MParsing ...^M^MParsing ...^M^MPa
rsing ...^M^MParsing ...^M^MPreprocessing ...^M^MGenerating actions ...^M^MAssigning Action2 registers ...^M^MGenerating strings ...^M^MCollecting real sprites ...^M^MChecking palette of so
urce images ...^M^MEncoding ...^MEncoding 1/103: sprites/png/gui/highscore.png^Mnmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: 0.4.2
Error:    (Exception) "tostring() has been removed. Please call tobytes() instead.".
Command:  ['/usr/lib/python-exec/python3.4/nmlc', '-c', '-p', 'DOS', '-M', '--MF=ogfxi_logos.grf.dep', '--grf', 'ogfxi_logos.grf', 'ogfxi_logos.nml']
Location: File "/usr/lib64/python3.4/site-packages/PIL/Image.py", line 686, in tostring


The attached patch fixes this problem but I didn't test how nml behaves under python-3.3 with this patch. I also didn't send this patch upstream as I am by no means a python expert.
If you think this patch is sufficient feel free to send it upstream.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2015-10-20 17:15:08 UTC
It's actually pillow that's complaining.  The patch looks like the correct thing and works with the current stable version of pillow as well so I added it to portage and I'll try to get it in upstream.