Problem with Python 3.4

223 views
Skip to first unread message

İsmail Dönmez

unread,
Feb 13, 2014, 4:44:24 AM2/13/14
to vim...@vim.org
Hi,

When compiled against Python 3.4, vim (7.4.178) test87 fails with:


< import xxx_no_such_module_xxx:(<class 'ImportError'>,
ImportError('spec missing loader',))
< import failing_import:(<class 'ImportError'>, ImportError('spec
missing loader',))
---
> import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
> import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))

At first look this looks like change in exception message but the
issue might be more complicated. It seems that imp.find_module is now
deprecated and should be replaced by importlib.util.find_spec instead.
The error message is coming from importlib.util.find_spec function. So
it might be that imp.find_module is now deprecated and broken.

Any ideas?

Regards,
ismail

İsmail Dönmez

unread,
Feb 20, 2014, 4:45:31 AM2/20/14
to vim...@googlegroups.com, vim...@vim.org
Any ideas on this one? This is blocking Python 3.4 update for openSUSE 13.2.

Tony Mechelynck

unread,
Feb 20, 2014, 5:12:59 AM2/20/14
to vim...@googlegroups.com
On 20/02/14 10:45, İsmail Dönmez wrote:
> Any ideas on this one? This is blocking Python 3.4 update for openSUSE 13.2.
>
> On Thursday, February 13, 2014 11:44:24 AM UTC+2, İsmail Dönmez wrote:
>> Hi,
>>
>>
>>
>> When compiled against Python 3.4, vim (7.4.178) test87 fails with:

There have been several Python-related bugfixes recently; 7.4.181 was
one of them.

If your openSUSE or SUSE Enterprise Linux hasn't yet got them, I
recommend that you compile your own Vim, it isn't very hard. See:

http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

Best regards,
Tony.
--
I never thought that I'd see the day where Netscape is free software and
X11 is proprietary. We live in interesting times.
-- Matt Kimball <mkim...@xmission.com>


İsmail Dönmez

unread,
Feb 20, 2014, 5:19:27 AM2/20/14
to vim...@googlegroups.com
Hi Tony,


On Thu, Feb 20, 2014 at 12:12 PM, Tony Mechelynck <antoine.m...@gmail.com> wrote:
On 20/02/14 10:45, İsmail Dönmez wrote:
Any ideas on this one? This is blocking Python 3.4 update for openSUSE 13.2.

On Thursday, February 13, 2014 11:44:24 AM UTC+2, İsmail Dönmez wrote:
Hi,



When compiled against Python 3.4, vim (7.4.178) test87 fails with:

There have been several Python-related bugfixes recently; 7.4.181 was one of them.

If your openSUSE or SUSE Enterprise Linux hasn't yet got them, I recommend that you compile your own Vim, it isn't very hard. See:

        http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
        http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

I am the vim maintainer for openSUSE and SUSE Enterprise Linux so its not that hard for me to test latest patches :-)

But sadly going up to .182 doesn't fix the problem.

Thanks.
 

Marius Gedminas

unread,
Feb 20, 2014, 10:27:56 AM2/20/14
to vim...@googlegroups.com
On Thu, Feb 20, 2014 at 12:19:27PM +0200, İsmail Dönmez wrote:
> I am the vim maintainer for openSUSE and SUSE Enterprise Linux so its not
> that hard for me to test latest patches :-)
>
> But sadly going up to .182 doesn't fix the problem.

Ok, so vim implements a special module loader that can look for Python
modules in runtimepath. This is described by :h python-special-path

Now Python 3.4 changed the import machinery a bit, as described by PEP 451:
http://legacy.python.org/dev/peps/pep-0451/

This PEP claims that it is fully backwards-compatible[1][2], which doesn't
appear to be the case. Maybe file a Python bug about this?

[1] http://legacy.python.org/dev/peps/pep-0451/#what-will-existing-finders-and-loaders-have-to-do-differently
[2] http://legacy.python.org/dev/peps/pep-0451/#backward-compatibility

I'm not very familiar with either codebase (vim or CPython), and despite
working with Python for over 10 years I never felt the need to implement
a custom module finder/loader. I'm not sure how much of a help I can
be...

Marius Gedminas
--
At one job, for a short time my desktop HP (running HPUX) was being used as a
print server. I soon found out that having something heavy in front of the plug
was a good idea, after kicking it out of the outlet a couple of times. I used
my old TRS-80 4P, doubtless the slowest computer ever to perform a critical
function at that company.
-- David Thornley
signature.asc

Yukihiro Nakadaira

unread,
Feb 24, 2014, 10:39:20 PM2/24/14
to vim...@googlegroups.com
reported to python bug tracker http://bugs.python.org/issue20763

--
Yukihiro Nakadaira - yukihiro....@gmail.com

İsmail Dönmez

unread,
Feb 25, 2014, 3:37:10 AM2/25/14
to vim...@googlegroups.com

Great testcase. Thanks!

--
--
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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/RfuOG7_Jabs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages