Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Flandrin <lionel@svkt.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] python-flask: bump to version 0.12
Date: Wed, 25 Jan 2017 11:22:28 +0100	[thread overview]
Message-ID: <20170125102228.ykcq4xsa5xnp7yar@ed> (raw)
In-Reply-To: <CAGm1_ku-nNH0va1aACBvcea6ypYg6R_U7jjAzOktxav0cBvjjA@mail.gmail.com>

On Wed, Jan 25, 2017 at 11:11:43AM +0100, Yegor Yefremov wrote:
> On Wed, Jan 25, 2017 at 10:58 AM, Lionel Flandrin <lflandrin@ereca.fr> wrote:
> > On Wed, Jan 25, 2017 at 10:46:03AM +0100, Yegor Yefremov wrote:
> >> On Wed, Jan 25, 2017 at 10:18 AM, Lionel Flandrin <lionel@svkt.org> wrote:
> >> > On Wed, Jan 25, 2017 at 10:09:42AM +0100, Yegor Yefremov wrote:
> >> >> On Wed, Jan 25, 2017 at 10:01 AM, Lionel Flandrin <lionel@svkt.org> wrote:
> >> >> > Signed-off-by: Lionel Flandrin <lionel@svkt.org>
> >> >>
> >> >> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
> >> >>
> >> >> Care to update jinja as well https://github.com/pallets/jinja/releases
> >> >>
> >> >> Yegor
> >> >
> >> > I tried to do so but I got a nasty error:
> >> >
> >> >   Traceback (most recent call last):
> >> >     File "/home/lionel/src/ambix/buildroot/output/host/usr/lib/python3.5/py_compile.py", line 125, in compile
> >> >       _optimize=optimize)
> >> >     File "<frozen importlib._bootstrap_external>", line 700, in source_to_code
> >> >     File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
> >> >     File "/home/lionel/src/ambix/buildroot/output/target/usr/lib/python3.5/site-packages/jinja2/asyncfilters.py", line 24
> >> >   SyntaxError: 'yield' inside async function
> >> >
> >> > I asked on IRC and I've been told that:
> >> >
> >> > < mitsuhiko> simias: this is not a problem with jinja
> >> > < mitsuhiko> it's a limitation in whatever build tool you use
> >> > < mitsuhiko> pip deals with that
> >> > < mitsuhiko> you can ignore it. it's a warning basically
> >> >
> >> > So I'll have to dig a bit deeper to understand what's going wrong here.
> >>
> >> It seems like this will be working for Python 3.6 only [1]. And I
> >> doubt it will be working in Python 2 at all.
> >>
> >> So let's wait for an official release and take a look at this then.
> >>
> >> [1] http://stackoverflow.com/questions/37549846/how-to-use-yield-inside-async-function
> >
> > It's my understanding that jinja2 should work with Python 2 and 3
> > though. I just did a quick test with pip in a python 2 environment:
> >
> > (test-venv) $ pip --version
> >   pip 9.0.1 from /tmp/test-venv/local/lib/python2.7/site-packages (python 2.7)
> >
> > (test-venv) {lionel at ed}% pip install jinja2
> >   Collecting jinja2
> >     Using cached Jinja2-2.9.4-py2.py3-none-any.whl
> >   Collecting MarkupSafe>=0.23 (from jinja2)
> >     Using cached MarkupSafe-0.23.tar.gz
> >   Building wheels for collected packages: MarkupSafe
> >     Running setup.py bdist_wheel for MarkupSafe ... done
> >     Stored in directory: /home/lionel/.cache/pip/wheels/a3/fa/dc/0198eed9ad95489b8a4f45d14dd5d2aee3f8984e46862c5748
> >   Successfully built MarkupSafe
> >   Installing collected packages: MarkupSafe, jinja2
> >   Successfully installed MarkupSafe-0.23 jinja2-2.9.4
> >
> > (test-venv) $ python
> >   Python 2.7.13 (default, Dec 18 2016, 20:19:42)
> >   [GCC 6.2.1 20161215] on linux2
> >   Type "help", "copyright", "credits" or "license" for more information.
> >   >>> import pkg_resources
> >   >>> pkg_resources.get_distribution("jinja2")
> >   Jinja2 2.9.4 (/tmp/test-venv/lib/python2.7/site-packages)
> >   >>> import jinja2
> >   >>> jinja2.Environment()
> >   <jinja2.environment.Environment object@0x7f2ba06d3590>
> >
> > I'm a newbie in python though, sorry if I'm missing something obvious.
> 
> Python in BR is "very" different from your pip environment . In BR, if
> you tell BR to compile *.py files, it will compile them all and also
> break, if an error occurs. During this compilation all syntax error
> will trigger compilation abort. But in normal case, where you make
> this manually such errors will be just warnings.
> 
> So as long as you don't invoke these async filters, you most likely
> won't trigger this syntax error.

I see. Do you think it would be worth adding a BR patch to disable
this portion of the code? When python 3.6 is integrated we could make
it optional. We'll need something like that if we want to keep python2
compat anyway.

-- 
Lionel Flandrin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170125/9044ba95/attachment.asc>

  reply	other threads:[~2017-01-25 10:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  9:01 [Buildroot] [PATCH 1/2] python-flask: bump to version 0.12 Lionel Flandrin
2017-01-25  9:01 ` [Buildroot] [PATCH 2/2] DEVELOPERS: Add Lionel FLandrin for package/flask Lionel Flandrin
2017-01-27  8:01   ` Thomas Petazzoni
2017-01-25  9:09 ` [Buildroot] [PATCH 1/2] python-flask: bump to version 0.12 Yegor Yefremov
2017-01-25  9:18   ` Lionel Flandrin
2017-01-25  9:46     ` Yegor Yefremov
     [not found]       ` <20170125095858.x6lh5xjwby5lav3m@ed>
2017-01-25 10:11         ` Yegor Yefremov
2017-01-25 10:22           ` Lionel Flandrin [this message]
2017-01-25 10:24             ` Yegor Yefremov
2017-01-25 12:16               ` Lionel Flandrin
2017-01-25 12:52                 ` Yegor Yefremov
2017-01-25 13:02                   ` Lionel Flandrin
2017-01-25 14:19                     ` Yegor Yefremov
2017-01-25 14:50                       ` Lionel Flandrin
2017-01-25 23:59                         ` Thomas Petazzoni
2017-01-26 12:18   ` Lionel Flandrin
2017-01-27  8:01 ` Thomas Petazzoni

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=20170125102228.ykcq4xsa5xnp7yar@ed \
    --to=lionel@svkt.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox