762 Commits

Author SHA1 Message Date
Cosimo Lupo
94c8bcc333
Bump version: 2.3.1 → 2.3.2.dev0 2018-07-21 19:18:11 +01:00
Cosimo Lupo
902fbc29d6
Release 2.3.1 2018-07-21 18:43:21 +01:00
Cosimo Lupo
e51f81dce4
Bump version: 2.3.0 → 2.3.1.dev0 2018-07-21 18:36:31 +01:00
Cosimo Lupo
6072fe1802
plistlib: rename some private functions
to better match the plist element names they are meant to construct
2018-07-21 18:34:27 +01:00
Cosimo Lupo
0da87b4ccc
Merge pull request #163 from anthrotype/use-bultin-types
add use_bultin_types option
2018-07-20 19:36:38 +01:00
Cosimo Lupo
ab3e069a25
test_plistlib: parametrize tests with use_builtin_types option 2018-07-20 19:25:19 +01:00
Cosimo Lupo
5dcf204729
plistlib: add use_builtin_types option
Fixes https://github.com/unified-font-object/ufoLib/issues/162
2018-07-20 19:20:33 +01:00
Ben Kiel
46db1b06b1
Don't run codecov on tests. 2018-07-16 15:13:18 -05:00
Ben Kiel
2486c6d31d
Add codecov badge 2018-07-16 15:10:58 -05:00
Cosimo Lupo
0602e1fe7b
Release 2.3.0 2018-07-16 15:08:35 +02:00
Cosimo Lupo
bced5b62b9
Bump version: 2.2.5.dev0 → 2.3.0.dev0 2018-07-16 15:01:32 +02:00
Cosimo Lupo
25c1060059
Merge pull request #161 from anthrotype/optional-lxml
WIP: make lxml (and singledispatch) optional
2018-07-16 14:59:24 +02:00
Cosimo Lupo
eb03bfeef5
README.md: mention alternative installation method with [lxml] extras notation
[ci skip]
2018-07-16 14:41:50 +02:00
Cosimo Lupo
42a3428d0f
writeLayerContents: make sure bytes strings in layerOrder are decoded
looks like defcon LayerSet.newLayer does not ensure the 'name' argument is a unicode
string, so serializing the layercontents.plist with the new ufoLib.plistlib may
lead to the layer name being encoded as a <data> element instead of a <string>.

Thanks Miguel for noticing this.
2018-07-15 21:32:13 +01:00
Cosimo Lupo
e15d56a2d3
test_etree: add test for pretty_print=True with ordered dict 2018-07-15 13:55:01 +01:00
Cosimo Lupo
bc7494b7f0
test_etree: start adding some unit tests to etree module 2018-07-15 12:32:17 +01:00
Cosimo Lupo
0c0d46e53b
etree: pretty_print is False by default (like in lxml) 2018-07-15 12:31:11 +01:00
Cosimo Lupo
6c6b94a580
etree: restrict py2 bytes to ASCII only 2018-07-14 20:06:22 +01:00
Cosimo Lupo
abe74f1edc
aarg! fix writeDataFileAtomically not removing empty file...
this had been broken for years, since commit 66e5ae02
2018-07-14 19:58:38 +01:00
Cosimo Lupo
b44e3d5087
validators: fixup doctests after adding unicode_literals 2018-07-14 19:42:16 +01:00
Cosimo Lupo
0951e2063e
ensure all modules do from __future__ import absolute_import, unicode_literals 2018-07-14 19:25:18 +01:00
Cosimo Lupo
83e8da2206
etree: only write self-closing <tag/> when element.text is None
like lxml does
2018-07-14 17:58:44 +01:00
Cosimo Lupo
3ca63203b2
tox: print python version and bitness for debugging 2018-07-14 15:19:19 +01:00
Cosimo Lupo
e59b89c6ab
tox/appveyor: try creating pythonX.Y.bat file to run with specific python.exe
https://nedbatchelder.com/blog/201509/appveyor.html

The old TOXPYTHON trick seems to be discouraged now with tox 3.1, which
emits a warning when there is a conflict in the basepython settings for
environments containing default factors (e.g. py27, etc.)
https://github.com/tox-dev/tox/pull/841
2018-07-14 15:02:07 +01:00
Cosimo Lupo
1a94fbc121
etree: in invalid xml chars allow surrogates for 'narrow' pythons 2018-07-14 14:31:52 +01:00
Cosimo Lupo
37e4b32f6e
appveyor: add fast_finish: true
https://www.appveyor.com/docs/build-configuration/#failing-strategy
2018-07-14 14:11:28 +01:00
Cosimo Lupo
fc6a7e48bf
mute codecov on PRs, too noisy 2018-07-14 14:08:40 +01:00
Cosimo Lupo
5f61bcfcb4
etree: simplify regex for invalid xml chars 2018-07-14 14:07:42 +01:00
Cosimo Lupo
d4f10f121a
appveyor: no lxml wheels for py37 on windows; skip for now
https://ci.appveyor.com/project/adrientetar/ufolib/build/1.0.489/job/edm1m88yl4q5l36f
2018-07-14 13:42:47 +01:00
Cosimo Lupo
eea1766d9a
etree: fix valid XML regex for narrow UCS-2 only pythons
fixes https://ci.appveyor.com/project/adrientetar/ufolib/build/1.0.489/job/epryi911juu5lqdl#L72
2018-07-14 13:41:19 +01:00
Cosimo Lupo
8eb7245773
appveyor: test w/o lxml, on py37 (x64 only); upload to codecov
and skip_branch_with_pr, to avoid running CI twice both on the PR branch and
on merged master.
2018-07-14 13:02:21 +01:00
Cosimo Lupo
a9bfbdfd21
travis: test with/without lxml, add python 3.7; upload coverage to codecov.io
and remove 3.5, we don't need to test that one any more now that there's 3.7
2018-07-14 13:00:44 +01:00
Cosimo Lupo
b2934f7628
tox.ini: fix building wheel from sdist 2018-07-14 12:53:13 +01:00
Cosimo Lupo
9a94c29ead
tox.ini: test with/without lxml, add py37, coverage and more 2018-07-14 12:32:49 +01:00
Cosimo Lupo
30ce8fd553
setup.py: add a 'testing' extra
this is conventional among python packages to have an 'testing' extras_require
so developers can bootstrap a testing environment easily with something like:

pip install -e .[testing]

The pytest-cov is a pluging to integrate coverage.py with pytest.

pytest-randomly is to shuffle tests in a random order to check against inter-test
dependencies
2018-07-14 12:25:52 +01:00
Cosimo Lupo
8d52b1a07d
setup.cfg: don't run pytest in --verbose by default
one can always do `pytest -v`, or through `tox -- -v`
2018-07-14 12:23:34 +01:00
Cosimo Lupo
d1fa34e72c
test_plistlib.py: mute harmless ResourceWarning on py27 2018-07-14 12:22:42 +01:00
Cosimo Lupo
fc6745657c
.coveragerc: don't show missing lines in coverage report in console
too verbose
2018-07-14 11:24:35 +01:00
Cosimo Lupo
5e1de2d0a9
Add htmlcov/ directory to .gitignore 2018-07-14 11:12:56 +01:00
Cosimo Lupo
f6b8849076
Add .coveragerc file for coverage.py 2018-07-14 11:12:05 +01:00
Cosimo Lupo
c4972954da
setup.cfg: adjust pytest config 2018-07-14 11:11:37 +01:00
Cosimo Lupo
4d678ec2e7
tox.ini: test with and without lxml 2018-07-13 19:26:25 +01:00
Cosimo Lupo
ed2f42aaa7
setup.py: add ufoLib[lxml] extras 2018-07-13 19:25:41 +01:00
Cosimo Lupo
92671c2e29
move lxml and singledispatch to separate extra_requirements.txt 2018-07-13 19:25:11 +01:00
Cosimo Lupo
59ac1aa357
test_plistlib: use ufoLib.etree 2018-07-13 18:50:02 +01:00
Cosimo Lupo
a9a37818cb
glifLib: use ufoLib.etree 2018-07-13 18:49:21 +01:00
Cosimo Lupo
a99a6d6ee5
plistlib: make signledispatch optional; use ufoLib.etree 2018-07-13 18:48:21 +01:00
Cosimo Lupo
d87c4edfe1
ufoLib.etree: add shim module that exports ElementTree API
works with both lxml and xml.etree backends

adds some missing things from built-in etree, such as the ability to
use an OrderedDict for attributes, support for pretty_print argument
to add indentation, etc.
2018-07-13 18:44:11 +01:00
Cosimo Lupo
9735cdccff
Merge pull request #160 from anthrotype/plistlib
copy lxml-based plistlib module from fonttools/ufoLib2
2018-07-12 15:25:22 +02:00
Cosimo Lupo
49a88d6cbf
test_plistlib: must open plist as binary file
fixes https://ci.appveyor.com/project/adrientetar/ufolib/build/1.0.484/job/9em92wjinypwn2fu#L399
2018-07-12 14:10:48 +01:00