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

Implementfrozendict forpartialobject in functools module #145478

Open
Labels
extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement
@bkap123

Description

@bkap123

Feature or enhancement

Proposal:

After discussion on PR#145362, it became clear that there are many possibilities for unintended mutations in thepartialobject inModule/_functoolsmodule.c, particularly for thekw dictionary for keywords. Thus, changingkw to be afrozendict could prevent any unintended consequences.

Additionally, right now, the keys ofkw could be an arbitraryPyObject, leading to unintended code execution if they are not strings. Thus, enforcing that the entries are strings could solve any future problems (similar to what happened in#145362).

Lastly, Issue#145446 also makes sure that there are no unintended mutations in thefunctools internals for free-threading, but changing to using afrozendict would be a more robust solution.

I will work on this and create a PR in the next couple of days. I will wait until#145446 is resolved to avoid any conflicts.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

#145362 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp