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

Drop python 3.8 support #12875

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Pierre-Sassoulas
Copy link
Contributor

Refs #12874

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

Looks lovely at first glance

.github/workflows/test.yml Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft October 10, 2024 16:31
.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
Comment on lines 966 to 971
if upframe.f_code.co_name == "_makepath":
# Only raise with expected calls, but not via e.g. inspect for
# py38-windows.
# py38-windows. (?)
raised += 1
raise OSError(2, "custom_oserror")
return orig_path_cwd()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what to do here, advise welcome

Copy link
Member

@webknjaz webknjaz Oct 10, 2024

Choose a reason for hiding this comment

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

#6529 does not offer any explanation, however #6463 (comment) links it and implies that there might've been flakiness in the Codecov uploader. But this was like almost 5 years ago, and Codecov has since rewritten their uploader 3 times. We've additionally made it less flaky by hardcoding a plain-text token a few months ago.

Looking into the coverage reports, something weird is happening. The if-line is marked as covered partially, both in this PR and on main:

However, the return line is reported as 100% covered in the PR (https://app.codecov.io/gh/pytest-dev/pytest/pull/12875/blob/testing/code/test_excinfo.py#L971) while on main it's marked as not covered (https://app.codecov.io/gh/pytest-dev/pytest/blob/main/testing%2Fcode%2Ftest_excinfo.py#L966).

AFAIU, the raise instruction can only be reached on if True and the return statement would be reachable on if False. That should cover both branches of the if-block. So I don't understand why the conditional is marked with partial coverage.

_makepath() is also fully covered in both cases:

P.S. While looking into Codecov, I realized that it does not show any coverage for src/pytest/ — it's just not there. It looks like we also have Coveragepy misconfigured or something. Something to investigate.

tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Oct 10, 2024
@Pierre-Sassoulas
Copy link
Contributor Author

Pierre-Sassoulas commented Oct 10, 2024

Changed the configuration of the repo so build (ubuntu-py38) and build (windows-py38) are not required anymore but 3.13 is. Two readthedoc warnings appeared related to sphinx_issues, not sure how to fix:

WARNING: while setting up extension sphinx_issues: role 'cve' is already registered, it will be overridden [app.add_role]
WARNING: while setting up extension sphinx_issues: role 'cwe' is already registered, it will be overridden [app.add_role]

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review October 10, 2024 21:43
@Pierre-Sassoulas Pierre-Sassoulas changed the title [Work in progress] Drop python 3.8 support Drop python 3.8 support Oct 10, 2024
@@ -53,6 +53,8 @@ repos:
rev: v3.17.0
hooks:
- id: pyupgrade
args:
- "--py39-plus"
stages: [manual]
Copy link
Member

Choose a reason for hiding this comment

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

Why is this manual, by the way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's the full discussion about it : #12418, the gist of it is that ruff does what pyupgrade does and the two are not out of sync often enough to make launching pyupgrade everytime worth it.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, interesting. I'd suggest that this is a good reason to put a code comment in this place :)

@webknjaz
Copy link
Member

@Teri53 @TeriThetha please stop spamming.

@webknjaz
Copy link
Member

@nicoddemus @RonnyPfannschmidt @The-Compiler can anybody ban the spammer, please?

@TeriThetha
Copy link

Sorry won't happen again

@webknjaz
Copy link
Member

🙄 c'mon...
spam-post-appology

@nicoddemus
Copy link
Member

Blocked.

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

i like it !

the messy nature of the github matrix makes me wonder,
if we should investigate a script to generate it as a followup

its so easy to make mistakes in it, its scary

- name: "windows-py38"
python: "3.8"
os: windows-latest
tox_env: "py38-unittestextras"
Copy link
Member

Choose a reason for hiding this comment

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

i believe this one need a python 3.9 variant as well,

Copy link
Member

Choose a reason for hiding this comment

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

I've been meaning to ask why this only uses inclusions? Usually, combining them with builtin matrix generation works better..

Copy link
Member

Choose a reason for hiding this comment

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

im not sure what you mean, i believe we had a number of special/slow envs that are only used for very specific tests (freeze, pypy, pluggy) and as far as i know this was the best working solution known at the time - if there is something better, i'd love to see that

as far as i understand/remember the builtin matrix would have generated a variant product, when we want a subset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided (automation) changelog entry is part of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants