Skip to content

Remove the 'UUIDLike' type alias (v4 branch) - #1262

Merged
sirosen merged 1 commit into
globus:4.x-devfrom
sirosen:fix-type-aliases
Jul 17, 2025
Merged

Remove the 'UUIDLike' type alias (v4 branch)#1262
sirosen merged 1 commit into
globus:4.x-devfrom
sirosen:fix-type-aliases

Conversation

@sirosen

@sirosen sirosen commented Jul 16, 2025

Copy link
Copy Markdown
Member

This work is based on #1245 and is effectively a cherry-pick of #1258.

Applying this in both places should hopefully reduce conflicts when the branches are merged.


📚 Documentation preview 📚: https://globus-sdk-python--1262.org.readthedocs.build/en/1262/

@sirosen sirosen added the no-news-is-good-news This change does not require a news file label Jul 16, 2025
@sirosen
sirosen force-pushed the fix-type-aliases branch 4 times, most recently from a639732 to e096fff Compare July 16, 2025 19:36
@sirosen
sirosen marked this pull request as ready for review July 16, 2025 19:36
kurtmckee
kurtmckee previously approved these changes Jul 16, 2025
@kurtmckee
kurtmckee dismissed their stale review July 16, 2025 22:12

Test suite is failing

This is not strictly necessary and importantly it isn't interpreted as
we'd like by Sphinx, so users are seeing the `UUIDLike` name in our
docs instead of the union.

Use `Union` rather than `UnionType` in tests which have a runtime
context.
@sirosen
sirosen force-pushed the fix-type-aliases branch from e096fff to 3eddb61 Compare July 17, 2025 16:30
@sirosen

sirosen commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

Just for interest, the last logical conflict I had to fix here was UUID | str being used (accidentally, via my find-and-replace) in a runtime context in tests. It's one of the GCS test files, here's an example of one of the usages:

("identity_id", (t.Union[uuid.UUID, str], MissingType)),

Using typing.Union rather than types.UnionType is the simplest answer. 😁

@sirosen
sirosen merged commit d0a97d2 into globus:4.x-dev Jul 17, 2025
7 checks passed
@sirosen
sirosen deleted the fix-type-aliases branch July 17, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-news-is-good-news This change does not require a news file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants