spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davies Liu <>
Subject Re: Spark 1.4.0 pyspark and pylint breaking
Date Tue, 26 May 2015 19:03:14 GMT
There is a module called 'types' in python 3:

davies@localhost:~/work/spark$ python3
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import types
>>> types
<module 'types' from

Without renaming, our `` will conflict with it when you run
unittests in pyspark/sql/ .

On Tue, May 26, 2015 at 11:57 AM, Justin Uang <> wrote:
> In commit 04e44b37, the migration to Python 3, pyspark/sql/ was
> renamed to pyspark/sql/ and then some magic in
> pyspark/sql/ dynamically renamed the module back to types. I
> imagine that this is some naming conflict with Python 3, but what was the
> error that showed up?
> The reason why I'm asking about this is because it's messing with pylint,
> since pylint cannot now statically find the module. I tried also importing
> the package so that __init__ would be run in a init-hook, but that isn't
> what the discovery mechanism is using. I imagine it's probably just crawling
> the directory structure.
> One way to work around this would be something akin to this
> (,
> where I would have to create a fake module, but I would probably be missing
> a ton of pylint features on users of that module, and it's pretty hacky.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message