Skip to content

TST/DEP: add version constraints on IPython's direct dependencies#18834

Merged
pllim merged 1 commit intoastropy:mainfrom
neutrinoceros:dep/constraints-from-ipython
Nov 5, 2025
Merged

TST/DEP: add version constraints on IPython's direct dependencies#18834
pllim merged 1 commit intoastropy:mainfrom
neutrinoceros:dep/constraints-from-ipython

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

Description

ref #18782
Mirrors ipython/ipython#15054

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@neutrinoceros neutrinoceros added this to the v7.2.0 milestone Nov 4, 2025
@neutrinoceros neutrinoceros added no-changelog-entry-needed dev-automation dependencies Pull requests that update a dependency file labels Nov 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

Welcome to Astropy 👋 and congratulations on your first pull
request! 🎉

A project member will respond to you as soon as possible; in the
meantime, please have a look over the Checklist for Contributed
Code

and make sure you've addressed as many of the questions there as
possible.

If you feel that this pull request has not been responded to in a
timely manner, please send a message directly to the
development mailing
list
. If the issue is
urgent or sensitive in nature (e.g., a security vulnerability)
please send an e-mail directly to the private e-mail
feedback@astropy.org.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@neutrinoceros neutrinoceros force-pushed the dep/constraints-from-ipython branch from c0a54b7 to 67c632e Compare November 4, 2025 09:30
@neutrinoceros neutrinoceros changed the title DEP: add version constraints on IPython's direct dependencies TST/DEP: add version constraints on IPython's direct dependencies Nov 4, 2025
@neutrinoceros neutrinoceros marked this pull request as ready for review November 4, 2025 10:14
@neutrinoceros neutrinoceros modified the milestones: v7.2.0, v8.0.0 Nov 4, 2025
@pllim
Copy link
Copy Markdown
Member

pllim commented Nov 4, 2025

Is this a rabbit hole, if we start adding constraints for all our optional dependencies?

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

sort-of, but one that we'll eventually get out of:

  • I'm contributing these constraint primarily upstream where they are actually missing
  • adding them back here gets us one step closer to reproducible CI builds
  • they are (very) low maintenance on our side: no need to touch them ever, really, except for removing them in a couple years. Even then, cleaning up will be no-op.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

(also: I'd like to point out that I had no part in building this giant (optional) dependency tree, I'm just taking care of it)

@pllim pllim requested a review from eerovaher November 4, 2025 15:51
pyproject.toml Outdated
"asdf-coordinates-schemas>=0.2.0",

# reproduce IPython minimal requirements on its dependencies
# as of version 9.7.0, the earliest one to consistently declare
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9.7.0 has not been released yet, so it might have different dependencies. That's not really a problem for the constraints, but the comment could be clearer that the constraints were taken from a development version.

pyproject.toml Outdated
"jedi>=0.18.1",
"matplotlib-inline>=0.1.5",
'pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten"',
"prompt_toolkit>=3.0.41,<3.1.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we want to set a constraint from the above?

Suggested change
"prompt_toolkit>=3.0.41,<3.1.0",
"prompt_toolkit>=3.0.41",

@neutrinoceros neutrinoceros force-pushed the dep/constraints-from-ipython branch from 67c632e to 6035425 Compare November 5, 2025 15:24
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

Good points. Thanks @eerovaher !

Copy link
Copy Markdown
Member

@eerovaher eerovaher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is obvious that the oldestdeps CI job should be using uv's --resolution=lowest strategy, but in practice some of our dependencies have not been declaring the supported versions of their dependencies, for which reason we have been using --resolution=lowest-direct instead. Specifying constraints is better because that only has to be done for the dependencies that are missing that metadata and we can already start using --resolution=lowest for the rest. Eventually all our dependencies should declare the supported versions of their dependencies, at which point we will not need the constraints anymore.

@pllim pllim merged commit 0eb6c0a into astropy:main Nov 5, 2025
33 checks passed
@pllim
Copy link
Copy Markdown
Member

pllim commented Nov 5, 2025

Thanks, all!

@neutrinoceros neutrinoceros deleted the dep/constraints-from-ipython branch November 5, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants