support python version > 3.12 #970

Closed
opened 2025-08-20 12:01:30 +00:00 by zramsay · 1 comment
Member

currently, some functionality doesn't work on python 3.13, which is now stock on Ubuntu 25

File "/Users/zach/.shiv/laconic-so_4cd9fc3f19d398bd6df21a696e0fcc0f50595634c65254013f34e2c9bd8a74f5/site-packages/stack_orchestrator/util.py", line 183, in get_parsed_deployment_spec
    with spec_file_path:
         ^^^^^^^^^^^^^^
TypeError: 'PosixPath' object does not support the context manager protocol

from

def get_parsed_deployment_spec(spec_file):
    spec_file_path = Path(spec_file)
    try:
        with spec_file_path:
            deploy_spec = get_yaml().load(open(spec_file_path, "r"))
            return deploy_spec
    except FileNotFoundError as error:
        # We try here to generate a useful diagnostic error
        print(f"Error: spec file: {spec_file_path} does not exist")
        print(f"Exiting, error: {error}")
        sys.exit(1)
currently, some functionality doesn't work on python 3.13, which is now stock on Ubuntu 25 ``` File "/Users/zach/.shiv/laconic-so_4cd9fc3f19d398bd6df21a696e0fcc0f50595634c65254013f34e2c9bd8a74f5/site-packages/stack_orchestrator/util.py", line 183, in get_parsed_deployment_spec with spec_file_path: ^^^^^^^^^^^^^^ TypeError: 'PosixPath' object does not support the context manager protocol ``` from ``` def get_parsed_deployment_spec(spec_file): spec_file_path = Path(spec_file) try: with spec_file_path: deploy_spec = get_yaml().load(open(spec_file_path, "r")) return deploy_spec except FileNotFoundError as error: # We try here to generate a useful diagnostic error print(f"Error: spec file: {spec_file_path} does not exist") print(f"Exiting, error: {error}") sys.exit(1) ```
Author
Member

closed by #971

closed by #971
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#970
No description provided.