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

GH-140590: Fix setstate for functools.partial C-module#140671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@sergey-miryanov
Copy link
Contributor

@sergey-miryanovsergey-miryanov commentedOct 27, 2025
edited by bedevere-appbot
Loading

There is a missing check for thenamespace.

@sergey-miryanovsergey-miryanov added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsOct 27, 2025
@sergey-miryanovsergey-miryanov marked this pull request as ready for reviewOctober 27, 2025 13:30
@sergey-miryanov
Copy link
ContributorAuthor

It is ready for review, could you please take a look.

@sergey-miryanov
Copy link
ContributorAuthor

Python version has this check already, but C version missing it:

        if (not callable(func) or not isinstance(args, tuple) or           (kwds is not None and not isinstance(kwds, dict)) or           (namespace is not None and not isinstance(namespace, dict))):            raise TypeError("invalid partial state")

Copy link
Member

@efimov-mikhailefimov-mikhail left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, I have just one comment on the style.

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
@encukouencukou merged commitd26686a intopython:mainOct 28, 2025
53 checks passed
@miss-islington-app
Copy link

Thanks@sergey-miryanov for the PR, and@encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 28, 2025
…H-140671)(cherry picked from commitd26686a)Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 28, 2025
…H-140671)(cherry picked from commitd26686a)Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
@bedevere-app
Copy link

GH-140698 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelOct 28, 2025
@bedevere-app
Copy link

GH-140699 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelOct 28, 2025
kumaraditya303 pushed a commit that referenced this pull requestOct 28, 2025
) (#140699)GH-140590: Fix setstate for functools.partial C-module (GH-140671)(cherry picked from commitd26686a)Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
kumaraditya303 pushed a commit that referenced this pull requestOct 28, 2025
) (#140698)GH-140590: Fix setstate for functools.partial C-module (GH-140671)(cherry picked from commitd26686a)Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotARM64 macOS 3.13 (tier-2) has failed when building commitbec053c.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1404/builds/1360) and take a look at the build logs.
  4. Check if the failure is related to this commit (bec053c) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1404/builds/1360

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/contextlib.py", line136, in__enter__def__enter__(self):ResourceWarning:unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 56972), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56980), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/contextlib.py", line136, in__enter__def__enter__(self):ResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56980), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 56986), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/contextlib.py", line136, in__enter__def__enter__(self):ResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 56986), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 56988), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 56988), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56990), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56990), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 57016), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57018), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57018), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 56968), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56970), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56970), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 57029), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 57031), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 57031), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 56982), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 56984), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 56984), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57023), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 57025), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 57025), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line845, ingc_collect    gc.collect()ResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 57040), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/socket_helper.py", line225, intransient_internet    captured_errnos= [getattr(errno, name, num)ResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 57020), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57027), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/socket_helper.py", line225, intransient_internet    captured_errnos= [getattr(errno, name, num)ResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57027), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 57033), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/socket_helper.py", line225, intransient_internet    captured_errnos= [getattr(errno, name, num)ResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 57033), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 57036), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 57036), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57038), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 57038), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line845, ingc_collect    gc.collect()ResourceWarning:unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 56992), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 56976), raddr=('68.183.26.59', 21)>Warning -- Unraisable exceptionException ignored in: <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 56978), raddr=('68.183.26.59', 21)>Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/socket.py", line790, incloseself._sock=NoneResourceWarning:unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 56978), raddr=('68.183.26.59', 21)>skipped "Resource 'ftp://www.pythontest.net/' is not available"

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@efimov-mikhailefimov-mikhailefimov-mikhail approved these changes

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@sergey-miryanov@bedevere-bot@efimov-mikhail@kumaraditya303@encukou

[8]ページ先頭

©2009-2025 Movatter.jp