GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix partial in enum for Python 3.13 by cdce8p · Pull Request #1993 · rytilahti/python-miio

Conversation

@cdce8p

@cdce8p cdce8p commented Dec 14, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix Deprecation warning emitted by Python 3.13.1.

functools.partial will be a method descriptor in future Python versions;
wrap it in enum.member() if you want to preserve the old behavior

Ref: python/cpython#125316

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cdce8p
Fix partial in enum for Python 3.13
a657a8d
@codecov

codecov Bot commented Dec 14, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.26%. Comparing base (edb06c5) to head (a657a8d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1993   +/-   ##
=======================================
  Coverage   82.26%   82.26%           
=======================================
  Files         197      197           
  Lines       19139    19144    +5     
  Branches     1050     1052    +2     
=======================================
+ Hits        15744    15749    +5     
  Misses       3218     3218           
  Partials      177      177           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rytilahti rytilahti mentioned this pull request Jan 4, 2025
test_set_property_by[value_type4-1] fails on Python 3.13 #1997
Closed
@rytilahti rytilahti linked an issue Jan 4, 2025 that may be closed by this pull request
test_set_property_by[value_type4-1] fails on Python 3.13 #1997
Closed
rytilahti
rytilahti approved these changes Jan 4, 2025
View reviewed changes

@rytilahti rytilahti left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks @cdce8p, looks rather straight-forward! As this is only affecting the cli tool, I'm ready to merge it even though I haven't been able to test it against a real device.

Before doing that, should the check be against >=3.13 instead of 3.11, though?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rytilahti rytilahti added the bug label Jan 4, 2025
@cdce8p

cdce8p commented Jan 4, 2025

Copy link
Copy Markdown
Contributor Author

As this is only affecting the cli tool, I'm ready to merge it even though I haven't been able to test it against a real device.

Not sure about that. It has been a while but AFAIR I first saw the DeprecationWarning in the Home Assistant test suite.

Before doing that, should the check be against >=3.13 instead of 3.11, though?

Enum.member is available since 3.11 and from what I've read on the cpython issue, it's the "correct" way to do it anyway.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rytilahti

rytilahti commented Jan 4, 2025

Copy link
Copy Markdown
Owner

Fair enough, IIRC, this was just a hack to make the cli nicer to use, so if it doesn't work will need to revisit it (e.g., by converting away from the enum to simply use a dict for mapping).

cdce8p reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rytilahti
rytilahti merged commit 0aa4df3 into rytilahti:master Jan 4, 2025
@cdce8p
cdce8p deleted the fix-partial-3.13 branch January 4, 2025 00:30
This was referenced Jan 4, 2025
py.warnings in Log since update to 2025.1 #1998
Closed
FutureWarning: functools.partial will be a method descriptor in future Python versions; (MIIO) home-assistant/core#132902
Closed
@al-one al-one mentioned this pull request Mar 10, 2025
functools.partial will be a method descriptor in future al-one/hass-xiaomi-miot#2060
Closed
@github-actions github-actions Bot mentioned this pull request May 19, 2025
behavior Bool = partial(_str2bool) al-one/hass-xiaomi-miot#2515
Closed
@jonwaland

jonwaland commented Aug 12, 2025

Copy link
Copy Markdown

@rytilahti - if I read correctly, the fix has been merged, but a new version hasn't been released?

( hence the comments in home-assistant/core#132902 )

solazs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Aug 13, 2025
miio库未完全适配python3.13+版本 al-one/hass-xiaomi-miot#2601
Closed
@garry0garry

garry0garry commented Sep 13, 2025

Copy link
Copy Markdown

Is there any news on the topic "member()"?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garry0garry

garry0garry commented Sep 13, 2025

Copy link
Copy Markdown

home-assistant/core#132902 (comment)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@rytilahti rytilahti rytilahti approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

test_set_property_by[value_type4-1] fails on Python 3.13

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@cdce8p @rytilahti @jonwaland @garry0garry
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.