Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

_struct.Struct should be immutable, missing Py_TPFLAGS_IMMUTABLETYPE flag #94254

Closed
Assignees
kumaraditya303
Labels
extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error
@kumaraditya303

Description

@kumaraditya303

In Python 3.8:

Python 3.8.12 (default, Oct  4 2021, 15:56:52)[GCC 9.3.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import _struct>>> _struct.Struct.x = 1Traceback (most recent call last):  File "<stdin>", line 1, in <module>TypeError: can't set attributes of built-in/extension type 'Struct'>>>

On main:

Python 3.12.0a0 (heads/gh-94207-fix-struct-module-leak:9d41baebd0, Jun 25 2022, 07:23:49) [GCC 9.4.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import _struct>>> _struct.Struct.x=1>>> _struct.Struct.x1

This happens because_struct.Struct is missingPy_TPFLAGS_IMMUTABLETYPE in type flags.

cc:@erlend-aasland@encukou

Metadata

Metadata

Labels

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp