← 输入框|github.com|刷新
Skip to content

issue with Python-3.8.0a4 #11719

Closed
Closed

Description

@stonebig

a bit like for cloupickle cloudpipe/cloudpickle#266, I get this error when trying a basic function

import asyncio 

await asyncio.sleep(0)
`---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\IPython\core\interactiveshell.py in removed_co_newlocals(function)
    139     CO_NEWLOCALS = 0x0002
    140     code = function.__code__
--> 141     new_code = CodeType(
    142         code.co_argcount,
    143         code.co_kwonlyargcount,

TypeError: an integer is required (got type bytes)`

image

Activity

  1. stonebig commented on May 11, 2019

    @stonebig
    ContributorAuthor

    https://bugs.python.org/issue36886

    It's apparently PEP 570 effect

  2. stonebig commented on May 11, 2019

    @stonebig
    ContributorAuthor

    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

  3. stonebig commented on May 11, 2019

    @stonebig
    ContributorAuthor
  4. Carreau commented on May 11, 2019

    @Carreau
    Member

    I'm trying to get top-level await as a native CPython thing see python/cpython#13148 and #11713,
    If that's goes in I guess 11720 will not be necessary – so apologies if it sits there a bit.

  5. MrMino commented on Mar 27, 2022

    @MrMino
    Member

    This issue is no longer reproducible; I'm assuming it has been fixed by #11713.

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