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
Cosimo Lupo
b743ccd2b6
utils: remove testing warning from doctest; fails with py27
...
I hate doctests :(
2018-07-12 13:54:19 +01:00
Cosimo Lupo
72a99726f7
test_plistlib: test deprecated readPlist/writePlist etc. as well
2018-07-12 13:47:23 +01:00
Cosimo Lupo
d664f31a50
plistlib: restore old readPlist/writePlist etc., with deprecation warning
2018-07-12 13:37:38 +01:00
Cosimo Lupo
c6bc1cda0a
add utils.py module with @deprecated decorator
2018-07-12 13:33:21 +01:00
Cosimo Lupo
460c08286d
test_plistlib: add test for pretty_print=False
2018-07-11 18:33:10 +01:00
Cosimo Lupo
8011e828dd
glifLib: call plistlib.totree with intent_level=2
...
since 'lib' element is itself contained in 'glyph' root element
2018-07-11 18:32:37 +01:00
Cosimo Lupo
790876da04
plistlib: justify multiline base64 data; add 'pretty_print' option
...
we right-justifiy binary data text to max 76 chars (min 16) per line
similarly to the way the stdlib plistlib module does (although they
use tabs for indentation, equivalent to 8-spaces).
We write the plist doctype ourselves, otherwise lxml always adds a
newline to it (even wen pretty_print is False).
2018-07-11 18:27:12 +01:00
Cosimo Lupo
a8124a0eef
plistlib: use double-quotes in xml declaration
...
for consistency with glifLib
2018-07-11 13:29:54 +01:00
Cosimo Lupo
61c19acace
Add test_plistlib.py
...
this is basically the same cpython plistlib test suite,
rewritten as pytest-style tests
2018-07-11 12:48:14 +01:00
Cosimo Lupo
c585dac259
Add singledispatch to install requirements for py<3.4
...
and also set maximum version limit to the next major version of each install_requires,
to prevent breakages when major version bumps
2018-07-11 12:39:24 +01:00
Cosimo Lupo
01269bfee7
test: replace all readPlist/writePlist with load/dump
2018-07-11 12:30:11 +01:00
Cosimo Lupo
584666ffe9
glifLib: use new plistlib load/dump/totree/fromtree
2018-07-11 12:29:18 +01:00
Cosimo Lupo
0b15b7d61e
ufoLib: use new plistlib load/dump instead of readPlist/writePlist
2018-07-11 12:28:26 +01:00
Cosimo Lupo
0776e9405c
remove ufoLib.plistFromETree, superseded by new plistlib
2018-07-11 12:27:47 +01:00
Cosimo Lupo
715d6c6b68
Add plistlib module from ufoLib2
...
https://github.com/fonttools/ufoLib2/blob/master/src/ufoLib2/plistlib.py
replaces the old ufoLib.plistlib shim, privides a single interface
similar to python3's stdlib `plistlib` module, but built on top of
lxml.
On python < 3, it requires the singledispatch backport.
This will be added as conditional installation requirement.
2018-07-11 12:26:00 +01:00
Ben Kiel
1a2eb08de5
Merge pull request #159 from anthrotype/xml-declaration-dbl-quotes
...
use double quotes in XML declaration like old ufoLib
2018-07-10 14:08:44 -05:00
Cosimo Lupo
657b4cf496
test_glifLib: add test to check double-quoted XML_DECLARATION
2018-07-10 18:56:30 +01:00
Cosimo Lupo
cdbb2d6b30
glifLib: use double quotes in XML declaration like old ufoLib
...
fixes #158
2018-07-10 18:56:30 +01:00
Cosimo Lupo
b3b495153b
Bump version: 2.2.4 → 2.2.5.dev0
2018-07-10 16:24:02 +01:00