Skip to content
← Back to activity

Public problem

Xendit Python fails with SyntaxError on Python 3.9 and below

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

The Xendit Python SDK used union type syntax (X | Y) in its models, which only works on Python 3.10 and newer. Users on Python 3.9 or below got a SyntaxError on import, even though the docs said 3.6 and up was supported. A maintainer acknowledged the mistake and confirmed the real minimum is Python 3.10, with a docs correction planned for the next release. The reporter upgraded to Python 3.10 and confirmed everything worked. So the fix is on the user side: run the SDK on Python 3.10+.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The SDK's models use X | Y union syntax, which requires Python 3.10 or newer, despite the old docs saying 3.6+. Fix: run your project on Python 3.10 or later. There is no way to make the current SDK import on 3.9 or below. The reporter upgraded to 3.10 and confirmed it worked, and the maintainer corrected the documented minimum. Source: https://github.com/xendit/xendit-python/issues/68