[PKG-Openstack-devel] Bug#881448: python-eventlet fails to install on amd64: SyntaxError: invalid syntax
Chris Lamb
lamby at debian.org
Sun Nov 12 07:51:32 UTC 2017
Hi,
> python-eventlet fails to install on amd64: SyntaxError: invalid syntax
Sat 11 18:37 < zigo> In Python 2, with what I just uploaded for python-eventlet, I have these issues:
Sat 11 18:37 < zigo> Setting up python-eventlet (0.20.0-1) ...
Sat 11 18:37 < zigo> File "/usr/lib/python2.7/dist-packages/eventlet/green/http/client.py", line 195
Sat 11 18:37 < zigo> _is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*\Z').match
Sat 11 18:37 < zigo> ^
Sat 11 18:37 < zigo> SyntaxError: invalid syntax
Sat 11 18:37 < zigo> File "/usr/lib/python2.7/dist-packages/eventlet/green/http/cookiejar.py", line 1269
Sat 11 18:37 < zigo> yield from deepvalues(obj)
Sat 11 18:37 < zigo> ^
Sat 11 18:37 < zigo> SyntaxError: invalid syntax
Sat 11 18:37 < zigo> Does anyone know how to patch this?
Sat 11 18:38 < zigo> It works perfectly in py3...
Sat 11 18:40 < zigo> Looks like doing b'' for the string of the first issue is fixing the issue for py2, and works in py3.
Sat 11 18:40 < zigo> I'm not sure for the yield though.
Sat 11 18:44 < wRAR> of course you can't "fix" yield from for Python < 3.5
Sat 11 18:45 < zigo> Hum... I fix I got it ! :)
Sat 11 18:46 < wRAR> https://github.com/eventlet/eventlet/blob/master/eventlet/green/http/__init__.py#L56
Sat 11 18:46 < wRAR> you don't need to fix the *code*
Sat 11 18:47 < zigo> wRAR: I actually do...
Sat 11 18:48 < wRAR> ok
Sat 11 18:48 < wRAR> and for the first line do you mean you removed the r prefix?
Sat 11 18:48 < zigo> wRAR: Yes. Is this wrong?
Sat 11 18:48 < wRAR> do you know what does this prefix mean?
Sat 11 18:49 < zigo> wRAR: I know what b means, not sure what rb does.
Sat 11 18:49 < wRAR> I see
Sat 11 18:49 < zigo> Which is why I'm asking in the channel.
Sat 11 18:49 < wRAR> https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str
Sat 11 18:50 < wRAR> I guess you never wrote regulare expression code in Python?
Sat 11 18:51 < zigo> Right.
Sat 11 18:52 < zigo> Oh...
Sat 11 18:52 < zigo> Indeed, removing r is a bad idea... :P
ie. the maintainer is at least aware of the issue.
Zigo, I just went to provide a patch of my own but I cannot find
the latest packaging corresponding to this version in the Vcs-Git
repository.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
More information about the Openstack-devel
mailing list