Skip to content

Fix method check for partialmethod attribute#46

Open
xsro wants to merge 1 commit into
artificial-intelligence-class:mainfrom
xsro:patch-1
Open

Fix method check for partialmethod attribute#46
xsro wants to merge 1 commit into
artificial-intelligence-class:mainfrom
xsro:patch-1

Conversation

@xsro

@xsro xsro commented Jan 31, 2026

Copy link
Copy Markdown

Thank you for maintaining such a great project!

I tested this library with the Bolts robot and encountered a small compatibility issue related to Python's partialmethod implementation.

As Python 3.10 renamed the internal _partialmethod (single underscore) to __partialmethod__ (double underscores) for stronger encapsulation of its functools.partialmethod underpinning, this causes compatibility gaps across different Python versions.

This patch addresses the issue by properly checking the parent of partialmethod to support both the old and new internal identifiers, ensuring broader Python version compatibility.

Would you consider merging this fix?

@superfashi

Copy link
Copy Markdown
Member

Hi, thank you for the PR but unfortunately this project is right now unmaintained (I believe).

That being said, I think we could still merge your PR.

I did some test myself on Python 3.12 and it seems like functools.partialmethod still gives _partialmethod as attribute. Could you tell me what went wrong in your environment?

@xsro

xsro commented Feb 2, 2026

Copy link
Copy Markdown
Author

Sorry, AI tells me it changes since 3.10. I check the python's commit history and find it is updated in 3.13.0 with BOP38364. The official changelog is documented in 3.13

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants