All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] python-socketio: drop asgi/asyncio files for python 2.x to fix pycompile issue
Date: Sat, 10 Oct 2020 22:59:34 +0200	[thread overview]
Message-ID: <877drxer0p.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20201004214903.32309-1-peter@korsgaard.com> (Peter Korsgaard's message of "Sun, 4 Oct 2020 23:49:01 +0200")

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/455f3e09a590f7a6724ab8cd1b86bdf2bba8071a/

 > socketio has conditional logic to load asgi/asyncio files when running under
 > Python 3.x:

 > if sys.version_info >= (3, 5):  # pragma: no cover
 >     from .asyncio_client import AsyncClient
 >     from .asyncio_server import AsyncServer
 >     from .asyncio_manager import AsyncManager
 >     from .asyncio_namespace import AsyncNamespace, AsyncClientNamespace
 >     from .asyncio_redis_manager import AsyncRedisManager
 >     from .asyncio_aiopika_manager import AsyncAioPikaManager
 >     from .asgi import ASGIApp
 > else:  # pragma: no cover
 >     AsyncClient = None
 >     AsyncServer = None
 >     AsyncManager = None
 >     AsyncNamespace = None
 >     AsyncRedisManager = None
 >     AsyncAioPikaManager = None

 > pycompile unfortunately errors out on these files when running under Python
 > 2.x:

 > ../scripts/pycompile.py ..
 > error:   File "/usr/lib/python2.7/site-packages/socketio/asyncio_server.py", line 84
 >     async def emit(self, event, data=None, to=None, room=None, skip_sid=None,
 >             ^
 > SyntaxError: invalid syntax

 > As a workaround, simply drop the unusable file from TARGET_DIR if building
 > for python 2.x.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.

-- 
Bye, Peter Korsgaard

      parent reply	other threads:[~2020-10-10 20:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-04 21:49 [Buildroot] [PATCH 1/2] python-socketio: drop asgi/asyncio files for python 2.x to fix pycompile issue Peter Korsgaard
2020-10-04 21:49 ` [Buildroot] [PATCH 2/2] python-engineio: drop asyncio " Peter Korsgaard
2020-10-10 20:59   ` Peter Korsgaard
2020-10-08 20:07 ` [Buildroot] [PATCH 1/2] python-socketio: drop asgi/asyncio " Thomas Petazzoni
2020-10-10 20:59 ` Peter Korsgaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877drxer0p.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.