Skip to content

Commit ee122d6

Browse files
instinct-vfxmaxnbkJeanChristopheMorinPerso
authored
Add support for python 3.12 and 3.13 and drop support for 3.7 (#1950)
Signed-off-by: Thorsten Kaufmann <instinctvfx@googlemail.com> Signed-off-by: Stephen Mackenzie <maxnbk@users.noreply.github.com> Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com> Co-authored-by: Stephen Mackenzie <maxnbk@users.noreply.github.com> Co-authored-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
1 parent 71d2eb1 commit ee122d6

File tree

12 files changed

+71
-45
lines changed

12 files changed

+71
-45
lines changed

.github/workflows/installation.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
36-
python-version: ['3.8', '3.9', '3.10', '3.11']
36+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
3737
method: ['install' ,'pip']
3838

3939
include:
@@ -55,19 +55,6 @@ jobs:
5555
method: pip
5656
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin" PYTHONPATH=$PYTHONPATH:$HOME/rez'
5757
REZ_INSTALL_COMMAND: pip install --target ~/rez .
58-
# macOS
59-
# Python 3.7 is not supported on Apple Silicon.
60-
# macos-13 is the last macos runner image to run on Intel CPUs.
61-
- os: macos-13
62-
python-version: '3.7'
63-
method: install
64-
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:~/rez/bin/rez'
65-
REZ_INSTALL_COMMAND: python ./install.py ~/rez
66-
- os: macos-13
67-
python-version: '3.7'
68-
method: pip
69-
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin" PYTHONPATH=$PYTHONPATH:$HOME/rez'
70-
REZ_INSTALL_COMMAND: pip install --target ~/rez .
7158
# windows
7259
- os: windows-latest
7360
method: install

.github/workflows/tests.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
41-
python-version: ['3.8', '3.9', '3.10', '3.11']
41+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
4242
include:
4343
- os: macos-latest
4444
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
@@ -49,12 +49,6 @@ jobs:
4949
- os: windows-latest
5050
shells: 'cmd,pwsh,gitbash'
5151
rez-path: \installdir\Scripts\rez
52-
# Python 3.7 is not supported on Apple Silicon.
53-
# macos-13 is the last macos runner image to run on Intel CPUs.
54-
- os: macos-13
55-
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
56-
rez-path: /installdir/bin/rez
57-
python-version: '3.7'
5852

5953
fail-fast: false
6054

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ sonar.sources=src
2828
sonar.exclusions=src/build_utils/**,src/rez/data/**,src/rez/tests/**,src/rez/vendor/**
2929

3030
# Misc properties
31-
sonar.python.version=3.7, 3.8, 3.9, 3.10, 3.11, 3.12
31+
sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12, 3.13

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Resolved environments can also be created via the API:
139139

140140
## Quickstart
141141

142-
First, install Rez using Python 3.7+. Download the source, and from the source directory, run
142+
First, install Rez using Python 3.8+. Download the source, and from the source directory, run
143143
(with DEST_DIR replaced with your install location):
144144

145145
]$ python3 ./install.py -v DEST_DIR

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Installation Script
77

88
To install rez, you will need:
99

10-
1. Python 3.7 or above. We support 3.7, 3.8, 3.9, 3.10 and 3.11.
10+
1. Python 3.8 or above. We support 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13.
1111
The python interpreter you use to run the install script will be the interpreter
1212
used by rez itself.
1313
2. The source code. You can get it by either cloning the `repository <https://github.com/AcademySoftwareFoundation/rez>`_

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def find_files(pattern, path=None, root="rez"):
6868
packages=find_packages('src', exclude=["build_utils",
6969
"build_utils.*",
7070
"tests"]),
71+
install_requires=[],
7172
package_data={
7273
'rez':
7374
['utils/logging.conf'] +
@@ -88,13 +89,14 @@ def find_files(pattern, path=None, root="rez"):
8889
"Intended Audience :: Developers",
8990
"Operating System :: OS Independent",
9091
"Programming Language :: Python",
91-
"Programming Language :: Python :: 3.7",
9292
"Programming Language :: Python :: 3.8",
9393
"Programming Language :: Python :: 3.9",
9494
"Programming Language :: Python :: 3.10",
9595
"Programming Language :: Python :: 3.11",
96+
"Programming Language :: Python :: 3.12",
97+
"Programming Language :: Python :: 3.13",
9698
"Topic :: Software Development",
9799
"Topic :: System :: Software Distribution"
98100
],
99-
python_requires=">=3.7",
101+
python_requires=">=3.8",
100102
)

src/rez/bind/rez.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def make_root(variant, root):
3434
with make_package("rez", path, make_root=make_root) as pkg:
3535
pkg.version = version
3636
pkg.commands = commands
37-
pkg.requires = ["python-3.7+<3.12"]
37+
pkg.requires = ["python-3.8+<3.14"]
3838
pkg.variants = [system.variant]
3939

4040
return pkg.installed_variants

src/rez/cli/selftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __call__(self, parser, namespace, values, option_string=None):
5656
prefix = "test_"
5757
for importer, name, ispkg in iter_modules([tests_dir]):
5858
if not ispkg and name.startswith(prefix):
59-
module = importer.find_module(name).load_module(name)
59+
module = importer.find_spec(name).loader.load_module(name)
6060
name_ = name[len(prefix):]
6161
all_module_tests.append(name_)
6262
tests.append((name_, module))

src/rez/plugin_managers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def load_plugins_from_namespace(self):
166166
try:
167167
plugin_module = sys.modules.get(modname)
168168
if plugin_module is None:
169-
loader = importer.find_module(modname)
170-
plugin_module = loader.load_module(modname)
169+
loader = importer.find_spec(modname)
170+
plugin_module = loader.loader.load_module(modname)
171171

172172
self.register_plugin_module(plugin_name, plugin_module, path)
173173
self.load_config_from_plugin(plugin_module)

src/rez/rezconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright Contributors to the Rez Project
33

44

5-
"""
5+
r"""
66
Rez configuration settings. Do not change this file.
77
88
Settings are determined in the following way (higher number means higher
@@ -38,7 +38,7 @@
3838
3939
Paths should use the path separator appropriate for the operating system
4040
(based on Python's os.path.sep). So for Linux paths, / should be used. On
41-
Windows \ (unescaped) should be used.
41+
Windows \ (unescaped!) should be used.
4242
4343
Note: The comments in this file are extracted and turned into documentation. Pay
4444
attention to the comment formatting and follow the existing style closely.

0 commit comments

Comments
 (0)