Globus Python SDK v4.2.0 Release

10 views
Skip to first unread message

Stephen Rosen

unread,
Dec 3, 2025, 6:19:38 PM (9 days ago) Dec 3
to Globus Discuss
Hi all,


We've just released a new version of the Python globus-sdk package, v4.2.0, and it includes some new features which we think are particularly noteworthy.

1. Support for closing clients and closing apps.

An issue we've noticed with previous SDK versions is that there are a number of scenarios in which resource handles (open files, open network connections) can leak in user applications. These are usually cleaned up correctly when applications exit or garbage collect, but it's better to control when resources are closed.

Globus App and Client objects have two new APIs to support better resource management.
- Apps and clients now provide close(), an imperative method which closes open resources associated with the app or client.
- Apps and clients can now be used as context managers (the with statement) and will automatically close when exited.

Most of our examples and documentation have been updated to show this usage. For example, if you revisit our minimal script example in the tutorial, you'll now see a version of it "with context managers".

2. Support for automatic login in response to Globus Auth Requirements Errors (GAREs).

One of our goals when we introduced the GlobusApp abstraction in the SDK was to allow Python users to "someday" automatically trigger logins. We're very excited to reach this milestone!

When configured to "redrive" GAREs, an app will check all HTTP errors with status code 403 to see if they can be parsed as a GARE. If one is detected during a client's request retry cycle, the app will immediately run a login flow based on the requirements and signal the client to continue retrying.

Because this is a backwards incompatible behavior change, the option is off by default. To turn it on, check out the docs on integrating GAREs with GlobusApps.


Thanks,
-Stephen
Reply all
Reply to author
Forward
0 new messages