forked from stefankoegl/python-json-patch
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from stefankoegl:master #1
Open
pull
wants to merge
167
commits into
kevinxin90:master
Choose a base branch
from
stefankoegl:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix build failure on Travis CI with Python 3.2
E.g. `python2 -m unittest tests.MakePatchTestCase.test_objects` or `nose tests:MakePatchTestCase.test_objects`.
Allow running certain tests separately
Fix bug in _split_by_common_seq using wrong range in right subtree
Makes it easier to locate the failing tests in the test file
Conflicts: tests.py
Fix KeyError in add/remove optimization
The inspect.getargspec() function has been deprecated in Python 3: https://docs.python.org/3/library/inspect.html#inspect.getargspec
Use inspect.signature() on Python 3
if there is no diff print nothing, and exit 1 if a diff is found
If the JSON content contains some Unicode characters, the jsonpatch final output will encode the Unicode character using ASCII (i.e `\u0394`). This behaviour comes from the module `json.dump()` governed by a flag `ensure_ascii`[1]. For example: ```json /* patch.json */ [{ "op": "add", "path": "/SomeUnicodeSamples", "value": "𝒞𝘋𝙴𝓕ĢȞỈ𝕵 đ áê 🤩 äÄöÖüÜß" }] ``` After applying the patch on an empty source file `{}`, this is the output: ```json {"SomeUnicodeSamples": "\ud835\udc9e\ud835\ude0b...\u00fc\u00dc\u00df"} ``` This commit adds a flag `-u|--preserve-unicode` in the jsonpatch CLI to configure the behaviour of `json.dump`'s `ensure_ascii` flag. Using the `--preserve-unicode` flag, the cli will print the Unicode characters as-is without any encoding. [1]: https://docs.python.org/3/library/json.html#basic-usage
Add support for preserving Unicode characters in jsonpatch CLI
FIX: TypeError when one forgot to put its operation in a list.
B/fix invalid remove index
* Switch to GitHub actions * add support for Python 3.11, remove 3.5, 3.6
…ation instructions (#147)
unittest.TestCase.assertEquals has been removed in Python 3.12; unittest.TestCase.assertEqual should be used instead[1]. [1] https://docs.python.org/3/whatsnew/3.12.html#id3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )