Skip to content

Commit d0e3ad0

Browse files
committed
support python 3.12 and 3.13
1 parent c975eab commit d0e3ad0

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

sky/provision/docker_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def initialize(self) -> str:
330330
'mkdir -p ~/.ssh;'
331331
'cat /tmp/host_ssh_authorized_keys >> ~/.ssh/authorized_keys;'
332332
'sudo service ssh start;'
333-
'sudo sed -i "s/mesg n/tty -s \&\& mesg n/" ~/.profile;'
333+
'sudo sed -i "s/mesg n/tty -s \\&\\& mesg n/" ~/.profile;'
334334
f'{SETUP_ENV_VARS_CMD}',
335335
run_env='docker')
336336

sky/setup_files/dependencies.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
install_requires = [
1212
'wheel<0.46.0', # https://github.com/skypilot-org/skypilot/issues/5153
13+
'setuptools', # TODO: match version to pyproject.toml once #5153 is fixed
14+
'pip',
1315
'cachetools',
1416
# NOTE: ray requires click>=7.0.
1517
'click >= 7.0',
@@ -115,7 +117,7 @@
115117
'azure-mgmt-compute>=33.0.0',
116118
'azure-storage-blob>=12.23.1',
117119
'msgraph-sdk',
118-
] + local_ray,
120+
],
119121
# We need google-api-python-client>=2.69.0 to enable 'discardLocalSsd'
120122
# parameter for stopping instances. Reference:
121123
# https://github.com/googleapis/google-api-python-client/commit/f6e9d3869ed605b06f7cbf2e8cf2db25108506e6
@@ -130,7 +132,7 @@
130132
'lambda': [], # No dependencies needed for lambda
131133
'cloudflare': aws_dependencies,
132134
'scp': local_ray,
133-
'oci': ['oci'] + local_ray,
135+
'oci': ['oci'],
134136
# Kubernetes 32.0.0 has an authentication bug: https://github.com/kubernetes-client/python/issues/2333 # pylint: disable=line-too-long
135137
'kubernetes': ['kubernetes>=20.0.0,!=32.0.0', 'websockets'],
136138
'remote': remote,
@@ -156,10 +158,21 @@
156158
] + aws_dependencies
157159
}
158160

159-
# Nebius needs python3.10. If python 3.9 [all] will not install nebius
161+
# Calculate which clouds should be included in the [all] installation.
162+
clouds_for_all = set(extras_require)
163+
clouds_for_all.remove('remote')
164+
160165
if sys.version_info < (3, 10):
161-
filtered_keys = [k for k in extras_require if k != 'nebius']
162-
extras_require['all'] = sum(
163-
[v for k, v in extras_require.items() if k != 'nebius'], [])
164-
else:
165-
extras_require['all'] = sum(extras_require.values(), [])
166+
# Nebius needs python3.10. If python 3.9 [all] will not install nebius
167+
clouds_for_all.remove('nebius')
168+
169+
if sys.version_info >= (3, 12):
170+
# The version of ray we use does not work with >= 3.12, so avoid clouds
171+
# that require ray.
172+
clouds_for_all -= {'ibm', 'docker', 'scp'}
173+
# vast requires setuptools==51.1.1 which will not work with python >= 3.12
174+
# TODO: Remove once https://github.com/vast-ai/vast-sdk/pull/6 is released
175+
clouds_for_all.remove('vast')
176+
177+
extras_require['all'] = list(
178+
set().union(*[extras_require[cloud] for cloud in clouds_for_all]))

sky/setup_files/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ def parse_readme(readme: str) -> str:
177177
'Programming Language :: Python :: 3.9',
178178
'Programming Language :: Python :: 3.10',
179179
'Programming Language :: Python :: 3.11',
180+
'Programming Language :: Python :: 3.12',
181+
'Programming Language :: Python :: 3.13',
180182
'License :: OSI Approved :: Apache Software License',
181183
'Operating System :: OS Independent',
182184
'Topic :: Software Development :: Libraries :: Python Modules',

0 commit comments

Comments
 (0)