Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

3.12.0b4 enum.IntFlag NoneType object is not iterable #106928

Copy link
Copy link
@cdce8p

Description

@cdce8p
Issue body actions

Bug report

import enum

class bitmap(enum.IntFlag):
    pass

print(bitmap.from_bytes(b'\x00', 'little'))

3.11

bitmap(0)

3.12.0b4

Traceback (most recent call last):
  File "/.../cpython/test.py", line 6, in <module>
    print(bitmap.from_bytes(b'\x00', 'little'))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../cpython/Lib/enum.py", line 742, in __call__
    return cls._create_(
           ^^^^^^^^^^^^^
  File "/.../cpython/Lib/enum.py", line 870, in _create_
    for item in names:
TypeError: 'NoneType' object is not iterable

I bisected the issue to #99500.
/CC: @ethanfurman

Your environment

  • CPython versions tested on: 3.12.0b4
  • Operating system and architecture: macOS ARM64
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
No fields configured for issues without a type.

Projects

Status
Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.