Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support py312 #306

Merged
merged 18 commits into from
Nov 14, 2024
Merged

support py312 #306

merged 18 commits into from
Nov 14, 2024

Conversation

jctanner
Copy link
Collaborator

@jctanner jctanner commented Nov 7, 2024

No-Issue

Signed-off-by: James Tanner <[email protected]>
@jctanner jctanner marked this pull request as draft November 7, 2024 18:43
@jctanner jctanner changed the title Initial support for py3.12 [WIP] support for py312 Nov 7, 2024
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
@jctanner jctanner marked this pull request as ready for review November 11, 2024 13:54
@jctanner jctanner changed the title [WIP] support for py312 support py312 Nov 11, 2024
@jctanner jctanner requested a review from a team November 11, 2024 14:15
@jctanner jctanner marked this pull request as draft November 11, 2024 14:21
@jctanner jctanner changed the title support py312 [WIP] support py312 Nov 11, 2024
Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
@jctanner jctanner marked this pull request as ready for review November 12, 2024 22:19
@jctanner jctanner changed the title [WIP] support py312 support py312 Nov 12, 2024
@jctanner jctanner requested a review from a team November 12, 2024 22:19


@contextmanager
def resource_stream_compat(package, resource_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the purpose of this function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it made more sense when i was trying to have it dynamically use pkg_resources if available ... however, as you point out, it's unnecessary now. I'll remove it.

str: The file path to the resource.
"""
# Fallback to importlib.resources if pkg_resources is not available
temp_dir = tempfile.mkdtemp()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use tempfile.TemporaryDirectory that implements context-manager protocol.

https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory

No-Issue

Signed-off-by: James Tanner <[email protected]>
No-Issue

Signed-off-by: James Tanner <[email protected]>
@jctanner jctanner merged commit 226bfe2 into ansible:master Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants