Skip to content

Commit a830230

Browse files
authored
Merge branch 'master' into fix_1172
2 parents ffb644f + 4268cb1 commit a830230

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

.meta.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
33
[meta]
44
template = "zope-product"
5-
commit-id = "571024f0"
5+
commit-id = "13b9049c"
66

77
[python]
88
with-pypy = false
99
with-docs = true
1010
with-sphinx-doctests = false
1111
with-windows = true
1212
with-macos = true
13-
with-future-python = true
13+
with-future-python = false
1414

1515
[coverage]
1616
fail-under = 80

src/OFS/Image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -939,9 +939,9 @@ def getImageInfo(data):
939939
xmldoc = minidom.parseString(data)
940940
except Exception:
941941
return content_type, width, height
942+
w = width
943+
h = height
942944
for svg in xmldoc.getElementsByTagName('svg'):
943-
w = width
944-
h = height
945945
content_type = 'image/svg+xml'
946946
if 'height' in svg.attributes and 'width' in svg.attributes:
947947
w = svg.attributes['width'].value
@@ -965,8 +965,8 @@ def getImageInfo(data):
965965
viewBox = [int(float(x)) for x in viewBox.split(' ')]
966966
w = viewBox[2] - viewBox[0]
967967
h = viewBox[3] - viewBox[1]
968-
width = int(w)
969-
height = int(h)
968+
width = int(w)
969+
height = int(h)
970970

971971
return content_type, width, height
972972

src/ZPublisher/HTTPRequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ class LimitedFileReader:
15051505
"""File wrapper emulating EOF."""
15061506

15071507
# attributes to be delegated to the file
1508-
DELEGATE = set(["close", "closed", "fileno", "mode", "name"])
1508+
DELEGATE = {"close", "closed", "fileno", "mode", "name"}
15091509

15101510
def __init__(self, fp, limit):
15111511
"""emulate EOF after *limit* bytes have been read.

tox.ini

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[tox]
44
minversion = 3.18
55
envlist =
6+
release-check
67
lint
78
py37
89
py38
@@ -52,6 +53,23 @@ commands =
5253
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/src setup.py
5354
docformatter --in-place --recursive {toxinidir}/src setup.py
5455

56+
[testenv:release-check]
57+
description = ensure that the distribution is ready to release
58+
basepython = python3
59+
skip_install = true
60+
deps =
61+
twine
62+
build
63+
check-manifest
64+
check-python-versions >= 0.20.0
65+
wheel
66+
commands_pre =
67+
commands =
68+
check-manifest
69+
check-python-versions
70+
python -m build --sdist --no-isolation
71+
twine check dist/*
72+
5573
[testenv:lint]
5674
basepython = python3
5775
commands_pre =
@@ -61,11 +79,7 @@ allowlist_externals =
6179
commands =
6280
isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
6381
flake8 {toxinidir}/src {toxinidir}/setup.py
64-
check-manifest
65-
check-python-versions
6682
deps =
67-
check-manifest
68-
check-python-versions
6983
flake8
7084
isort
7185
# Useful flake8 plugins that are Python and Plone specific:

0 commit comments

Comments
 (0)