Skip to content

spack style: fix isort on sl:7#41133

Merged
alalazo merged 5 commits intospack:developfrom
alalazo:bugfix/spack-style-fix-isort
Nov 21, 2023
Merged

spack style: fix isort on sl:7#41133
alalazo merged 5 commits intospack:developfrom
alalazo:bugfix/spack-style-fix-isort

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Nov 17, 2023

fixes #41096

Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363

fixes spack#41096

Bump the minimum version required for isort. This should fix
an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363
def isort_root_spec() -> str:
"""Return the root spec used to bootstrap isort"""
return _root_spec("py-isort@4.3.5:")
return _root_spec("py-isort@5")
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.

Suggested change
return _root_spec("py-isort@5")
return _root_spec("py-isort@5:")

https://iscinumpy.dev/post/bound-version-constraints/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is minor, but I would still keep this. isort might have breaking changes on major versions, which is what was happening here. Also, we are not capping at the library level, but at the spack style dependency level.

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.

Up to you. I'm just afraid we'll forget to bump this to 5:6 once 6 is released. We'll eventually end up in the situation where someone is forced to use an old version of Spack (which only supports 5) but needs a newer isort for some reason due to a change in how isort works.

@alalazo alalazo force-pushed the bugfix/spack-style-fix-isort branch from 3539830 to 8332c9c Compare November 20, 2023 15:07
@alalazo alalazo force-pushed the bugfix/spack-style-fix-isort branch from 8332c9c to b862c70 Compare November 20, 2023 15:08
@alalazo alalazo requested a review from adamjstewart November 20, 2023 21:32
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

This is now technically correct

Comment on lines +38 to +39
depends_on("[email protected]:3", when="@5.10")
depends_on("[email protected]:3", when="@5.9")
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.

Could be combined like they used to be.

@alalazo alalazo merged commit b361ffb into spack:develop Nov 21, 2023
@alalazo alalazo deleted the bugfix/spack-style-fix-isort branch November 21, 2023 05:24
@haampie
Copy link
Copy Markdown
Member

haampie commented Nov 23, 2023

@alalazo why is this marked 0.21.1? It's modifying packages.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Nov 23, 2023

It solves an issue with bootstrapping spack style on Python 3.6, and py-isort isn't affecting a lot of packages:

$ spack dependents -t py-isort
ecp-proxy-apps  mlperf-deepcam  py-alpaca-farm  py-avro-python3  py-custodian  py-ocp-models  py-pylint        py-sentry-sdk      py-torchgeo     py-wandb
geopm           py-alpaca-eval  py-apache-beam  py-blight        py-mxfold2    py-openai      py-pytest-isort  py-setuptools-cpp  py-ultralytics  spack

but I'm fine if we don't want the bugfix in the point release.

gabrielctn pushed a commit to gabrielctn/spack that referenced this pull request Nov 24, 2023
Bump the minimum version required for isort. This should fix
an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363
mtaillefumier pushed a commit to mtaillefumier/spack that referenced this pull request Dec 14, 2023
Bump the minimum version required for isort. This should fix
an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 31, 2024
Bump the minimum version required for isort. This should fix
an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spack style -t isort fails on Scientific Linux 7 with system Python3 3.6.8

4 participants