chore(release): 2.0.0 - #125
Merged
Merged
Conversation
Carries the granular data scopes work and the removals that came with it. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Release 2.0.0
Estimated time to review: 3 min (XS)
One line in
pyproject.toml. The substance shipped in #123 and #124; this makes it installable.Major, because every integration has to change code and every one of their users has to re-consent. The notes below are the migration, ready to lift into the release.
Motivation
MYOB retired the
CompanyFilescope on 1 September 2026. Authorisation now asks for granular data scopes, which means a new consent from every existing user — there is no in-place upgrade for a token minted under the old scope. Nothing about that is a patch or a minor.Breaking changes
Scopes are now requested explicitly. The
scopekwarg (previously accepted and unused) isscopes, and takes members of the newAuthScope:Ask for the minimum: users see each scope on the consent screen.
AuthScope.COMPANY_FILEis needed by anything that resolves a business.Existing users must re-consent.
cred.urlnow carries the requested scopes andprompt=consent. Send users through it again; a token minted underCompanyFilecannot be upgraded in place.A business is identified by
businessIdoff the redirect.companyfiles.all()is gone, along with the endpoint behind it —GET /accountright/no longer returns a list. The authorisation redirect carriesbusinessIdandbusinessName; store thebusinessIdand pass it tocompanyfiles.get(business_id, call=False). It is the same GUID the company fileIdwas, so identifiers already on file stay valid.Companyfile username/password login is gone.
authenticate_companyfile()and thex-myobapi-cftokenheader it fed are removed; the OAuth token is sufficient.credentials.stateno longer writes acompanyfile_credentialskey, and the constructor still accepts (and ignores) one for this release, so state persisted by 1.x rebuilds without a data migration. That kwarg goes in the next release.Python 3.11 or newer. 3.10 reaches end of life in October 2026.
Verification
python -m unittest discover— 33 pass, on 3.11 through 3.14 in CI.hatch build -t wheeland confirm the wheel is namedpymyob-2.0.0.businessId, and a call throughcompanyfiles.get(business_id, call=False)succeeds.-via claude