Skip to content

chore(release): 2.0.0 - #125

Merged
jarekwg merged 1 commit into
masterfrom
no-000/release-2-0-0
Aug 31, 2026
Merged

chore(release): 2.0.0#125
jarekwg merged 1 commit into
masterfrom
no-000/release-2-0-0

Conversation

@jarekwg

@jarekwg jarekwg commented Aug 31, 2026

Copy link
Copy Markdown
Member

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 CompanyFile scope 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 scope kwarg (previously accepted and unused) is scopes, and takes members of the new AuthScope:

from myob.constants import AuthScope

cred = PartnerCredentials(
    consumer_key=KEY,
    consumer_secret=SECRET,
    callback_uri=REDIRECT_URI,
    scopes=(AuthScope.COMPANY_FILE, AuthScope.SALES),
)

Ask for the minimum: users see each scope on the consent screen. AuthScope.COMPANY_FILE is needed by anything that resolves a business.

Existing users must re-consent. cred.url now carries the requested scopes and prompt=consent. Send users through it again; a token minted under CompanyFile cannot be upgraded in place.

A business is identified by businessId off the redirect. companyfiles.all() is gone, along with the endpoint behind it — GET /accountright/ no longer returns a list. The authorisation redirect carries businessId and businessName; store the businessId and pass it to companyfiles.get(business_id, call=False). It is the same GUID the company file Id was, so identifiers already on file stay valid.

Companyfile username/password login is gone. authenticate_companyfile() and the x-myobapi-cftoken header it fed are removed; the OAuth token is sufficient. credentials.state no longer writes a companyfile_credentials key, 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

  1. python -m unittest discover — 33 pass, on 3.11 through 3.14 in CI.
  2. hatch build -t wheel and confirm the wheel is named pymyob-2.0.0.
  3. Against a real key, run the migration above end to end: consent screen itemises the requested scopes, redirect carries businessId, and a call through companyfiles.get(business_id, call=False) succeeds.

-via claude

Carries the granular data scopes work and the removals that came with it.

Co-Authored-By: Claude <noreply@anthropic.com>
@jarekwg
jarekwg merged commit 88a3cad into master Aug 31, 2026
5 checks passed
@jarekwg
jarekwg deleted the no-000/release-2-0-0 branch August 31, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant