Skip to content

Commit 3aee2fe

Browse files
Merge pull request #55 from source-foundry/fix-udiff
2 parents 272c895 + 4ac7a18 commit 3aee2fe

File tree

8 files changed

+14
-2277
lines changed

8 files changed

+14
-2277
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v2.0.0
4+
5+
- Backward incompatible change in the default unified diff approach for large files (fixes #54)
6+
- Transition to the upstream cPython implementation of `difflib.unified_diff` for diff execution
7+
- Remove cPython `difflib` derivative that was distributed with this project
8+
- Eliminate dual license structure with removal of cPython license and transition to Apache License, v2.0 only
9+
310
## v1.0.2
411

512
- Bump cffi to 1.14.0

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: install
22

33
black:
4-
black --exclude="difflib.py" lib/fdiff/*.py lib/fdiff/thirdparty/*.py
4+
black lib/fdiff/*.py
55

66
clean:
77
- rm dist/*.whl dist/*.tar.gz dist/*.zip
@@ -24,7 +24,7 @@ install-user:
2424
test: test-lint test-type-check test-unit
2525

2626
test-coverage:
27-
coverage run --omit="lib/fdiff/thirdparty/fdifflib.py" --source fdiff -m py.test
27+
coverage run --source fdiff -m py.test
2828
coverage report -m
2929
# coverage html
3030

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,9 @@ Unit test coverage is executed with the `coverage` tool. See the Makefile `test
210210

211211
## Acknowledgments
212212

213-
`fdiff` is built with the fantastic [fontTools free software library](https://github.com/fonttools/fonttools) and performs text diffs of binary font files using dumps of the TTX OpenType table data serialization format as defined in the fontTools library. The implementation of unified text file diffs is based on a (slightly) modified version of the Python `difflib` standard library source. The modifications address diff performance issues with the lengthy text output from TTX dumps of font OpenType data.
213+
`fdiff` is built with the fantastic [fontTools free software library](https://github.com/fonttools/fonttools) and performs text diffs of binary font files using dumps of the TTX OpenType table data serialization format as defined in the fontTools library.
214214

215-
## Licenses
216-
217-
### fdiff
215+
## License
218216

219217
Copyright 2019 Source Foundry Authors and Contributors
220218

@@ -223,11 +221,3 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
223221
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
224222

225223
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
226-
227-
### Third-Party Licenses
228-
229-
#### CPython `difflib` library
230-
231-
This project distributes a modified version of third party source code from the [Python programming language standard library](https://github.com/python/cpython). The `difflib.py` v3.7.4 module is Copyright © 2001-2019 Python Software Foundation; All Rights Reserved. This source is modified and distributed in this project under the [PSF LICENSE AGREEMENT FOR PYTHON 3.7.4](https://github.com/source-foundry/fdiff/blob/master/lib/fdiff/thirdparty/PYTHON_LICENSE). The module is renamed to `fdifflib.py` to distinguish it from the upstream source, and modifications made here are documented in comments at the head of the module.
232-
233-

lib/fdiff/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env python3
22

3-
version = __version__ = "1.0.2"
3+
version = __version__ = "2.0.0"

lib/fdiff/diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
import asyncio
4+
from difflib import unified_diff
45
import os
56
from multiprocessing import Pool, cpu_count
67
import shlex
@@ -14,7 +15,7 @@
1415
_get_filepath_from_url,
1516
create_async_get_request_session_and_run,
1617
)
17-
from fdiff.thirdparty.fdifflib import unified_diff
18+
1819
from fdiff.utils import get_file_modtime
1920

2021

@@ -23,7 +24,6 @@
2324
# Private functions
2425
#
2526
#
26-
# TODO: add docstrings for all private functions
2727

2828

2929
def _async_fetch_files(dirpath, urls):

lib/fdiff/thirdparty/PYTHON_LICENSE

Lines changed: 0 additions & 41 deletions
This file was deleted.

lib/fdiff/thirdparty/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)