Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
fkiraly wants to merge 1 commit into
sktime:mainfrom
zanieb:zb/exclude-newer
Closed

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

Conversation

@fkiraly

@fkiraly fkiraly commented Feb 15, 2026

Copy link
Copy Markdown
Collaborator

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

zanieb commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

astral-sh/uv#16118 (comment)

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

@fkiraly

fkiraly commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator Author

@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

yarnabrina commented Feb 16, 2026

Copy link
Copy Markdown
Member

@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

zanieb commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

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

RecreationalMath commented Feb 17, 2026

Copy link
Copy Markdown
Member

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

zanieb commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

"--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

zanieb commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

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

@fkiraly

fkiraly commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

superseded by #9383

@fkiraly fkiraly closed this Apr 12, 2026
fkiraly added a commit that referenced this pull request Apr 13, 2026
…ncy version testing (#9872)

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; later in
#9383, which was deprecated in
favour of this PR.

---------

Co-authored-by: Zanie Blue <[email protected]>
fkiraly pushed a commit to sktime/pytorch-forecasting that referenced this pull request May 12, 2026
#### Reference Issues/PRs
Fixes #2054 
Related: sktime/sktime#9383

#### What does this implement/fix? Explain your changes.

Replaces the explicit dependency set with uv’s UV_EXCLUDE_NEWER to
install dependencies from a time-frozen snapshot.
Faakhir30 pushed a commit to Faakhir30/sktime that referenced this pull request May 21, 2026
…ncy version testing (sktime#9872)

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; later in
sktime#9383, which was deprecated in
favour of this PR.

---------

Co-authored-by: Zanie Blue <[email protected]>
Faakhir30 pushed a commit to Faakhir30/sktime that referenced this pull request May 21, 2026
…ncy version testing (sktime#9872)

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; later in
sktime#9383, which was deprecated in
favour of this PR.

---------

Co-authored-by: Zanie Blue <[email protected]>
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