Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524024 - sys-apps/pcsc-lite-1.8.12 with >dev-lang/python-3 - pcsc-spy: SyntaxError: Missing parentheses in call to 'print'
Summary: sys-apps/pcsc-lite-1.8.12 with >dev-lang/python-3 - pcsc-spy: SyntaxError: Mi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 13:15 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2014-09-30 11:34 UTC (History)
1 user (show)

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


Attachments
pcsc-spy-python3.patch (pcsc-spy-python3.patch,10.58 KB, patch)
2014-09-30 05:49 UTC, Alon Bar-Lev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2014-09-29 13:15:33 UTC
$ /usr/bin/pcsc-spy --help
  File "/usr/bin/pcsc-spy", line 167
    print self.indent + PCSCspy.color_red + data + PCSCspy.color_normal + time
             ^
SyntaxError: Missing parentheses in call to 'print'
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2014-09-30 05:49:57 UTC
Created attachment 385790 [details, diff]
pcsc-spy-python3.patch

Can you please checkout if this patch works for you?
Comment 2 Arfrever Frehtes Taifersar Arahesis 2014-09-30 08:56:08 UTC
Many (but not all) changes for print() result in changed output with Python 2.

Python 2:

>>> print "ab", "cd"
ab cd
>>> print("ab", "cd")
('ab', 'cd')

Python 3:

>>> print("ab", "cd")
ab cd


All instances of print("some string", something) should be changed to e.g. print("some string %s" % something), which results in identical output with Python 2 and 3.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2014-09-30 08:58:55 UTC
Also behavior of Python 3 can be achieved in Python 2 by adding the following line at the beginning of script:

from __future__ import print_function

(This works only with Python >=2.6. It is ignored in Python 3.)
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2014-09-30 09:04:48 UTC
Can you please provide workable patch, work with upstream to resolve and submit it here as well?

Thanks!
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2014-09-30 11:34:10 UTC
ok, for now I forced python2.