Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New errors emerge after upgrade to 0.4.0 #26

Closed
jaraco opened this issue Jul 9, 2024 · 4 comments
Closed

New errors emerge after upgrade to 0.4.0 #26

jaraco opened this issue Jul 9, 2024 · 4 comments

Comments

@jaraco
Copy link
Contributor

jaraco commented Jul 9, 2024

With the 0.4.0 release of pytest-ruff, the Setuptools test suite has started failing on the TRY003 checks. Downgrading to pytest-ruff 0.3.2 restores the previous behavior. I don't see anything in the changelog indicating why new checks would start failing.

Is it expected that previously passing checks are now failing with pytest-ruff 0.4?

@jaraco
Copy link
Contributor Author

jaraco commented Jul 9, 2024

After a bit more examination. It seems the issue is multi-faceted. Setuptools recently added opt-in rules for TRY and ruff recently added support for TRY003 (the one that's failing). What I still don't understand is why the upgrade from pytest 0.3.2 to 0.4.0 caused these checks to start firing.

@Avasam
Copy link

Avasam commented Jul 9, 2024

pypa/setuptools#4454 (comment)

Btw @jaraco TRY003 isn't new at all, it's been there since astral-sh/ruff@v0.0.236 (release) , and I don't see any mention of it since ruff 0.1 astral-sh/ruff@main/CHANGELOG.md

My best guess is that pytest-ruff 0.4 did fix something that was hiding errors

@DimitriPapadopoulos 's pypa/setuptools#4450 might've perfectly arrived as we started using Ruff 0.5 pypa/setuptools/actions/runs/9724519803/job/26840815339#step:5:26

Ruff 0.5 wasn't compatible with pytest-ruff 0.3.2 apparently #23 (not sure why in our case it silently passed instead of failing though). But that would explain why it passed the CI until some fixes in pytest-ruff 0.4

No idea how @DimitriPapadopoulos didn't get TRY003 locally, because I get it on setuptool's repo as far back as ruff 0.1.8 (maybe you ran through tox / pytest-ruff ? )

@DimitriPapadopoulos
Copy link

DimitriPapadopoulos commented Jul 9, 2024

See #22?

@jaraco
Copy link
Contributor Author

jaraco commented Jul 9, 2024

Thanks everyone for jumping on this quickly and for clarifying the situation. I don't think there's anything else to be done here.

@jaraco jaraco closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants