Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 20, 2021

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

selurvedu and others added 30 commits October 18, 2015 14:12
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
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
@pull pull bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Jan 20, 2021
RyanSept and others added 27 commits February 1, 2021 16:58
#119 #120 Fix make_patch() to avoid casting numeric string to int on item moved
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.
* Switch to GitHub actions
* add support for Python 3.11, remove 3.5, 3.6
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

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.