dask / dask-jobqueue

Deploy Dask on job schedulers like PBS, SLURM, and SGE
https://jobqueue.dask.org
BSD 3-Clause "New" or "Revised" License
234 stars 143 forks source link

Python 2: AttributeError: attribute '__doc__' of 'type' objects is not writable #35

Closed lesteve closed 6 years ago

lesteve commented 6 years ago

Maybe related to https://github.com/dask/dask-jobqueue/issues/31#issuecomment-380869544.

conda create -n tmp27 dask distributed pytest docrep python=2 ipython -c conda-forge -y
source activate tmp27
ipython -c 'import dask_jobqueue'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-8ca2c7c93177> in <module>()
----> 1 import dask_jobqueue

/home/lesteve/dev/dask-jobqueue/dask_jobqueue/__init__.py in <module>()
      1 # flake8: noqa
      2 from .core import JobQueueCluster
----> 3 from .pbs import PBSCluster
      4 from .slurm import SLURMCluster
      5 from .sge import SGECluster

/home/lesteve/dev/dask-jobqueue/dask_jobqueue/pbs.py in <module>()
      9 
     10 @docstrings.with_indent(4)
---> 11 class PBSCluster(JobQueueCluster):
     12     """ Launch Dask on a PBS cluster
     13 

/home/lesteve/miniconda3/envs/tmp27/lib/python2.7/site-packages/docrep/__init__.pyc in replace(func)
    374                 func = func.im_func
    375             func.__doc__ = func.__doc__ and self.with_indents(
--> 376                 func.__doc__, indent=indent, stacklevel=4)
    377             return func
    378         return replace

AttributeError: attribute '__doc__' of 'type' objects is not writable

I haven't looked into it in more details, I would expect a Python 2 related bug in docrep.

lesteve commented 6 years ago

Also my guess is that the reason we do not have the problem on CIs is because we always install python 3 in the docker images.

guillaumeeb commented 6 years ago

Thanks for isolating this @lesteve. I believe your guess is right for CI. I'm trying to add a separate test for python 2.7 in #29. Next work will be to solve this, will see if I have some time for that.

guillaumeeb commented 6 years ago

@lesteve, for the CI problem, you should maybe open an issue? As it is, we at least have to remove the useless python 2.7 and SGE test from the travis matrix. But we should probably be working on a different or customizable Docker environment.

lesteve commented 6 years ago

FYI I opened this docrep issue.

guillaumeeb commented 6 years ago

Sorry, forgot to mention that I had already opened one...

Le mer. 18 avr. 2018 à 11:34, Loïc Estève notifications@github.com a écrit :

FYI I opened this docrep issue https://github.com/Chilipp/docrep/issues/6.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dask/dask-jobqueue/issues/35#issuecomment-382326518, or mute the thread https://github.com/notifications/unsubscribe-auth/AQWDmyTnwpprAhkKJMnmKVhLuahVoax2ks5tpwirgaJpZM4TX78u .

lesteve commented 6 years ago

OK my bad as often I probably forgot to search in the existing closed issues ...

lesteve commented 6 years ago

This was closed by #39.