Skip to content

Commit 460a944

Browse files
icanhasmathclaude
andcommitted
Relax Python floor to 3.7
Lowers python_requires and setup.py guard from 3.8 to 3.7, adds the 3.7 Trove classifier, and splits the Cython build requirement so 3.7 users pin to Cython 3.0.x (3.1+ dropped 3.7). Also tightens the requirements.txt filter in setup.py to '://' so environment markers on dependency lines don't accidentally leak into extras_require['source']. No source changes were needed: a scan of src/lxml turned up no 3.8-only syntax or typing imports outside of already-guarded fallbacks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1fd1d6b commit 460a944

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

INSTALL.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ see below.
4141
Requirements
4242
------------
4343

44-
You need Python 3.8+ for lxml 6.0 and later.
44+
You need Python 3.7+ for this Python 3.7-compatible build of lxml 6.0.
45+
Upstream lxml 6.0 and later require Python 3.8+.
4546
You need Python 3.6+ for lxml 5.0 and later.
4647
lxml versions before 5.0 support Python 2.7 and 3.6+.
4748

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[build-system]
2-
requires = ["Cython>=3.2.4", "setuptools"]
2+
requires = [
3+
"Cython>=3.2.4; python_version>='3.8'",
4+
"Cython>=3.0,<3.1; python_version<'3.8'",
5+
"setuptools",
6+
]
37

48
[tool.cibuildwheel]
59
build-verbosity = 1

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Cython>=3.2.4
1+
Cython>=3.2.4; python_version>='3.8'
2+
Cython>=3.0,<3.1; python_version<'3.8'

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# for command line options and supported environment variables, please
88
# see the end of 'setupinfo.py'
99

10-
if sys.version_info[:2] < (3, 8):
11-
print("This lxml version requires Python 3.8 or later.")
10+
if sys.version_info[:2] < (3, 7):
11+
print("This lxml version requires Python 3.7 or later.")
1212
sys.exit(1)
1313

1414
from setuptools import setup
@@ -50,10 +50,10 @@ def static_env_list(name, separator=None):
5050
branch_link = ""
5151

5252
with open("requirements.txt", "r") as f:
53-
deps = [line.strip() for line in f if ':' in line]
53+
deps = [line.strip() for line in f if '://' in line]
5454

5555
extra_options = {
56-
'python_requires': '>=3.8', # NOTE: keep in sync with Trove classifier list below.
56+
'python_requires': '>=3.7', # NOTE: keep in sync with Trove classifier list below.
5757

5858
'extras_require': {
5959
'source': deps,
@@ -233,6 +233,7 @@ def build_packages(files):
233233
'Programming Language :: Cython',
234234
# NOTE: keep in sync with 'python_requires' list above.
235235
'Programming Language :: Python :: 3',
236+
'Programming Language :: Python :: 3.7',
236237
'Programming Language :: Python :: 3.8',
237238
'Programming Language :: Python :: 3.9',
238239
'Programming Language :: Python :: 3.10',

0 commit comments

Comments
 (0)