Skip to content

"import cloudpickle" fails with Python-3.8.0a4 #266

Closed

Description

@stonebig

when trying this on python-3.8.0a4 and cloudpickle-1.0.0, on Windows:

import cloudpickle

I get that error:

image

Activity

  1. changed the title [-]compatiblity issue with Python-3.8.0a4 ?[/-] [+]"import cloudpickle" fails with Python-3.8.0a4[/+] on May 11, 2019
  2. stonebig commented on May 11, 2019

    @stonebig
    Author

    when I add a print.. well, I don't quite understand what I see:

        else:
            print (
                co.co_argcount,
                co.co_kwonlyargcount,
                co.co_nlocals,
                co.co_stacksize,
                co.co_flags,
                co.co_code,
                co.co_consts,
                co.co_names,
                co.co_varnames,
                co.co_filename,
                co.co_name,
                co.co_firstlineno,
                co.co_lnotab,
                co.co_cellvars)
    
    >>> import cloudpickle
    1 0 1 3 19 b'\x87\x00f\x01d\x01d\x02\x84\x08\x01\x00|\x00\x89\x00d\x00S\x00' (None, <code object <lambda> at 0x0000016EC17B1328, file "C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py", line 107>, '_make_cell_set_template_code.<locals>.inner.<locals>.<lambda>') () ('value',) C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py inner 106 b'\x00\x01\x0c\x01' ('cell',)
    Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        import cloudpickle
      File "C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\__init__.py", line 3, in <module>
        from cloudpickle.cloudpickle import *
      File "C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py", line 167, in <module>
        _cell_set_template_code = _make_cell_set_template_code()
      File "C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py", line 148, in _make_cell_set_template_code
        return types.CodeType(
    TypeError: an integer is required (got type bytes)
    
  3. stonebig commented on May 11, 2019

    @stonebig
    Author

    posted also on https://bugs.python.org/issue36886 , as maybe it's a python issue

  4. stonebig commented on May 11, 2019

    @stonebig
    Author

    There may be code to change because of PEP 570, which added a parameter to the function that is used in Types module https://github.com/python/cpython/pull/12701/files#diff-cb0b9d6312c0d67f6d4aa1966766ceddL27

  5. stonebig commented on May 11, 2019

    @stonebig
    Author

    would it be possible to include the change in vendored joblib ?

  6. added a commit that references this issue on Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions