-
Notifications
You must be signed in to change notification settings - Fork 53
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.7 support #769
base: main
Are you sure you want to change the base?
Conversation
Cannot find were is defined python 3.7 CI to remove it 🤔 |
You still have a few Also change the |
Not sure what policy is for this. Last year when python 3.7 was EOL we still kept compatibility since academic software are notoriously slow to adopt. Should we adopt dropping |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #769 +/- ##
==========================================
- Coverage 81.99% 81.91% -0.09%
==========================================
Files 68 68
Lines 3933 3903 -30
==========================================
- Hits 3225 3197 -28
+ Misses 708 706 -2 ☔ View full report in Codecov by Sentry. |
I'd probably like to wait till 1.0 (which is probably ~3 months away); dropping a Python version means we have LTS support on the last 3.7 one. Maybe sooner, if pybind11 drops 3.7 (currently will be dropping 3.6 first!). Hatchling plugins require 3.8+, we can fully use uv if we use 3.8+, and I'll be looking over the changes here and probably drooling a little... One issue is that bumping here causes |
src/scikit_build_core/_logging.py
Outdated
opts: Any = {} | ||
else: | ||
opts: Any = {"stacklevel": 2} | ||
opts: Any = {"stacklevel": 2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could actually just inline this now.
🤩
Oh,
Shouldn't it still be possible to use the last available scikit-build-core version that supported 3.7? I guess that's ehat you want 1.0 for. This should only affect PyPI distributions since In Fedora we finally added dummy |
Around that time will be EOSed 3.8.
LTS means freezing API/ABI. |
Probably that would require releasing
Generally LTS distros would be responsible to backport CVE and bug fixes. If upstream is able to help (at least with merging patches and releasing bug fixes) it is a great help. Testing for both branches upstream would be hard, but maybe we can add some runners based on EPEL if dependencies allow |
OK I've added more manual cleanups to remove python<=3.7 support. It would be good to check what changes |
That is true. On top of that as critical issue could be treated some functional bug (something is not working as expected). [tkloczko@pers-jacek SPECS.fedora]$ ls -1 python-*.spec | wc -l; grep -l ^%pytest python-*.spec | wc -l
3309
1149 In distro which I'm using [tkloczko@pers-jacek SPECS]$ ls -1 python-*.spec | wc -l; grep -l ^%pytest python-*.spec | wc -l
1259
1241 and in the past I was able to catch really huge number of such functional issues not only in packaged modules but in other modules involved in testing procedure of just packaged module. |
It's a bit complicated because: tests mightbe run from
Indeed and that's why packagers can be so useful for the overall ecosystem. We do need to be flexible with upstream's workflow though. Luckily scikit-build-core is quite accommodating on this. PS: can you mark the PR as draft to avoid accidental merges. I am a bit paranoid of my fat fingers. |
Trust me .. it is not 😋 [tkloczko@pers-jacek SPECS]$ rpm -E %pytest
\
ASMFLAGS="-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security";
CFLAGS="-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security";
CXXFLAGS="-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security";
FFLAGS="-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules";
FCFLAGS="-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules";
LDFLAGS="-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin";
RUSTFLAGS="-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-Wl,--as-needed -C link-arg=-Wl,--build-id=sha1 -C link-arg=-Wl,-z,now -C link-arg=-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -C link-arg=-Wl,-z,pack-relative-relocs -C link-arg=-Wl,-z,relro -C link-arg=-flto=auto --cap-lints=warn" ;
VALAFLAGS="-g" ;
CC="/usr/bin/gcc"; CXX="/usr/bin/g++"; FC="/usr/bin/gfortran";
AR="/usr/bin/gcc-ar"; NM="/usr/bin/gcc-nm"; RANLIB="/usr/bin/gcc-ranlib";
export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS;
\
PATH=/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/bin:$PATH \
LD_LIBRARY_PATH=/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib64 \
PYTHONDONTWRITEBYTECODE=1 \
PDM_BUILD_SCM_VERSION=%{version} \
PBR_VERSION=%{version} \
SETUPTOOLS_SCM_PRETEND_VERSION=%{version} \
PYTHONPATH=${PYTHONPATH:-/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib/python3.10/site-packages} \
\
/usr/bin/pytest -ra -m "not network" As you see in this case such injection of the $PYTHONPATH into pytest script env variables is provided 😋 |
Done 👍 |
I was referring to the
I've had hit-and-miss experience there. Most recent was with packaging |
[tkloczko@pers-jacek SPECS.fedora]$ grep %check python-*.spec | wc -l
2771 As you see ~20% of all python modules in Fedora has no at all any test suite execution [tkloczko@pers-jacek SPECS.fedora]$ grep %tox python-*.spec | wc -l
247 In all those cases it can be used pytest. Testing that module is importable only [tkloczko@pers-jacek SPECS.fedora]$ grep %pyproject_check_import python-*.spec | wc -l
490 For everythingeelse (1/3) are used even [tkloczko@pers-jacek SPECS.fedora]$ grep "setup.py test" python-*.spec | wc -l
261 zope test runner and nox [tkloczko@pers-jacek SPECS.fedora]$ grep "zope-testrunner " python-*.spec | wc -l
8
[tkloczko@pers-jacek SPECS.fedora]$ grep "nox " python-*.spec | wc -l
13 nox it is just another variation of the tox (can be replaced by pytest). Zope test runner as well can be handled by pytest (sometimes it is only necessary to rename test suite files to tests_*.py) In other words pytest is now de facto standard and only other testing framework which is under development is standard |
According to https://endoflife.date/python python 3.7 has been EOSed 27 Jun 2023. Filter all code over `pyupgrade --py38-plus`. Signed-off-by: Tomasz Kłoczko <[email protected]>
Signed-off-by: Tomasz Kłoczko <[email protected]>
Signed-off-by: Tomasz Kłoczko <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
This adds an `if.scikit-build-version`, and makes sure it can be used to gate features not yet implemented. This should help with #769 by providing a way to support old scikit-build-core's on Python 3.7 even after we drop support. Also fixes auto minimum-version to respect markers. --------- Signed-off-by: Henry Schreiner <[email protected]>
FWIW, 3.7 is the third most popular Python version downloading scikit-build-core. 3.11 dominates by a ton, though - factor of 10. Something must be up with that, you don't see the same domination on pip or other packages. I expect some large user that often builds from source is using only 3.11. |
Looks like in pyproject.toml still is listed 3.7. scikit-build-core/pyproject.toml Line 12 in ca529d6
So that line should be updated to requires-python = ">=3.8" .
|
According to https://endoflife.date/python python 3.7 has been EOSed 27 Jun 2023.
Filter all code over
pyupgrade --py38-plus
.