From fdf353bdaefe214798603198a55e18b7b0fea697 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Tue, 4 Oct 2022 17:06:37 +0200 Subject: [PATCH] Remove icalendar pin for unsupported Python 3.7. Update constraints scripts to not handle Python 3.7. --- release/combine-constraints.py | 17 ++++------------- release/constraints.txt | 3 +-- release/tox.ini | 7 +------ sources.cfg | 1 - versions.cfg | 3 --- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/release/combine-constraints.py b/release/combine-constraints.py index 543cd151f1..e0cc6ab493 100644 --- a/release/combine-constraints.py +++ b/release/combine-constraints.py @@ -28,27 +28,23 @@ def parse_file(filename): constraints = os.path.join(directory, "constraints.txt") -constraints37 = os.path.join(directory, "constraints37.txt") constraints38 = os.path.join(directory, "constraints38.txt") constraints39 = os.path.join(directory, "constraints39.txt") constraints310 = os.path.join(directory, "constraints310.txt") -for filename in (constraints37, constraints38, constraints39, constraints310): +for filename in (constraints38, constraints39, constraints310): if not os.path.exists(filename): print(f"ERROR: {filename} does not exist.") print( - "Run: tox -p auto -e constraints2,constraints37,constraints38,constraints39,constraints310,constraints" + "Run: tox -p auto -e constraints2,constraints38,constraints39,constraints310,constraints" ) sys.exit(1) -c37 = parse_file(constraints37) c38 = parse_file(constraints38) c39 = parse_file(constraints39) c310 = parse_file(constraints310) # Gather them all in one dictionary. pins = defaultdict(dict) -for package, version in c37.items(): - pins[package][37] = version for package, version in c38.items(): pins[package][38] = version for package, version in c39.items(): @@ -59,20 +55,15 @@ def parse_file(filename): # Combine them. combi = [] for package, versions in pins.items(): - py37_version = versions.pop(37, None) py38_version = versions.pop(38, None) py39_version = versions.pop(39, None) py310_version = versions.pop(310, None) - if py37_version == py38_version == py39_version == py310_version: + if py38_version == py39_version == py310_version: # All versions are the same. - combi.append(f"{package}=={py37_version}") + combi.append(f"{package}=={py310_version}") continue # Some versions are different or missing. # Start with the lowest Python. - if py37_version is not None: - combi.append(f'{package}=={py37_version}; python_version == "3.7"') - if not (py38_version or py39_version or py310_version): - continue if py38_version == py39_version == py310_version: # All higher Python versions are the same. combi.append(f'{package}=={py38_version}; python_version >= "3.8"') diff --git a/release/constraints.txt b/release/constraints.txt index 228408e065..ea4f94853e 100644 --- a/release/constraints.txt +++ b/release/constraints.txt @@ -114,8 +114,7 @@ gunicorn==20.1.0 h11==0.13.0 httplib2==0.20.4 i18ndude==5.5.0 -icalendar==4.1.0; python_version == "3.7" -icalendar==5.0.0a1; python_version >= "3.8" +icalendar==5.0.0a1 idna==3.3 imagesize==1.3.0 importlib-metadata==4.12.0 diff --git a/release/tox.ini b/release/tox.ini index d5f49797ae..5a5dd1b147 100644 --- a/release/tox.ini +++ b/release/tox.ini @@ -1,6 +1,5 @@ [tox] envlist = - constraints37, constraints38, constraints39, constraints310, @@ -12,10 +11,6 @@ basepython = python3 skip_install = true commands_pre = python -m pip install -r {toxinidir}/../requirements.txt -[testenv:constraints37] -basepython = python3.7 -commands = python create-constraints.py {toxinidir}/../ecosystem.cfg {toxinidir}/constraints37.txt - [testenv:constraints38] basepython = python3.8 commands = python create-constraints.py {toxinidir}/../ecosystem.cfg {toxinidir}/constraints38.txt @@ -31,7 +26,7 @@ commands = python create-constraints.py {toxinidir}/../ecosystem.cfg {toxinidir} [testenv:constraints] basepython = python3 # Specifying other tox envs as dependencies helps when running in parallel. -depends = constraints37, constraints38, constraints39, constraints310 +depends = constraints38, constraints39, constraints310 commands_pre = commands = python combine-constraints.py {toxinidir} diff --git a/sources.cfg b/sources.cfg index b163bf8394..867e3a4423 100644 --- a/sources.cfg +++ b/sources.cfg @@ -42,7 +42,6 @@ five.customerize = git ${remotes:zope}/five.customerize.git p five.intid = git ${remotes:plone}/five.intid.git pushurl=${remotes:plone_push}/five.intid.git branch=master five.pt = git ${remotes:zope}/five.pt.git pushurl=${remotes:zope_push}/five.pt.git branch=master i18ndude = git ${remotes:collective}/i18ndude.git pushurl=${remotes:collective_push}/i18ndude.git branch=master -# Note: on Python 3.7 you should use icalendar branch 4.x. icalendar = git ${remotes:collective}/icalendar.git pushurl=${remotes:collective_push}/icalendar.git branch=master Plone = git ${remotes:plone}/Plone.git pushurl=${remotes:plone_push}/Plone.git branch=master plone.alterego = git ${remotes:plone}/plone.alterego.git pushurl=${remotes:plone_push}/plone.alterego.git branch=master diff --git a/versions.cfg b/versions.cfg index 5ca2169760..6366d72c02 100644 --- a/versions.cfg +++ b/versions.cfg @@ -225,9 +225,6 @@ wsproto = 1.1.0 wrapt = 1.14.1 zipp = 3.8.1 -[versions:python37] -icalendar = 4.1.0 - [versionannotations] # keep this alphabetical please prompt-toolkit =