Skip to content

[MNT] Use uv date cutoffs instead of extras for old dependency version testing#9383

Open
fkiraly wants to merge 1 commit intosktime:mainfrom
zanieb:zb/exclude-newer
Open

[MNT] Use uv date cutoffs instead of extras for old dependency version testing#9383
fkiraly wants to merge 1 commit intosktime:mainfrom
zanieb:zb/exclude-newer

Conversation

@fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Feb 15, 2026

Currently, there are frozen depsets for regression testing time frozen states in 2023 and 2024.

This causes issues with uv sync and uv lock due to uv's universal dependency resolution.

Instead, the UV_EXCLUDE_NEWER environment variable can be used, which can be used to set a frozen time point for package dependency resolution.

Originally created by @zanieb, also see discussion on astral-sh/uv#18026

@zanieb
Copy link

zanieb commented Feb 15, 2026

Sorry I didn't actually iterate to ensure this passed CI on a fork.

It seems like you'll need an exclusion for setuptools, e.g., --exclude-newer-package 'setuptools=false', so build of sktime itself can succeed.

It also seems you're affected by pypa/setuptools#5007 in which case you might actually want to keep an exclusion for setuptools just at a later date or otherwise add a constraint.

@yarnabrina
Copy link
Member

astral-sh/uv#16118 (comment)

If removing extras are an option, you can consider this suggestion for dependencies_lowest as well.

@fkiraly
Copy link
Collaborator Author

fkiraly commented Feb 16, 2026

@zanieb, thanks for the help!

@yarnabrina, I do not understand @zanieb's comment on the setuptools exclusion, i.e., how we would concretely action it by adding a line to somewhere. Do you understand it?
(I will also try to figure out myself and do not want to bother @zanieb too much)

@yarnabrina
Copy link
Member

yarnabrina commented Feb 16, 2026

@zanieb, thanks for the help!

@yarnabrina, I do not understand @zanieb's comment on the setuptools exclusion, i.e., how we would concretely action it by adding a line to somewhere. Do you understand it? (I will also try to figure out myself and do not want to bother @zanieb too much)

You can change from setuptools>=78.1.1 to setuptools>=78.1.1,<82. see below.

@zanieb
Copy link

zanieb commented Feb 16, 2026

I was referring to

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 86ee5495b..685c9a534 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -504,7 +505,10 @@ jobs:
         run: python -c "import sys; print(sys.version)"
 
       - name: Install sktime and dependencies
-        run: uv pip install .[dev]
+        # setuptools>=78.1.1 is required for sktime itself
+        run: >
+          uv pip install .[dev]
+          --exclude-newer-package 'setuptools=false'
         env:
           UV_SYSTEM_PYTHON: 1
           UV_EXCLUDE_NEWER: "2024-09-01"

@RecreationalMath
Copy link
Member

RecreationalMath commented Feb 17, 2026

I understand this discussion is about the recent ModuleNotFoundError: No module named pkg_resources, which is being caused by setuptools 82.0.0 removing pkg_resources.

@zanieb does "--exclude-newer-package 'setuptools=false'" apply only to the main resolution, or does it also affect setuptools resolution inside build isolation for transitive dependencies?
Ideally we want

  • sktime's own build to get modern setuptools (exempted),
  • while old transitive dependency builds still get pre-82 setuptools (with pkg_resources intact) via the date cutoff.

Does uv keep the date cutoff applied to setuptools within build isolation even when the main resolution has it exempted?

@zanieb
Copy link

zanieb commented Feb 21, 2026

"--exclude-newer-package 'setuptools=false'" apply only to the main resolution, or does it also affect setuptools resolution inside build isolation for transitive dependencies?

It affects the entire resolution.

@zanieb
Copy link

zanieb commented Feb 21, 2026

(I'd probably just set it to the date beforepkg_resources was removed for the purpose of these tests)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Continuous integration, unit testing & package distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants