Skip to content

Commit 981e38a

Browse files
Merge branch 'python-openxml:master' into master
2 parents a366f68 + 36cac78 commit 981e38a

File tree

10 files changed

+62
-57
lines changed

10 files changed

+62
-57
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: python
22
python:
3+
- "3.8"
34
- "3.6"
4-
- "3.5"
55
- "2.7"
66
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
77
install: pip install -r requirements.txt

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Release History
44
---------------
55

6+
0.8.11 (2021-05-15)
7+
+++++++++++++++++++
8+
9+
- Small build changes and Python 3.8 version changes like collections.abc location.
10+
11+
612
0.8.10 (2019-01-08)
713
+++++++++++++++++++
814

docs/api/enum/WdLineSpacing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Example::
1010
from docx.enum.text import WD_LINE_SPACING
1111

1212
paragraph = document.add_paragraph()
13-
paragraph.line_spacing_rule = WD_LINE_SPACING.EXACTLY
13+
paragraph.paragraph_format.line_spacing_rule = WD_LINE_SPACING.EXACTLY
1414

1515
----
1616

docs/api/style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Style-related objects
66

77
A style is used to collect a set of formatting properties under a single name
88
and apply those properties to a content object all at once. This promotes
9-
formatting consistency thoroughout a document and across related documents
9+
formatting consistency throughout a document and across related documents
1010
and allows formatting changes to be made globally by changing the definition
1111
in the appropriate style.
1212

docs/dev/analysis/features/shapes/picture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Candidate protocol
1212
::
1313

1414
>>> run = paragraph.add_run()
15-
>>> inline_shape = run.add_inline_picture(file_like_image, MIME_type=None)
15+
>>> inline_shape = run.add_picture(file_like_image, MIME_type=None)
1616
>>> inline_shape.width = width
1717
>>> inline_shape.height = height
1818

docx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from docx.api import Document # noqa
44

5-
__version__ = '0.8.10'
5+
__version__ = "0.8.11"
66

77

88
# register custom Part classes with opc package reader

docx/compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def is_string(obj):
3434

3535
def is_string(obj):
3636
"""Return True if *obj* is a string, False otherwise."""
37-
return isinstance(obj, basestring)
37+
return isinstance(obj, basestring) # noqa
3838

39-
Unicode = unicode
39+
Unicode = unicode # noqa

docx/opc/compat.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
Provides Python 2/3 compatibility objects
55
"""
66

7-
from __future__ import (
8-
absolute_import, division, print_function, unicode_literals
9-
)
7+
from __future__ import absolute_import, division, print_function, unicode_literals
108

119
import sys
1210

@@ -29,6 +27,7 @@ def is_string(obj):
2927
"""
3028
return isinstance(obj, str)
3129

30+
3231
# ===========================================================================
3332
# Python 2 versions
3433
# ===========================================================================
@@ -47,4 +46,4 @@ def is_string(obj):
4746
"""
4847
Return True if *obj* is a string, False otherwise.
4948
"""
50-
return isinstance(obj, basestring)
49+
return isinstance(obj, basestring) # noqa

setup.py

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,62 @@ def text_of(relpath):
2121
# Read the version from docx.__version__ without importing the package
2222
# (and thus attempting to import packages it depends on that may not be
2323
# installed yet)
24-
version = re.search(
25-
"__version__ = '([^']+)'", text_of('docx/__init__.py')
26-
).group(1)
24+
version = re.search(r'__version__ = "([^"]+)"', text_of("docx/__init__.py")).group(1)
2725

2826

29-
NAME = 'python-docx'
27+
NAME = "python-docx"
3028
VERSION = version
31-
DESCRIPTION = 'Create and update Microsoft Word .docx files.'
32-
KEYWORDS = 'docx office openxml word'
33-
AUTHOR = 'Steve Canny'
34-
AUTHOR_EMAIL = '[email protected]'
35-
URL = 'https://github.com/python-openxml/python-docx'
36-
LICENSE = text_of('LICENSE')
37-
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
38-
PACKAGE_DATA = {'docx': ['templates/*.xml', 'templates/*.docx']}
29+
DESCRIPTION = "Create and update Microsoft Word .docx files."
30+
KEYWORDS = "docx office openxml word"
31+
AUTHOR = "Steve Canny"
32+
AUTHOR_EMAIL = "[email protected]"
33+
URL = "https://github.com/python-openxml/python-docx"
34+
LICENSE = text_of("LICENSE")
35+
PACKAGES = find_packages(exclude=["tests", "tests.*"])
36+
PACKAGE_DATA = {"docx": ["templates/*.xml", "templates/*.docx"]}
3937

40-
INSTALL_REQUIRES = ['lxml>=2.3.2']
41-
TEST_SUITE = 'tests'
42-
TESTS_REQUIRE = ['behave', 'mock', 'pyparsing', 'pytest']
38+
INSTALL_REQUIRES = ["lxml>=2.3.2"]
39+
TEST_SUITE = "tests"
40+
TESTS_REQUIRE = ["behave", "mock", "pyparsing", "pytest"]
4341

4442
CLASSIFIERS = [
45-
'Development Status :: 3 - Alpha',
46-
'Environment :: Console',
47-
'Intended Audience :: Developers',
48-
'License :: OSI Approved :: MIT License',
49-
'Operating System :: OS Independent',
50-
'Programming Language :: Python',
51-
'Programming Language :: Python :: 2',
52-
'Programming Language :: Python :: 2.6',
53-
'Programming Language :: Python :: 2.7',
54-
'Programming Language :: Python :: 3',
55-
'Programming Language :: Python :: 3.3',
56-
'Programming Language :: Python :: 3.4',
57-
'Topic :: Office/Business :: Office Suites',
58-
'Topic :: Software Development :: Libraries'
43+
"Development Status :: 3 - Alpha",
44+
"Environment :: Console",
45+
"Intended Audience :: Developers",
46+
"License :: OSI Approved :: MIT License",
47+
"Operating System :: OS Independent",
48+
"Programming Language :: Python",
49+
"Programming Language :: Python :: 2",
50+
"Programming Language :: Python :: 2.6",
51+
"Programming Language :: Python :: 2.7",
52+
"Programming Language :: Python :: 3",
53+
"Programming Language :: Python :: 3.3",
54+
"Programming Language :: Python :: 3.4",
55+
"Topic :: Office/Business :: Office Suites",
56+
"Topic :: Software Development :: Libraries",
5957
]
6058

61-
LONG_DESCRIPTION = text_of('README.rst') + '\n\n' + text_of('HISTORY.rst')
59+
LONG_DESCRIPTION = text_of("README.rst") + "\n\n" + text_of("HISTORY.rst")
6260

61+
ZIP_SAFE = False
6362

6463
params = {
65-
'name': NAME,
66-
'version': VERSION,
67-
'description': DESCRIPTION,
68-
'keywords': KEYWORDS,
69-
'long_description': LONG_DESCRIPTION,
70-
'author': AUTHOR,
71-
'author_email': AUTHOR_EMAIL,
72-
'url': URL,
73-
'license': LICENSE,
74-
'packages': PACKAGES,
75-
'package_data': PACKAGE_DATA,
76-
'install_requires': INSTALL_REQUIRES,
77-
'tests_require': TESTS_REQUIRE,
78-
'test_suite': TEST_SUITE,
79-
'classifiers': CLASSIFIERS,
64+
"name": NAME,
65+
"version": VERSION,
66+
"description": DESCRIPTION,
67+
"keywords": KEYWORDS,
68+
"long_description": LONG_DESCRIPTION,
69+
"author": AUTHOR,
70+
"author_email": AUTHOR_EMAIL,
71+
"url": URL,
72+
"license": LICENSE,
73+
"packages": PACKAGES,
74+
"package_data": PACKAGE_DATA,
75+
"install_requires": INSTALL_REQUIRES,
76+
"tests_require": TESTS_REQUIRE,
77+
"test_suite": TEST_SUITE,
78+
"classifiers": CLASSIFIERS,
79+
"zip_safe": ZIP_SAFE,
8080
}
8181

8282
setup(**params)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python_classes = Test Describe
1212
python_functions = it_ they_ and_it_ but_it_
1313

1414
[tox]
15-
envlist = py26, py27, py34, py35, py36
15+
envlist = py26, py27, py34, py35, py36, py38
1616

1717
[testenv]
1818
deps =

0 commit comments

Comments
 (0)