Skip to content

Commit 49c52f9

Browse files
authored
Dropping support for Python 3.7 (#2207)
1 parent a940d68 commit 49c52f9

File tree

14 files changed

+23
-62
lines changed

14 files changed

+23
-62
lines changed

.github/workflows/download-arm64-libs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
VERSION += f"-rc{sys.version_info.serial}"
2929

3030
URL = f"https://www.nuget.org/api/v2/package/pythonarm64/{VERSION}"
31-
PATH = dest / f"pythonarm64.{VERSION}.zip"
31+
DEST_PATH = dest / f"pythonarm64.{VERSION}.zip"
3232

33-
if PATH.is_file():
34-
print("Skipping download because", PATH, "exists")
33+
if DEST_PATH.is_file():
34+
print("Skipping download because", DEST_PATH, "exists")
3535
else:
3636
print("Downloading", URL)
37-
urlretrieve(URL, PATH)
38-
print("Downloaded", PATH)
37+
urlretrieve(URL, DEST_PATH)
38+
print("Downloaded", DEST_PATH)
3939

40-
with ZipFile(PATH, "r") as zf:
40+
with ZipFile(DEST_PATH, "r") as zf:
4141
for name in zf.namelist():
4242
zip_path = pathlib.PurePath(name)
4343
if zip_path.parts[:2] == ("tools", "libs"):

.github/workflows/main.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
21+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
2222
architecture: ["x64", "x86"]
2323

2424
steps:
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
python --version
3939
pip --version
40-
pip install --upgrade setuptools wheel
40+
pip install --upgrade setuptools>=74 wheel
4141
4242
- name: Build and install
4343
run: |
@@ -86,7 +86,7 @@ jobs:
8686
run: |
8787
python --version
8888
pip --version
89-
pip install --upgrade setuptools wheel
89+
pip install --upgrade setuptools>=74 wheel
9090
9191
- name: Obtain ARM64 library files
9292
run: |
@@ -117,7 +117,7 @@ jobs:
117117
cache-dependency-path: .github/workflows/main.yml
118118
- run: pip install clang-format pycln
119119
- run: pycln . --config=pycln.toml --check
120-
- uses: chartboost/ruff-action@v1
120+
- uses: astral-sh/ruff-action@v1
121121
with:
122122
version: "0.4.5"
123123
- uses: psf/black@stable
@@ -134,7 +134,6 @@ jobs:
134134
strategy:
135135
fail-fast: false
136136
matrix:
137-
# mypy 1.5 dropped support for Python 3.7
138137
# mypy won't understand "3.13-dev", keeping the CI simple by just omitting it
139138
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
140139
steps:
@@ -154,7 +153,7 @@ jobs:
154153
strategy:
155154
fail-fast: false
156155
matrix:
157-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
156+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
158157
steps:
159158
- uses: actions/checkout@v4
160159
- uses: actions/setup-python@v5

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html.
1414
Coming in build 309, as yet unreleased
1515
--------------------------------------
1616

17+
* Dropped support for Python 3.7 (#2207, @Avasam)
1718
* Implement record pointers as [in, out] method parameters of a Dispatch Interface (#2310)
1819
* Fix memory leak converting to PyObject from some SAFEARRAY elements (#2316)
1920
* Fix bug where makepy support was unnecessarily generated (#2354, #2353, @geppi)

Pythonwin/pywin/test/test_pywin.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def setUpClass(cls):
4747
def _restore_oe():
4848
sys.stdout, sys.stderr = cls.std_oe_orig
4949

50-
if sys.version_info >= (3, 8):
51-
cls.addClassCleanup(_restore_oe)
50+
cls.addClassCleanup(_restore_oe)
5251
sys.argv[1:] = ["/new", src_dir + "\\_dbgscript.py"]
5352
if not _indebugger:
5453
thisApp.InitInstance()
@@ -65,7 +64,7 @@ def tearDownClass(cls):
6564
win32api.PostQuitMessage()
6665
win32gui.PumpWaitingMessages()
6766
cls.app.ExitInstance()
68-
sys.stdout, sys.stderr = cls.std_oe_orig # py3.7
67+
sys.stdout, sys.stderr = cls.std_oe_orig
6968

7069
def test_1_pydocs_and_finddlg(self):
7170
mf = win32ui.GetMainFrame()

build_all.bat

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
py -3.7-32 setup.py -q build
2-
@if errorlevel 1 goto failed
3-
py -3.7 setup.py -q build
4-
@if errorlevel 1 goto failed
51
py -3.8-32 setup.py -q build
62
@if errorlevel 1 goto failed
73
py -3.8 setup.py -q build

build_env.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ from the pywin32 directory.
149149
- Update `setuptools` and set the following environment variables to ensure it is used:
150150

151151
```shell
152-
set SETUPTOOLS_USE_DISTUTILS=1
153152
set DISTUTILS_USE_SDK=1
154153
```
155154

com/win32com/test/pippo_server.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ def Method3(self, in1):
4141

4242

4343
def BuildTypelib():
44-
if sys.version_info >= (3, 8):
45-
from setuptools.modified import newer
46-
else:
47-
from distutils.dep_util import newer
44+
from setuptools.modified import newer
4845

4946
this_dir = os.path.dirname(__file__)
5047
idl = os.path.abspath(os.path.join(this_dir, "pippo.idl"))

make_all.bat

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ rem Now the binaries.
1313
rem Check /build_env.md#build-environment to make sure you have all the required components installed
1414

1515
rem (bdist_wininst needs --target-version to name the installers correctly!)
16-
py -3.7-32 setup.py -q bdist_wininst --skip-build --target-version=3.7
17-
py -3.7-32 setup.py -q bdist_wheel --skip-build
18-
py -3.7 setup.py -q bdist_wininst --skip-build --target-version=3.7
19-
py -3.7 setup.py -q bdist_wheel --skip-build
20-
2116
py -3.8-32 setup.py -q bdist_wininst --skip-build --target-version=3.8
2217
py -3.8-32 setup.py -q bdist_wheel --skip-build
2318
py -3.8 setup.py -q bdist_wininst --skip-build --target-version=3.8

mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[mypy]
22
show_column_numbers = true
33
; Target the oldest supported version in editors and default CLI
4-
; mypy 1.5 dropped support for Python 3.7
54
python_version = 3.8
65

76
strict = true

pyrightconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"typeCheckingMode": "basic",
33
// Target the oldest supported version in editors and default CLI
4-
"pythonVersion": "3.7",
4+
"pythonVersion": "3.8",
55
// Keep it simple for now by allowing both mypy and pyright to use `type: ignore`
66
"enableTypeIgnoreComments": true,
77
// Exclude from scanning when running pyright

0 commit comments

Comments
 (0)