656 Commits

Author SHA1 Message Date
Masaya Nakamura
2be975d42a [filesystem] Fix error on opening zip in Python 2 2017-08-02 18:22:20 +09:00
Cosimo Lupo
4d9291fe71 [plistlib] in python3, explicitly use fmt=PlistFormat.FMT_XML
Otherwise it will try to sniff the plist format and call `seek`
method on the file object, but the zip filesystem does not support
that...

UnsupportedOperation: seek
2017-07-21 17:46:00 +01:00
Cosimo Lupo
f1f4e120f5 [filesystem] exclude '__MACOSX' metadata dir contained in zip file 2017-07-21 17:43:00 +01:00
Cosimo Lupo
879fce2e7c Merge pull request #81 from anthrotype/ufo4
update "Add ZIP support to UFO"
2017-07-21 17:16:10 +01:00
Cosimo Lupo
a06da7681e fixup 2017-07-21 16:45:22 +01:00
Cosimo Lupo
ec8d58f0b8 [filesystem] in listDirectory, always use Unix '/' as separator
the _NOFS implementation is using `os.listdir` which uses the
native `os.sep`; however, pyfilesystem2 FS paths always uses forward
slashes '/'.
2017-07-21 16:40:28 +01:00
Cosimo Lupo
2bef40c30d [ufoLib] use self.fileSystem.joinPath instead of reader.joinPath 2017-07-21 14:11:13 +01:00
Cosimo Lupo
e3d89cee7f [ufoLib] fix listing images dir; pass a file object to pngValidator 2017-07-21 14:08:41 +01:00
Cosimo Lupo
c06c38cadb [ufoLib] UFOReader.getFileModificationTime is used by defcon 2017-07-21 14:05:59 +01:00
Cosimo Lupo
22a6f917e4 [filesystem] implement 'create' argument for _NOFS.movedir
in pyfilesystem2, movedir copies the content from one directory to
antoher, optionally creating the destination if create=True.

When the destination is exists and is a directory, shutil.move moves
the source directory inside the destinatinn directory.

shutil.copytree also fails if the destination already exists; so here
we resort to distutils.dir_util.copy_tree (it's part of python std lib)
2017-07-21 14:04:10 +01:00
Cosimo Lupo
3c0d41bac9 [filesystem] use the current ZipFS API; create "contents" dir
The 'mode' and 'allow_zip_64' arguments are no longer there in
pyfileststem2's zipfs module; allow_zip_64 is the default now,
and the 'mode' is replaced by a 'write' boolean argument

The "contents" root dir must be created manually.
2017-07-21 13:53:49 +01:00
Cosimo Lupo
46f32d4cd4 [filesystem] print exception in readPlist 2017-07-21 13:43:33 +01:00
Cosimo Lupo
337a68715e [filesystem] getinfo now returns a namespace, not a dict
We bumped the minimum required fonttools to 3.10, so
we can use the backported SimpleNamespace as the return
value of _NOFS.getinfo method.
2017-07-21 13:41:14 +01:00
Cosimo Lupo
1de6eb1eb5 [filesystem] pass create=True to movedir
otherwise it raises `ResourceNotFound`
2017-07-21 13:33:15 +01:00
Cosimo Lupo
590d00ba11 [filesystem] use unicode strings for path names
as pyfilesystem2 works internally with unicode strings, some methods
(e.g. self._fs.exists()) fail with TypeError if passed bytes strings
(on python 2 bytes == str).

We decode bytes path strings using the system's default filesystem
encoding.
2017-07-21 13:29:33 +01:00
Cosimo Lupo
62cc1c5805 [filesystem] allow to init FileSystem class from another instance 2017-07-21 13:23:04 +01:00
Cosimo Lupo
07ba88f55a [filesystem] fs.zipfs module no longer exports ZipOperError
it's unused anyway
2017-07-21 13:13:15 +01:00
Cosimo Lupo
758307d8bb [filesystem] use os.path if not haveFS 2017-07-21 12:59:56 +01:00
Cosimo Lupo
3c49e59864 [ci] test with and without fs; test on 3.6 instead of 3.4 2017-07-21 12:16:01 +01:00
Cosimo Lupo
af8b0e3224 [filesystem] use removetree as removedir was removed from pyfilesystem2
https://github.com/PyFilesystem/pyfilesystem2/issues/32
2017-07-21 10:14:58 +01:00
Cosimo Lupo
50f381dec6 test_UFOConversion: remove test1To2 as support for UFO1 is deprecated 2017-07-21 10:14:16 +01:00
Cosimo Lupo
055e52f932 Merge branch 'master' into ufo4 2017-07-21 10:07:37 +01:00
Cosimo Lupo
3d365bcefa Merge pull request #78 from unified-font-object/pyup-scheduled-update-06-05-2017
Scheduled weekly dependency update for week 23
2017-06-05 16:50:00 +01:00
pyup-bot
bf27243b0d Update fonttools from 3.12.1 to 3.13.1 2017-06-05 14:57:05 +01:00
Cosimo Lupo
ab9985ee3a
Bump version: 2.1.0 → 2.1.1.dev0 2017-05-24 18:39:50 +01:00
Cosimo Lupo
1c5f70c873
Release 2.1.0 2017-05-24 18:38:10 +01:00
Cosimo Lupo
16abd8130c
Add bump_version and release commands to setup.py 2017-05-24 18:37:52 +01:00
Cosimo Lupo
c26bb1072e Merge pull request #76 from unified-font-object/pyup-scheduled-update-05-22-2017
Scheduled weekly dependency update for week 21
2017-05-24 18:20:34 +01:00
pyup-bot
ddf5000d45 Update fonttools from 3.10.0 to 3.12.1 2017-05-22 15:44:05 +02:00
Cosimo Lupo
7059f32998 Merge pull request #73 from anthrotype/reverse-pen
[pointPen] add ReverseContourPointPen from defcon
2017-05-02 09:35:44 +01:00
Cosimo Lupo
e883885c3a
[pointPen] add ReverseContourPointPen from defcon
https://github.com/typesupply/defcon/issues/106
2017-04-25 10:50:21 +01:00
Cosimo Lupo
f7c0ea88fc Merge pull request #72 from anthrotype/add-component-kwargs
[pointPen] make PointToSegmentPen.addComponent accept/ignore **kwargs
2017-04-25 10:45:28 +01:00
Cosimo Lupo
d952f9a74f
[pointPen] make PointToSegmentPen.addComponent accept/ignore **kwargs
The beginPath and addPoint methods of PointToSegmentPen already take
extra **kwargs (via BasePointToSegmentPen); only the addComponent method
does not.
This makes it raise TypeError when an unknown keyword argument is passed
(e.g. 'identifier' for UFO3 objects).
For the PointToSegmentPen, which translates between the PointPen and
the SegmentPen API, it is ok if we only use the arguments that have
an equivalent in the SegmentPen API, and silently discard the **kwargs.
2017-04-25 10:23:38 +01:00
Cosimo Lupo
a9a2096cd2 Merge pull request #71 from unified-font-object/pyup-scheduled-update-04-24-2017
Scheduled weekly dependency update for week 17
2017-04-24 18:03:13 +01:00
pyup-bot
cd605b4444 Update fonttools from 3.9.1 to 3.10.0 2017-04-24 14:41:05 +01:00
Cosimo Lupo
7e2b8284f6 Merge pull request #67 from unified-font-object/pyup-scheduled-update-03-27-2017
Scheduled weekly dependency update for week 13
2017-03-27 14:44:21 +01:00
pyup-bot
6e6a7e4afb Update fonttools from 3.8.0 to 3.9.1 2017-03-27 14:28:06 +01:00
pyup-bot
99c5f8491d Update fonttools from 3.7.2 to 3.8.0 2017-03-06 13:39:50 +00:00
Denis Moyogo Jacquerye
6ca25ce193 Merge pull request #64 from benkiel/master
Remove duplicate variable assignment
2017-03-06 13:39:29 +00:00
Cosimo Lupo
57682a8b17 Merge pull request #63 from anthrotype/pointpen-identifier
[pointPen] add identifier=None argument to AbstractPointPen methods
2017-02-27 16:55:26 +00:00
Ben Kiel
0bc4ab9497 Remove duplicate variable assignment 2017-02-27 10:18:02 -06:00
Cosimo Lupo
869a8f6a45
[pointPen] add **kwargs to AbstractPointPen's beginPath and addCompoment too 2017-02-27 16:04:47 +00:00
Cosimo Lupo
8e92750f5d Merge pull request #61 from unified-font-object/pyup-scheduled-update-02-20-2017
Scheduled weekly dependency update for week 08
2017-02-27 12:51:56 +00:00
Cosimo Lupo
6739bc8b9d
[pointPen] add identifier=None argument in AbstractPointPen.beginPath, addPoint and addComponent methods 2017-02-27 12:46:06 +00:00
pyup-bot
c8415152e8 Update fonttools from 3.7.0 to 3.7.2 2017-02-20 05:13:05 -08:00
Adrien Tétar
9d6dfda96e Merge pull request #59 from unified-font-object/pyup-scheduled-update-02-13-2017
Scheduled weekly dependency update for week 07
2017-02-18 10:22:29 +01:00
pyup-bot
fd8a1a6fdb Update fonttools from 3.6.3 to 3.7.0 2017-02-13 05:13:05 -08:00
Cosimo Lupo
95b69bc950 Merge pull request #56 from unified-font-object/pyup-update-fonttools-3.5.0-to-3.6.3
Update fonttools to 3.6.3
2017-02-06 19:10:55 +00:00
Cosimo Lupo
fde6540b01
add .pyup.yml for pyup.io bot; updates are now scheduled weekly 2017-02-06 19:04:57 +00:00
pyup-bot
ae986dae85 Update fonttools from 3.5.0 to 3.6.3 2017-02-06 14:43:38 +01:00