On Jul 8, 2013 10:59 PM, "Bram Moolenaar" <[email protected]> wrote:
>
>
> Nikolay Pavlov wrote:
>
> > On Jul 8, 2013 8:06 PM, "glts" <[email protected]> wrote:
> > >
> > > On Saturday, July 6, 2013 3:59:06 PM UTC+2, Bram Moolenaar wrote:
> > > > Announcing:  Vim (Vi IMproved) version 7.4a BETA
> > > >
> > > >
> > > > This is the first BETA release of Vim 7.4.
> > > >
> > > > Please check that the distribution is OK.  I haven't done one for a
long
> > > > time.  Report anything that isn't right.  That includes a crash but
also
> > > > a typo in the documentation or a missing file.
> > >
> > > What was the last word on test86?
> > >
> > > It fails for me on Ubuntu 12.04 with 7.4a and --enable-pythoninterp.
But
> > > that is expected, or is it not? And there is no workaround to make it
> > > green for the release?
> >
> > For me it seems to be an Ubuntu bug. I have suggested two workarounds in
> > the relevant thread, but that message was not replied to regarding what
> > should actually be done.
>
> It's related to using the static library.  Since many Linux users will
> have this problem it would be better to fix it in Vim, we can't expect
> everybody to fix their Python package.

I have suggested a number of solutions. I would prefer failing to build
with semi-static python if problem is detected. I.e. it would mean that
maintainers of vim packages in distributions having this problem will be
forced to decide whether they will fix python library or build with dynamic
linking. Other solution is a badly looking hack.

And it is *not* related to *only* using static library. There must be
specific linking flag passed for the problem to be seen. It should also
affect any program that embeds python interpreter and uses PyIter_Check
(and maybe some other macros I am not aware about that uses pointer to some
function). Apparently there are not many: normally for this kind of things
EAFP* principle is used meaning that one first tries using object as an
iterator and if this fails switches to some alternative.

* Easier to Ask for Forgiveness then for Permission: like below

    #EAFP
    try:
        run(d[key])
    except KeyError:
        handle_missing_key()

    #non-EAFP
    if key in d:
        run(d[key])
    else:
        handle_missing_key()

> It's really a problem with the test, since it passes fine with the
> dynamic library.  It's not that the Python interface is broken.

No, it is not a problem with a test. As PyIter_Check always succeeds it
disables all subsequent checks (AFAIR for numbers using number protocol).
This means there will be bugs under certain condition. I can move these
checks up in order to make problem less severe (this will make python throw
exception from the different location and execute some unnecessary code,
that's all).

> --
> My Go, this amn keyboar oesn't have a .
>
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net
\\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/\\\
> \\\  an exciting new programming language -- http://www.Zimbu.org
 ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org
 ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui