librelist archives

« back to archive

Python 3 support regression

Python 3 support regression

From:
Olivier Grisel
Date:
2012-02-10 @ 21:48
In the python 3 tests for scikit-learn, this new error has shown up recently:

  File 
"/home/slave/jenkins/workspace/python-3.2-numpy-1.6.1-scipy-0.10.0/build/py3k/sklearn/externals/joblib/__init__.py",
line 107, in <module>
    from .memory import Memory
  File 
"/home/slave/jenkins/workspace/python-3.2-numpy-1.6.1-scipy-0.10.0/build/py3k/sklearn/externals/joblib/memory.py",
line 37, in <module>
    from .hashing import hash
  File 
"/home/slave/jenkins/workspace/python-3.2-numpy-1.6.1-scipy-0.10.0/build/py3k/sklearn/externals/joblib/hashing.py",
line 26, in <module>
    class Hasher(pickle.Pickler):
  File 
"/home/slave/jenkins/workspace/python-3.2-numpy-1.6.1-scipy-0.10.0/build/py3k/sklearn/externals/joblib/hashing.py",
line 70, in Hasher
    dispatch = pickle.Pickler.dispatch.copy()
AttributeError: type object '_pickle.Pickler' has no attribute 'dispatch'

Full stacktrace here:

https://jenkins.shiningpanda.com/scikit-learn/job/python-3.2-numpy-1.6.1-scipy-0.10.0/229/console

I am too lazy to bisect the jenkins history but AFAIK this is quite a
recently introduced error.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Re: [joblib] Python 3 support regression

From:
Gael Varoquaux
Date:
2012-02-11 @ 12:41
On Fri, Feb 10, 2012 at 10:48:28PM +0100, Olivier Grisel wrote:
>     dispatch = pickle.Pickler.dispatch.copy()
> AttributeError: type object '_pickle.Pickler' has no attribute 'dispatch'

OK, the line causing this feature is simply meant to work around a bug in
IPython that prevents pickling objects defined interactively. I'll skip
it in Python 3: I think that the development versions of IPython have
fixed that bug.

Should I immediately do a release to port the fix to scikit-learn?

G

Re: [joblib] Python 3 support regression

From:
Olivier Grisel
Date:
2012-02-11 @ 12:44
2012/2/11 Gael Varoquaux <gael.varoquaux@normalesup.org>:
> On Fri, Feb 10, 2012 at 10:48:28PM +0100, Olivier Grisel wrote:
>>     dispatch = pickle.Pickler.dispatch.copy()
>> AttributeError: type object '_pickle.Pickler' has no attribute 'dispatch'
>
> OK, the line causing this feature is simply meant to work around a bug in
> IPython that prevents pickling objects defined interactively. I'll skip
> it in Python 3: I think that the development versions of IPython have
> fixed that bug.
>
> Should I immediately do a release to port the fix to scikit-learn?

It's not an emergency but this crash in the tests seems to shadow the
rest of the test errors in the python 3 jenkins job. This job is nice
for people who would like to contribute python 3 support fixes for
scikit learn. However I plan to work on other think this WE (need to
work on that PyCon tutorial) so this is not an emergency for me.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Re: [joblib] Python 3 support regression

From:
Olivier Grisel
Date:
2012-02-11 @ 12:45
2012/2/11 Olivier Grisel <olivier.grisel@ensta.org>:

> It's not an emergency but this crash in the tests seems to shadow the
> rest of the test errors in the python 3 jenkins job. This job is nice
> for people who would like to contribute python 3 support fixes for
> scikit learn. However I plan to work on other think

 => things ....

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Re: [joblib] Python 3 support regression

From:
Gael Varoquaux
Date:
2012-02-11 @ 12:46
On Sat, Feb 11, 2012 at 01:44:14PM +0100, Olivier Grisel wrote:
> > Should I immediately do a release to port the fix to scikit-learn?

> It's not an emergency but this crash in the tests seems to shadow the
> rest of the test errors in the python 3 jenkins job. This job is nice
> for people who would like to contribute python 3 support fixes for
> scikit learn. However I plan to work on other think this WE (need to
> work on that PyCon tutorial) so this is not an emergency for me.

Actually, I don't like having joblib broken under Python 3. This is not
good maintenance, so I think that I'll do a bugfix release.

G

Re: [joblib] Python 3 support regression

From:
Gael Varoquaux
Date:
2012-02-11 @ 12:35
Darn, I would need to set up a jenkins buildbot for joblib.