diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c714408..1f2397d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,105 @@ +## 3.0.0 (TBD) +[Source](https://github.com/AcademySoftwareFoundation/rez/tree/3.0.0) | [Diff](https://github.com/AcademySoftwareFoundation/rez/compare/2.114.1...3.0.0) + +This release marks a big turning point for rez by completely dropping support for Python 2. +In 2.114.0, it was still possible to install rez with Python 2 using pip. This functionality has +now been removed. As of now, rez will support Python 3.7+. As of now, we test against 3.7, 3.8, 3.9, +3.10 and 3.11. + +This was a tough decision to make considering that we still have users relying on Python 2, but +it was becoming more and more complicated and time-consuming to maintain support for Python 2. + +Thank you to everyone who's put a lot of effort into supporting Python 2 for that long. Without +you, it wouldn't have been possible. + +As part of the effort to remove support for Python 2, we also refreshed our CI a bit: +- The GitHub Action workflows are now simplified and unified. We now have one workflow to + run all tests for all platforms instead of four. +- We also got rid of the Windows containers. With these changes, our Windows tests are now + as fast as Linux and macOS tests, it's easier to see test results and we can also more + easily test all support python versions. +- Running the tests directly on the GH hosted runners instead of containers, + we discovered some big flaws in how our tests were set up. These issues are now + fixed and our tests are now much more portable and don't rely on a centrally installed + Python or `PATHEXT` to be set. Big thanks to [@Dennis-Lehmann](https://github.com/Dennis-Lehmann) + and [@MrLixm](https://github.com/MrLixm) for helping us with debugging our Window tests! + +The CI refresh is not user-facing, but it took us a significant amount of effort +and time to do and we hope that it will help increase the quality of rez and make +for a better contributor experience. This is why we mention these in the release notes. + +### Features + +- It is now possible to configure the execution policy used when starting PowerShell (and pwsh) shells + by setting the `execution_policy` setting in the shell's config file. This should hopefully help to + smooth the transition from the cmd shell to powershell/pwsh.[\#1505](https://github.com/AcademySoftwareFoundation/rez/pull/1505) ([@herronelou](https://github.com/herronelou)) +- Built-in bind modules can now be overridden by adding your custom implementations to `bind_module_path`. [\#1557](https://github.com/AcademySoftwareFoundation/rez/pull/1557) ([@Pantsworth](https://github.com/Pantsworth)) + +### Fixes + +- Fix infinite loop in the dot graph generation when `--fail-graph` is used and there are indirect cycles. [\#1620](https://github.com/AcademySoftwareFoundation/rez/pull/1620) ([@Pantsworth](https://github.com/Pantsworth)) + +### Removed + +As communicated in the 2.114.0 release notes, we've followed through on the removal of certain things. + +- Python 2: It is now impossible to install and use rez with Python 2. + +- Modules + - `rez.vendor.version`: Use `rez.version` instead. + - `rez.build_process_`: Use `rez.build_process` instead. + - `rez.package_maker__`: Use `rez.package_maker` instead. + - `rez.package_resources_`: Use `rez.package_resources` instead. + - `rez.packages_`: Use `rez.packages` instead. + +- Configuration settings + - `rxt_as_yaml`: No replacement. + - `warn_commands2`: No replacement. This was a no-op. + - `error_commands2`: No replacement. This was a no-op. + - `rez_1_cmake_variables`: You can use the `REZ_BUILD_TYPE` CMake variable instead of `CENTRAL`. + +- CLI + - rez-pip: The `--pip-version` is removed. + - rez-search: The `--sort` is removed. + +- API + - The `isolate` keyword argument of the `rez.rex.RexExecutor.execute_code` method is now officially removed. + Instead of `executor.execute_code(..., isolate=True)`, use + ```python + with executor.reset_globals(): + executor.execute_code(...) + ``` + +- Build system: + - `CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT` and `_ECLIPSE_VERSION` were removed from the list of default variables passed to CMake. [\#1623](https://github.com/AcademySoftwareFoundation/rez/pull/1623) ([@JeanChristopheMorinPerso](https://github.com/JeanChristopheMorinPerso)) + - rez will no longer print a custom error message if no build system is detected or set and an old "bez" `rezbuild.py` is detected. [\#1624](https://github.com/AcademySoftwareFoundation/rez/pull/1624) ([@JeanChristopheMorinPerso](https://github.com/JeanChristopheMorinPerso)) + +### Changed + +Change of default values as announced in 2.114.0: + +- `rez_1_environment_variables`: Now disabled by default. +- `disable_rez_1_compatibility`: Now enabled by default. + +New unannounced changes: + +- The default shell on Windows is now PowerShell unless you configure `default_shell` + to a different value. The previous default was `cmd` and was causing a lot of problems. + +### Docs + +The effort to improve and add content to our docs continues. + +* New documentation dedicated to [caching](https://rez.readthedocs.io/en/stable/caching.html). + This is only the beginning and only contains information on package payload caching and + memcached. We hope to add more content in the future. [\#1615](https://github.com/AcademySoftwareFoundation/rez/pull/1615) ([@brycegbrazen](https://github.com/brycegbrazen)) +- The note about SemVer in the [docs](https://rez.readthedocs.io/en/stable/basic_concepts.html#versions) + has been clarified. While we encourage SemVer like versioning, rez doesn't know + what SemVer is. This has been a source of confusion in the past. [\#1614](https://github.com/AcademySoftwareFoundation/rez/pull/1614) ([@brycegbrazen](https://github.com/brycegbrazen)) + ## 2.114.1 (2023-12-09) [Source](https://github.com/AcademySoftwareFoundation/rez/tree/2.114.1) | [Diff](https://github.com/AcademySoftwareFoundation/rez/compare/2.114.0...2.114.1) diff --git a/docs/source/guides/index.rst b/docs/source/guides/index.rst index 0cd0e639d..f92b32b29 100644 --- a/docs/source/guides/index.rst +++ b/docs/source/guides/index.rst @@ -7,4 +7,4 @@ This section contains various user guides. .. toctree:: :maxdepth: 1 - prepare_for_3 + update_to_3 diff --git a/docs/source/guides/prepare_for_3.rst b/docs/source/guides/update_to_3.rst similarity index 68% rename from docs/source/guides/prepare_for_3.rst rename to docs/source/guides/update_to_3.rst index dc35a1d94..0b45a1fb8 100644 --- a/docs/source/guides/prepare_for_3.rst +++ b/docs/source/guides/update_to_3.rst @@ -1,35 +1,37 @@ -===================== -Prepare for rez 3.0.0 -===================== +=================== +Update to rez 3.0.0 +=================== -The rez TSC started to prepare to release rez ``3.0.0``. Rez ``3.0.0`` will not be -a major breaking change but will still remove some things. +Rez ``3.0.0`` is not be a major breaking change, except that Python 2 is not supported anymore. +There is various other small changes too. -This guide will show you how to prepare in advance before ``3.0.0`` is released so -that you are not caught by surprise by the changes made in ``3.0.0`` once you start -using ``3.0.0``. We hope that this guide will help make the upgrade process smoother. +This guide will show you how to prepare before upgrading to ``3.0.0``. We hope that this guide will +help make the upgrade process smoother. Steps for smooth upgrade ======================== -#. Read the `release notes <../CHANGELOG.html>`_ for ``2.114.0`` and ``3.0.0`` (once released). The release - notes will contain a list of everything that was deprecated in ``2.114.0`` and will - be removed or changed in ``3.0.0``. +#. Read the `release notes <../CHANGELOG.html>`_ for ``2.114.0`` and ``3.0.0``. The release + notes will contain a list of everything that was deprecated in ``2.114.0`` and removed or + changed in ``3.0.0``. #. Upgrade to ``2.114.0``. To upgrade to (or before upgrading to) rez ``3.0.0``, we suggest that you first - upgrade to ``2.114.0``. This is not mandatory and you can jump straight to ``3.0.0`` + upgrade to ``2.114.1``. This is not mandatory and you can jump straight to ``3.0.0`` if you wish. - + + You should prefer 2.114.1 over 2.114.0 because 2.114.0 contained a bug that prevented + rez from correctly running when :envvar:`REZ_LOG_DEPRECATION_WARNINGS` is set. + .. warning:: - + If you skip this step, you won't be able to see deprecation warnings before - things are removed frm the rez code base. + things are removed/changed from the rez code base. -#. Set the ``REZ_LOG_DEPRECATION_WARNINGS`` environment variable. +#. Set the :envvar:`REZ_LOG_DEPRECATION_WARNINGS` environment variable. - ``2.114.1`` adds a new environment variable called :envvar:`REZ_LOG_DEPRECATION_WARNINGS` + ``2.114.0`` adds a new environment variable called :envvar:`REZ_LOG_DEPRECATION_WARNINGS` that will force all rez related deprecation warnings to be printed out to stderr. This will let you catch if you are using something deprecated that will be removed in future versions. @@ -39,14 +41,13 @@ Steps for smooth upgrade #. Address each warning one by one. -#. Once you think you have addressed all warnings, upgrade to 3.0.0 (or wait for ``3.0.0`` to - be released if it's not yet available). +#. Once you think you have addressed all warnings, upgrade to 3.0.0. Optional ======== Since some default configuration default values will change in ``3.0.0``, we highly suggest -that you run some anslysis scripts to see if you will be impacted by these changes. +that you run some analysis scripts to see if you will be impacted by these changes. Detect old-style commands in your repositories ---------------------------------------------- diff --git a/src/rez/__init__.py b/src/rez/__init__.py index 477fe3983..f9dd5ab90 100644 --- a/src/rez/__init__.py +++ b/src/rez/__init__.py @@ -70,10 +70,3 @@ def callback(sig, frame): # This means we have to rely on a custom environment variable. if os.getenv("REZ_LOG_DEPRECATION_WARNINGS"): warnings.filterwarnings("default", category=rez.deprecations.RezDeprecationWarning) - - -if sys.version_info[:2] < (3, 7): - rez.deprecations.warn( - "Support for Python less than 3.7 is deprecated and will be removed in rez 3.0.0.", - rez.deprecations.RezDeprecationWarning, - ) diff --git a/src/rez/build_process_.py b/src/rez/build_process_.py deleted file mode 100644 index 8a43e2544..000000000 --- a/src/rez/build_process_.py +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -import rez.deprecations -from rez.build_process import * # noqa - - -rez.deprecations.warn( - "rez.build_process_ is deprecated; import rez.build_process instead", - rez.deprecations.RezDeprecationWarning, -) diff --git a/src/rez/cli/pip.py b/src/rez/cli/pip.py index 2de7be4d0..a91bee8a8 100644 --- a/src/rez/cli/pip.py +++ b/src/rez/cli/pip.py @@ -16,10 +16,6 @@ def setup_parser(parser, completions=False): help="python version (rez package) to use, default is latest. Note " "that the pip package(s) will be installed with a dependency on " "python-MAJOR.MINOR.") - parser.add_argument( - "--pip-version", dest="pip_ver", metavar="VERSION", - help="pip version (rez package) to use, default is latest." - " This option is deprecated and will be removed in 3.0.0.") parser.add_argument( "-i", "--install", action="store_true", help="install the package") @@ -49,21 +45,13 @@ def command(opts, parser, extra_arg_groups=None): logging.getLogger('rez').setLevel(logging.INFO) from rez.pip import pip_install_package - import rez.deprecations # a bit weird, but there used to be more options. Leave like this for now if not opts.install: parser.error("Expected one of: --install") - if opts.pip_ver: - rez.deprecations.warn( - "The option --pip-version is deprecated and will be removed in 3.0.0", - category=rez.deprecations.RezDeprecationWarning, - ) - pip_install_package( opts.PACKAGE, - pip_version=opts.pip_ver, python_version=opts.py_ver, release=opts.release, prefix=opts.prefix, diff --git a/src/rez/cli/search.py b/src/rez/cli/search.py index b339f5717..e5d7bf8a4 100644 --- a/src/rez/cli/search.py +++ b/src/rez/cli/search.py @@ -57,9 +57,6 @@ def setup_parser(parser, completions=False): help="only show packages released after the given time. Supported " "formats are: epoch time (eg 1393014494), or relative time (eg -10s, " "-5m, -0.5h, -10d)") - parser.add_argument( - "-s", "--sort", action="store_true", - help="print results in sorted order (deprecated)") PKG_action = parser.add_argument( "PKG", type=str, nargs='?', help="packages to search, glob-style patterns are supported") @@ -73,7 +70,6 @@ def command(opts, parser, extra_arg_groups=None): from rez.package_search import ResourceSearcher, ResourceSearchResultFormatter from rez.utils.formatting import get_epoch_time_from_str from rez.config import config - import rez.deprecations before_time = get_epoch_time_from_str(opts.before) after_time = get_epoch_time_from_str(opts.after) @@ -81,12 +77,6 @@ def command(opts, parser, extra_arg_groups=None): if after_time and before_time and (after_time >= before_time): parser.error("non-overlapping --before and --after") - if opts.sort: - rez.deprecations.warn( - "the '--sort' argument is deprecated and will be removed in 3.0.0. It currently has no effect.", - rez.deprecations.RezDeprecationWarning, - ) - if opts.no_warnings: config.override("warn_none", True) diff --git a/src/rez/config.py b/src/rez/config.py index 584e8d8c1..ae9e267dc 100644 --- a/src/rez/config.py +++ b/src/rez/config.py @@ -451,7 +451,6 @@ def _parse_env_var(self, value): "package_cache_max_variant_days": Int, "package_cache_clean_limit": Float, "allow_unversioned_packages": Bool, - "rxt_as_yaml": Bool, "package_cache_during_build": Bool, "package_cache_local": Bool, "package_cache_same_device": Bool, @@ -485,13 +484,12 @@ def _parse_env_var(self, value): "default_relocatable": Bool, "set_prompt": Bool, "prefix_prompt": Bool, + # Note that if you want to remove a warn_* or debug_* config, you will + # need to search for "config.warn(" or "config.debug(" to see if it's used. "warn_old_commands": Bool, "error_old_commands": Bool, "debug_old_commands": Bool, - "warn_commands2": Bool, - "error_commands2": Bool, "rez_1_environment_variables": Bool, - "rez_1_cmake_variables": Bool, "disable_rez_1_compatibility": Bool, "make_package_temporarily_writable": Bool, "read_package_cache": Bool, @@ -515,24 +513,10 @@ def _parse_env_var(self, value): # List of settings that are deprecated and should raise # deprecation warnings if referenced in config files. _deprecated_settings = { - "rxt_as_yaml": _Deprecation("3.0.0"), "warn_old_commands": _Deprecation("the future"), "error_old_commands": _Deprecation("the future"), - # Remove in 3.0 because it's currently a no-op - "debug_old_commands": _Deprecation("3.0.0"), - # Remove in 3.0 because it's currently a no-op - "warn_commands2": _Deprecation("3.0.0"), - # Remove in 3.0 because it's currently a no-op - "error_commands2": _Deprecation("3.0.0"), - "rez_1_environment_variables": _Deprecation( - "the future", - extra="Additionally, it will become disabled by default in 3.0.0.", - ), - "rez_1_cmake_variables": _Deprecation("3.0.0"), - "disable_rez_1_compatibility": _Deprecation( - "the future", - extra="Additionally, it will become enabled by default in 3.0.0.", - ) + "rez_1_environment_variables": _Deprecation("the future"), + "disable_rez_1_compatibility": _Deprecation("the future") } diff --git a/src/rez/package_maker__.py b/src/rez/package_maker__.py deleted file mode 100644 index 27a047c65..000000000 --- a/src/rez/package_maker__.py +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -import rez.deprecations -from rez.package_maker import * # noqa - - -rez.deprecations.warn( - "rez.package_maker__ is deprecated; import rez.package_maker instead", - rez.deprecations.RezDeprecationWarning, -) diff --git a/src/rez/package_resources_.py b/src/rez/package_resources_.py deleted file mode 100644 index 78057ba80..000000000 --- a/src/rez/package_resources_.py +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -import rez.deprecations -from rez.package_resources import * # noqa - - -rez.deprecations.warn( - "rez.package_resources_ is deprecated; import rez.package_resources instead", - rez.deprecations.RezDeprecationWarning, -) diff --git a/src/rez/packages_.py b/src/rez/packages_.py deleted file mode 100644 index 5f4d30d60..000000000 --- a/src/rez/packages_.py +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -import rez.deprecations -from rez.packages import * # noqa - - -rez.deprecations.warn( - "rez.packages_ is deprecated; import rez.packages instead", - rez.deprecations.RezDeprecationWarning, -) diff --git a/src/rez/resolved_context.py b/src/rez/resolved_context.py index 93fdb5f73..349beadea 100644 --- a/src/rez/resolved_context.py +++ b/src/rez/resolved_context.py @@ -42,7 +42,6 @@ from rez.utils import json from rez.utils.yaml import dump_yaml from rez.utils.platform_ import platform_ -import rez.deprecations from contextlib import contextmanager from functools import wraps @@ -655,17 +654,7 @@ def write_to_buffer(self, buf): """Save the context to a buffer.""" doc = self.to_dict() - if config.rxt_as_yaml: - rez.deprecations.warn( - "Writing the RXT file using the YAML format is deprecated. " - "Both this functionality and the rxt_as_yaml setting will " - "be removed in rez 3.0.0", - rez.deprecations.RezDeprecationWarning, - ) - content = dump_yaml(doc) - else: - content = json.dumps(doc, indent=4, separators=(",", ": "), - sort_keys=True) + content = json.dumps(doc, indent=4, separators=(",", ": "), sort_keys=True) buf.write(content) diff --git a/src/rez/rex.py b/src/rez/rex.py index 1ee014e1b..1f5d60888 100644 --- a/src/rez/rex.py +++ b/src/rez/rex.py @@ -13,7 +13,6 @@ from string import Formatter from collections.abc import MutableMapping -import rez.deprecations from rez.system import system from rez.config import config from rez.exceptions import RexError, RexUndefinedVariableError, \ @@ -1404,31 +1403,18 @@ def compile_code(cls, code, filename=None, exec_namespace=None): return pyc - def execute_code(self, code, filename=None, isolate=False): + def execute_code(self, code, filename=None): """Execute code within the execution context. Args: code (str or SourceCode): Rex code to execute. filename (str): Filename to report if there are syntax errors. - isolate (bool): If True, do not affect `self.globals` by executing - this code. DEPRECATED - use `self.reset_globals` instead. """ - def _apply(): - self.compile_code(code=code, - filename=filename, - exec_namespace=self.globals) - - if isolate: - rez.deprecations.warn( - "the 'isolate' argument is deprecated and will be removed in 3.0.0. " - "Use the reset_globals method/context manager instead.", - category=rez.deprecations.RezDeprecationWarning, - stacklevel=2, - ) - with self.reset_globals(): - _apply() - else: - _apply() + self.compile_code( + code=code, + filename=filename, + exec_namespace=self.globals + ) def execute_function(self, func, *nargs, **kwargs): """ diff --git a/src/rez/rezconfig.py b/src/rez/rezconfig.py index eda9ae2a1..ca1f14b15 100644 --- a/src/rez/rezconfig.py +++ b/src/rez/rezconfig.py @@ -1029,15 +1029,6 @@ # ############################################################################### -# If this is True, rxt files are written in YAML format. If False, they are -# written in JSON, which is a LOT faster. You would only set to true for -# backwards compatibility reasons. Note that rez will detect either format on -# rxt file load. -# -# .. deprecated:: 2.114.0 -# The ability to store RXT files using the YAML format will be removed in 3.0.0. -rxt_as_yaml = False - # Warn or disallow when a package is found to contain old rez-1-style commands. # # .. deprecated:: 2.114.0 @@ -1056,37 +1047,18 @@ # This currently has no effect. # # .. deprecated:: 2.114.0 -# Will be removed in rez 3.0.0. +# Will be removed in a future version. debug_old_commands = False -# Warn or disallow an extra commands entry called "commands2". This is provided -# as a temporary measure for porting packages to rez-based commands without -# breaking compatibility with Rez-1. If "commands2" is present, it is used -# instead of "commands". Unlike "commands", "commands2" only allows new rex- -# style commands. Once you have fully deprecated Rez-1, you should stop using -# "commands2". -# -# This currently has no effect. -# -# .. deprecated:: 2.114.0 -# Will be removed in rez 3.0.0. -warn_commands2 = False - -# See :data:`warn_commands2`. -# -# This currently has no effect. -# -# .. deprecated:: 2.114.0 -# Will be removed in rez 3.0.0. -error_commands2 = False - # If True, Rez will continue to generate the given environment variables in # resolved environments, even though their use has been deprecated in Rez-2. # The variables in question, and their Rez-2 equivalent (if any) are: # # .. deprecated:: 2.114.0 -# Will be removed in a future release. Additionally, the default will change -# from disabled to enabled in rez 3.0.0. +# Will be removed in a future release. +# +# .. versionchanged:: 3.0.0 +# Changed the default value to False in preparation of future removal. # # ================== ========================== # REZ-1 REZ-2 @@ -1099,24 +1071,7 @@ # REZ_RAW_REQUEST not set # REZ_IN_REZ_RELEASE not set # ================== ========================== -rez_1_environment_variables = True - -# If True, Rez will continue to generate the given CMake variables at build and -# release time, even though their use has been deprecated in Rez-2. The -# variables in question, and their Rez-2 equivalent (if any) are: -# -# .. versionchanged:: 2.114.0 -# Now disabled by default. -# -# .. deprecated:: 2.114.0 -# This will be removed in 3.0.0. -# -# ======= ======================== -# REZ-1 REZ-2 -# ======= ======================== -# CENTRAL :envvar:`REZ_BUILD_TYPE` -# ======= ======================== -rez_1_cmake_variables = False +rez_1_environment_variables = False # If True, override all compatibility-related settings so that Rez-1 support is # deprecated. This means that: @@ -1124,18 +1079,17 @@ # * All warn/error settings in this section of the config will be set to # warn=False, error=True; # * :data:`rez_1_environment_variables` will be set to False. -# * :data:`rez_1_cmake_variables` will be set to False. # # You should aim to do this. It will mean your packages are more strictly # validated, and you can more easily use future versions of Rez. # -# .. versionchanged:: 2.114.0 -# Now enabled by default. -# # .. deprecated:: 2.114.0 -# Will be removed in a future release. Additionally, the default will change -# from disabled to enabled in rez 3.0.0. -disable_rez_1_compatibility = False +# Will be removed in a future release. +# +# .. versionchanged:: 3.0.0 +# Changed the default value to True in preparation of future removal. +# +disable_rez_1_compatibility = True ############################################################################### diff --git a/src/rez/tests/test_commands.py b/src/rez/tests/test_commands.py index df545bc9a..c1f790fc5 100644 --- a/src/rez/tests/test_commands.py +++ b/src/rez/tests/test_commands.py @@ -11,7 +11,9 @@ from rez.utils.filesystem import canonical_path import unittest from rez.tests.util import TestBase +from rez.vendor.schema.schema import SchemaError import os +import logging class TestCommands(TestBase): @@ -100,8 +102,19 @@ def _test_rextest_package(self, version): # first prepend should still override self._test_package(pkg, {"REXTEST_DIRS": "TEST"}, cmds) - def test_old_yaml(self): + def test_old_yaml_raises(self): """Resolve a yaml-based package with old-style bash commands.""" + self.update_settings({"disable_rez_1_compatibility": True, "warn_old_commands": False}) + with self.assertRaises(SchemaError): + self._test_rextest_package("1.1") + + def test_old_yaml_compatibility_enabled(self): + """Resolve a yaml-based package with old-style bash commands.""" + self.update_settings({"disable_rez_1_compatibility": False, "warn_old_commands": True}) + with self.assertLogs(logger=logging.getLogger("rez.utils.logging_"), level=logging.WARNING): + self._test_rextest_package("1.1") + + self.update_settings({"disable_rez_1_compatibility": False, "warn_old_commands": False}) self._test_rextest_package("1.1") def test_new_yaml(self): diff --git a/src/rez/tests/util.py b/src/rez/tests/util.py index 05261ead5..865cd8ec9 100644 --- a/src/rez/tests/util.py +++ b/src/rez/tests/util.py @@ -63,6 +63,9 @@ def setup_once(self): def tearDown(self): self.teardown_config() os.environ = self.__environ + # Try to clear as much caches as possible to avoid tests + # leaking data into each other. + system.clear_caches() @classmethod def data_path(cls, *dirs): diff --git a/src/rez/vendor/version/__init__.py b/src/rez/vendor/version/__init__.py deleted file mode 100644 index ec87df48e..000000000 --- a/src/rez/vendor/version/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -import rez.deprecations - -rez.deprecations.warn( - "module 'rez.vendor.version' is deprecated and will be removed in 3.0.0. Use 'rez.version' instead.", - rez.deprecations.RezDeprecationWarning, - stacklevel=2 -) diff --git a/src/rez/vendor/version/requirement.py b/src/rez/vendor/version/requirement.py deleted file mode 100644 index 04f53ae5f..000000000 --- a/src/rez/vendor/version/requirement.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -from rez.version._requirement import * diff --git a/src/rez/vendor/version/util.py b/src/rez/vendor/version/util.py deleted file mode 100644 index 49dddd77c..000000000 --- a/src/rez/vendor/version/util.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -from rez.version._util import * diff --git a/src/rez/vendor/version/version.py b/src/rez/vendor/version/version.py deleted file mode 100644 index f3b7c54d7..000000000 --- a/src/rez/vendor/version/version.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright Contributors to the Rez Project - - -from rez.version._version import * diff --git a/src/rezplugins/build_system/cmake.py b/src/rezplugins/build_system/cmake.py index d087f5574..fdcb55035 100644 --- a/src/rezplugins/build_system/cmake.py +++ b/src/rezplugins/build_system/cmake.py @@ -142,11 +142,6 @@ def _pr(s): cmd.append("-DREZ_BUILD_INSTALL=%d" % (1 if install else 0)) cmd.extend(["-G", self.build_systems[self.cmake_build_system]]) - if config.rez_1_cmake_variables and \ - not config.disable_rez_1_compatibility and \ - build_type == BuildType.central: - cmd.append("-DCENTRAL=1") - # execute cmake within the build env _pr("Executing: %s" % ' '.join(cmd)) if not os.path.abspath(build_path): diff --git a/src/rezplugins/package_repository/filesystem.py b/src/rezplugins/package_repository/filesystem.py index 64c2e5b40..324570184 100644 --- a/src/rezplugins/package_repository/filesystem.py +++ b/src/rezplugins/package_repository/filesystem.py @@ -204,7 +204,7 @@ def _load(self): return data - # TODO: Deprecate + # TODO: Deprecate? How could we add deprecation warnings without flooding the user? def _load_old_formats(self): data = None