-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump bring-api to 0.5.4 #111654
Bump bring-api to 0.5.4 #111654
Conversation
Hey there @miaucl, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hi @tr4nt0r , will this solve the issue that my items inside home assistant shows a german name for items, and inside my app is my mother language pt-br ? |
Have a look here: home-assistant/home-assistant.io#31655 |
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.
Please fix the mypy issues
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
will do, already on it 👍🏽 |
Is this a breaking change for the users? |
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.
Your library is doing IO inside an async function, which will block the event loop.
Please run IO code in the executor and not in the event loop.
This is a follow-up to this issue: But as #111149 hasn't been shipped to the user either, i would definitely say no. |
@edenhaus Please explain, what do you mean with IO? Api exchange is performed using aiohttp and should be non-blocking. |
@edenhaus Sorry, I'm pretty new to python development. I rewrote the IO part to be executed with run_in_executor. Hope that is what you meant: |
File operations are also blocking and the link points to a location, where the localization file is open and read. @tr4nt0r No problem :) I'm here to review and we can solve the issues together :) |
Ooooh, the file handler hast to be closed 🤦♂️ |
The changes looks good. Please bump the api to a version, where the fix included. Afterwards please click "ready to review" |
no, sorry, it doesn't have to, the with-statement does it already :D |
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 @tr4nt0r 👍
Proposed change
Version 0.5.3 adds a new method that allows it to interact with the Bring API in the same way as the mobile apps and therefore it is now possible to use the uuid of items as unique identifiers (API Endpoints used by the webApp did not expose the item uuid). This allows it do add multiple items with the same name but different descriptions (specifications), an issue that a user tried to fix in this PR:
Additionally the bring-api is now packaged with translation tables. The translation tables that are used by the webApp and were downloaded in the bring-api library before, but are outdated and differ slightly from the translation tables used in the mobile apps.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: