METADATA 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. Metadata-Version: 2.4
  2. Name: json5
  3. Version: 0.14.0
  4. Summary: A Python implementation of the JSON5 data format.
  5. Author-email: Dirk Pranke <dpranke@chromium.org>
  6. License: Files: Everything except for the benchmarks/*.json files.
  7. Apache License
  8. Version 2.0, January 2004
  9. http://www.apache.org/licenses/
  10. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  11. 1. Definitions.
  12. "License" shall mean the terms and conditions for use, reproduction,
  13. and distribution as defined by Sections 1 through 9 of this document.
  14. "Licensor" shall mean the copyright owner or entity authorized by
  15. the copyright owner that is granting the License.
  16. "Legal Entity" shall mean the union of the acting entity and all
  17. other entities that control, are controlled by, or are under common
  18. control with that entity. For the purposes of this definition,
  19. "control" means (i) the power, direct or indirect, to cause the
  20. direction or management of such entity, whether by contract or
  21. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  22. outstanding shares, or (iii) beneficial ownership of such entity.
  23. "You" (or "Your") shall mean an individual or Legal Entity
  24. exercising permissions granted by this License.
  25. "Source" form shall mean the preferred form for making modifications,
  26. including but not limited to software source code, documentation
  27. source, and configuration files.
  28. "Object" form shall mean any form resulting from mechanical
  29. transformation or translation of a Source form, including but
  30. not limited to compiled object code, generated documentation,
  31. and conversions to other media types.
  32. "Work" shall mean the work of authorship, whether in Source or
  33. Object form, made available under the License, as indicated by a
  34. copyright notice that is included in or attached to the work
  35. (an example is provided in the Appendix below).
  36. "Derivative Works" shall mean any work, whether in Source or Object
  37. form, that is based on (or derived from) the Work and for which the
  38. editorial revisions, annotations, elaborations, or other modifications
  39. represent, as a whole, an original work of authorship. For the purposes
  40. of this License, Derivative Works shall not include works that remain
  41. separable from, or merely link (or bind by name) to the interfaces of,
  42. the Work and Derivative Works thereof.
  43. "Contribution" shall mean any work of authorship, including
  44. the original version of the Work and any modifications or additions
  45. to that Work or Derivative Works thereof, that is intentionally
  46. submitted to Licensor for inclusion in the Work by the copyright owner
  47. or by an individual or Legal Entity authorized to submit on behalf of
  48. the copyright owner. For the purposes of this definition, "submitted"
  49. means any form of electronic, verbal, or written communication sent
  50. to the Licensor or its representatives, including but not limited to
  51. communication on electronic mailing lists, source code control systems,
  52. and issue tracking systems that are managed by, or on behalf of, the
  53. Licensor for the purpose of discussing and improving the Work, but
  54. excluding communication that is conspicuously marked or otherwise
  55. designated in writing by the copyright owner as "Not a Contribution."
  56. "Contributor" shall mean Licensor and any individual or Legal Entity
  57. on behalf of whom a Contribution has been received by Licensor and
  58. subsequently incorporated within the Work.
  59. 2. Grant of Copyright License. Subject to the terms and conditions of
  60. this License, each Contributor hereby grants to You a perpetual,
  61. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  62. copyright license to reproduce, prepare Derivative Works of,
  63. publicly display, publicly perform, sublicense, and distribute the
  64. Work and such Derivative Works in Source or Object form.
  65. 3. Grant of Patent License. Subject to the terms and conditions of
  66. this License, each Contributor hereby grants to You a perpetual,
  67. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  68. (except as stated in this section) patent license to make, have made,
  69. use, offer to sell, sell, import, and otherwise transfer the Work,
  70. where such license applies only to those patent claims licensable
  71. by such Contributor that are necessarily infringed by their
  72. Contribution(s) alone or by combination of their Contribution(s)
  73. with the Work to which such Contribution(s) was submitted. If You
  74. institute patent litigation against any entity (including a
  75. cross-claim or counterclaim in a lawsuit) alleging that the Work
  76. or a Contribution incorporated within the Work constitutes direct
  77. or contributory patent infringement, then any patent licenses
  78. granted to You under this License for that Work shall terminate
  79. as of the date such litigation is filed.
  80. 4. Redistribution. You may reproduce and distribute copies of the
  81. Work or Derivative Works thereof in any medium, with or without
  82. modifications, and in Source or Object form, provided that You
  83. meet the following conditions:
  84. (a) You must give any other recipients of the Work or
  85. Derivative Works a copy of this License; and
  86. (b) You must cause any modified files to carry prominent notices
  87. stating that You changed the files; and
  88. (c) You must retain, in the Source form of any Derivative Works
  89. that You distribute, all copyright, patent, trademark, and
  90. attribution notices from the Source form of the Work,
  91. excluding those notices that do not pertain to any part of
  92. the Derivative Works; and
  93. (d) If the Work includes a "NOTICE" text file as part of its
  94. distribution, then any Derivative Works that You distribute must
  95. include a readable copy of the attribution notices contained
  96. within such NOTICE file, excluding those notices that do not
  97. pertain to any part of the Derivative Works, in at least one
  98. of the following places: within a NOTICE text file distributed
  99. as part of the Derivative Works; within the Source form or
  100. documentation, if provided along with the Derivative Works; or,
  101. within a display generated by the Derivative Works, if and
  102. wherever such third-party notices normally appear. The contents
  103. of the NOTICE file are for informational purposes only and
  104. do not modify the License. You may add Your own attribution
  105. notices within Derivative Works that You distribute, alongside
  106. or as an addendum to the NOTICE text from the Work, provided
  107. that such additional attribution notices cannot be construed
  108. as modifying the License.
  109. You may add Your own copyright statement to Your modifications and
  110. may provide additional or different license terms and conditions
  111. for use, reproduction, or distribution of Your modifications, or
  112. for any such Derivative Works as a whole, provided Your use,
  113. reproduction, and distribution of the Work otherwise complies with
  114. the conditions stated in this License.
  115. 5. Submission of Contributions. Unless You explicitly state otherwise,
  116. any Contribution intentionally submitted for inclusion in the Work
  117. by You to the Licensor shall be under the terms and conditions of
  118. this License, without any additional terms or conditions.
  119. Notwithstanding the above, nothing herein shall supersede or modify
  120. the terms of any separate license agreement you may have executed
  121. with Licensor regarding such Contributions.
  122. 6. Trademarks. This License does not grant permission to use the trade
  123. names, trademarks, service marks, or product names of the Licensor,
  124. except as required for reasonable and customary use in describing the
  125. origin of the Work and reproducing the content of the NOTICE file.
  126. 7. Disclaimer of Warranty. Unless required by applicable law or
  127. agreed to in writing, Licensor provides the Work (and each
  128. Contributor provides its Contributions) on an "AS IS" BASIS,
  129. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  130. implied, including, without limitation, any warranties or conditions
  131. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  132. PARTICULAR PURPOSE. You are solely responsible for determining the
  133. appropriateness of using or redistributing the Work and assume any
  134. risks associated with Your exercise of permissions under this License.
  135. 8. Limitation of Liability. In no event and under no legal theory,
  136. whether in tort (including negligence), contract, or otherwise,
  137. unless required by applicable law (such as deliberate and grossly
  138. negligent acts) or agreed to in writing, shall any Contributor be
  139. liable to You for damages, including any direct, indirect, special,
  140. incidental, or consequential damages of any character arising as a
  141. result of this License or out of the use or inability to use the
  142. Work (including but not limited to damages for loss of goodwill,
  143. work stoppage, computer failure or malfunction, or any and all
  144. other commercial damages or losses), even if such Contributor
  145. has been advised of the possibility of such damages.
  146. 9. Accepting Warranty or Additional Liability. While redistributing
  147. the Work or Derivative Works thereof, You may choose to offer,
  148. and charge a fee for, acceptance of support, warranty, indemnity,
  149. or other liability obligations and/or rights consistent with this
  150. License. However, in accepting such obligations, You may act only
  151. on Your own behalf and on Your sole responsibility, not on behalf
  152. of any other Contributor, and only if You agree to indemnify,
  153. defend, and hold each Contributor harmless for any liability
  154. incurred by, or claims asserted against, such Contributor by reason
  155. of your accepting any such warranty or additional liability.
  156. END OF TERMS AND CONDITIONS
  157. APPENDIX: How to apply the Apache License to your work.
  158. To apply the Apache License to your work, attach the following
  159. boilerplate notice, with the fields enclosed by brackets "{}"
  160. replaced with your own identifying information. (Don't include
  161. the brackets!) The text should be enclosed in the appropriate
  162. comment syntax for the file format. We also recommend that a
  163. file or class name and description of purpose be included on the
  164. same "printed page" as the copyright notice for easier
  165. identification within third-party archives.
  166. Copyright {yyyy} {name of copyright owner}
  167. Licensed under the Apache License, Version 2.0 (the "License");
  168. you may not use this file except in compliance with the License.
  169. You may obtain a copy of the License at
  170. http://www.apache.org/licenses/LICENSE-2.0
  171. Unless required by applicable law or agreed to in writing, software
  172. distributed under the License is distributed on an "AS IS" BASIS,
  173. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  174. See the License for the specific language governing permissions and
  175. limitations under the License.
  176. ---
  177. File: benchmarks/64KB-min.json
  178. MIT License
  179. Copyright (c) Microsoft Corporation.
  180. Permission is hereby granted, free of charge, to any person obtaining a copy
  181. of this software and associated documentation files (the "Software"), to deal
  182. in the Software without restriction, including without limitation the rights
  183. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  184. copies of the Software, and to permit persons to whom the Software is
  185. furnished to do so, subject to the following conditions:
  186. The above copyright notice and this permission notice shall be included in all
  187. copies or substantial portions of the Software.
  188. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  189. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  190. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  191. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  192. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  193. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  194. SOFTWARE
  195. ---
  196. File: benchmarks/bitly-usa-gov.json
  197. The MIT License (MIT)
  198. Copyright (c) 2017 Wes McKinney
  199. Permission is hereby granted, free of charge, to any person obtaining a copy
  200. of this software and associated documentation files (the "Software"), to deal
  201. in the Software without restriction, including without limitation the rights
  202. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  203. copies of the Software, and to permit persons to whom the Software is
  204. furnished to do so, subject to the following conditions:
  205. The above copyright notice and this permission notice shall be included in all
  206. copies or substantial portions of the Software.
  207. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  208. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  209. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  210. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  211. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  212. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  213. SOFTWARE.
  214. ---
  215. File: benchmarks/twitter.json
  216. The MIT License (MIT)
  217. Copyright (c) 2014 Milo Yip
  218. Permission is hereby granted, free of charge, to any person obtaining a copy
  219. of this software and associated documentation files (the "Software"), to deal
  220. in the Software without restriction, including without limitation the rights
  221. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  222. copies of the Software, and to permit persons to whom the Software is
  223. furnished to do so, subject to the following conditions:
  224. The above copyright notice and this permission notice shall be included in all
  225. copies or substantial portions of the Software.
  226. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  227. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  228. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  229. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  230. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  231. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  232. SOFTWARE.
  233. Project-URL: Changelog, https://github.com/dpranke/pyjson5/blob/master/README.md
  234. Project-URL: Issues, https://github.com/dpranke/pyjson5/issues
  235. Project-URL: Repository, https://github.com/dpranke/pyjson5
  236. Keywords: json5
  237. Classifier: Development Status :: 5 - Production/Stable
  238. Classifier: Intended Audience :: Developers
  239. Classifier: License :: OSI Approved :: Apache Software License
  240. Classifier: Programming Language :: Python :: 3 :: Only
  241. Classifier: Programming Language :: Python :: 3.8
  242. Classifier: Programming Language :: Python :: 3.9
  243. Classifier: Programming Language :: Python :: 3.10
  244. Classifier: Programming Language :: Python :: 3.11
  245. Classifier: Programming Language :: Python :: 3.12
  246. Classifier: Programming Language :: Python :: 3.13
  247. Classifier: Programming Language :: Python :: 3.14
  248. Requires-Python: >=3.8.0
  249. Description-Content-Type: text/markdown
  250. License-File: LICENSE
  251. Dynamic: license-file
  252. # pyjson5
  253. A Python implementation of the JSON5 data format.
  254. [JSON5](https://json5.org) extends the
  255. [JSON](http://www.json.org) data interchange format to make it
  256. slightly more usable as a configuration language:
  257. * JavaScript-style comments (both single and multi-line) are legal.
  258. * Object keys may be unquoted if they are legal ECMAScript identifiers
  259. * Objects and arrays may end with trailing commas.
  260. * Strings can be single-quoted, and multi-line string literals are allowed.
  261. There are a few other more minor extensions to JSON; see the above page for
  262. the full details.
  263. This project implements a reader and writer implementation for Python;
  264. where possible, it mirrors the
  265. [standard Python JSON API](https://docs.python.org/library/json.html)
  266. package for ease of use.
  267. There is one notable difference from the JSON api: the `load()` and
  268. `loads()` methods support optionally checking for (and rejecting) duplicate
  269. object keys; pass `allow_duplicate_keys=False` to do so (duplicates are
  270. allowed by default).
  271. This is an early release. It has been reasonably well-tested, but it is
  272. **SLOW**. It can be 1000-6000x slower than the C-optimized JSON module,
  273. and is 200x slower (or more) than the pure Python JSON module.
  274. **Please Note:** This library only handles JSON5 documents, it does not
  275. allow you to read arbitrary JavaScript. For example, bare integers can
  276. be legal object keys in JavaScript, but they aren't in JSON5.
  277. ## Known issues
  278. * Did I mention that it is **SLOW**?
  279. * The implementation follows Python3's `json` implementation where
  280. possible. This means that the `encoding` method to `dump()` is
  281. ignored, and unicode strings are always returned.
  282. * The `cls` keyword argument that `json.load()`/`json.loads()` accepts
  283. to specify a custom subclass of ``JSONDecoder`` is not and will not be
  284. supported, because this implementation uses a completely different
  285. approach to parsing strings and doesn't have anything like the
  286. `JSONDecoder` class.
  287. * The `cls` keyword argument that `json.dump()`/`json.dumps()` accepts
  288. is also not supported, for consistency with `json5.load()`. The `default`
  289. keyword *is* supported, though, and might be able to serve as a
  290. workaround.
  291. ## Contributing
  292. `json5` have no runtime dependencies and it is supported on Python version 3.8
  293. or later. However, in order to develop and build the package you need a
  294. bunch of extra tools and the latest versions of those tools may require 3.9
  295. or later. You can install the extra environment on 3.8 (and get older versions
  296. of the tools), but they may not run completely cleanly.
  297. #### On Mac
  298. The easiest thing to do is to install [`uv`](https://docs.astral.sh/uv) and
  299. use `uv` and the `//run` script to develop things. See `./run --help` for
  300. the various commands that are supported. `glop` is the parser generator
  301. tool used to generate a parser from the grammar in `json5/json5.g`.
  302. ```
  303. $ brew install uv
  304. $ git clone https://github.com/dpranke/pyjson5
  305. $ git clone https://github.com/dpranke/glop
  306. $ cd pyjson5
  307. $ source $(./run devenv) # To activate a venv w/ all the needed dev tools.
  308. ```
  309. #### On other platforms
  310. Install `uv` via whatever mechanism is appropriate.
  311. ### Create the venv
  312. ```
  313. $ ./run devenv
  314. ```
  315. (This calls `uv sync --extra dev`.)
  316. ### Running the tests
  317. ```
  318. $ ./run tests
  319. ```
  320. ### Updating the packages
  321. ```
  322. # Update the version in json5/version.py to $VERSION, which should be of
  323. # the form X.Y.Z where X, Y, and Z are numbers.
  324. $ ./run regen
  325. $ ./run presubmit
  326. $ git commit -a -m "Bump the version to $VERSION"
  327. $ git tag "v$VERSION"
  328. $ ./run build
  329. $ ./run publish --prod
  330. $ git push origin
  331. $ git push --tags origin
  332. ```
  333. (Assuming you have upload privileges to PyPI and the GitHub repo, of course.)
  334. ## Version History / Release Notes
  335. * v0.14.0 (2026-03-27)
  336. This is really just a dependency bump release.
  337. * No (non-test) code changes.
  338. * Upgraded to latest packages for dev dependencies
  339. * Silenced a couple of warnings from the latest pylint where it
  340. can't deal with both unreachable code and a bad return value.
  341. * v0.13.0 (2026-01-01)
  342. * No code changes.
  343. * Add Python 3.14 to supported version, project config, dependencies
  344. * Update dependencies to latest stuff < 2025-12-01
  345. * This relaxes the versions specified in pyproject.toml to just
  346. use 'newer than' rather than exact matches.
  347. * Sets 'uv.tool.exclude-newer' in pyproject.toml to tell uv not
  348. to look at packages published within the past 30 days; this will
  349. hopefully help prevent dependencies on compromised projects.
  350. * Switch to using dependency-groups for 'dev' group.
  351. * v0.12.1 (2025-08-12)
  352. * Fix [#94](https://github.com/dpranke/pyjson5/issues/94), where objects
  353. returned from a custom encoder were not being indented properly.
  354. * v0.12.0 (2025-04-03)
  355. * Roll back pyproject.toml change for licensing so that we can still
  356. build the package on 3.8.
  357. * Upgrade devenv package dependencies to latest versions; they now need
  358. Python 3.9 or newer, though json5 itself still supports 3.8.
  359. * v0.11.0 (2025-04-01)
  360. * Add a couple examples to the documentation and run doctest over
  361. them.
  362. * Fix a typing issue in dump and dumps with the `cls` argument; turns
  363. out mypy was right and I was wrong and I didn't realize it :).
  364. * Introduce a new `parse` method that can be used to iterate through
  365. a string, extracting multiple values.
  366. * Add a new `consume_trailing` parameter to `load`/`loads`/`parse`
  367. that specifies whether to keep parsing after a valid object is
  368. reached. By default, this is True and the string must only contain
  369. trailing whitespace. If set to False, parsing will stop when a
  370. valid object is reached.
  371. * Add a new `start` parameter to `load`/`loads`/`parse` to specify
  372. the zero-based offset to start parsing the string or file from.
  373. * [GitHub issue #60](https://github.com/dpranke/pyjson5/issues/60).
  374. Fix a bug where we were attempting to allow '--4' as a valid number.
  375. * v0.10.0 (2024-11-25)
  376. * [GitHub issue #57](https://github.com/dpranke/pyjson5/issues/57).
  377. Added a `JSON5Encoder` class that can be overridden to do custom
  378. encoding of values. This class is vaguely similar to the `JSONEncoder`
  379. class in the standard `json` library, except that it has an
  380. `encode()` method that can be overridden to customize *any*
  381. value, not just ones the standard encoder doesn't know how to handle.
  382. It does also support a `default()` method that can be used to
  383. encode things not normally encodable, like the JSONEncoder class.
  384. It does not support an `iterencode` method. One could probably
  385. be added in the future, although exactly how that would work and
  386. interact with `encode` is a little unclear.
  387. * Restructured the code to use the new encoder class; doing so actually
  388. allowed me to delete a bunch of tediously duplicative code.
  389. * Added a new `quote_style` argument to `dump()`/`dumps()` to control
  390. how strings are encoded by default. For compatibility with older
  391. versions of the json5 library and the standard json library, it
  392. uses `QuoteStyle.ALWAYS_DOUBLE` which encodes all strings with double
  393. quotes all the time. You can also configure it to use single quotes
  394. all the time (`ALWAYS_SINGLE`), and to switch between single and double
  395. when doing so eliminates a need to escape quotes (`PREFER_SINGLE` and
  396. `PREFER_DOUBLE`). This also adds a `--quote-style` argument to
  397. `python -m json5`.
  398. * This release has a fair number of changes, but is intended to be
  399. completely backwards-compatible. Code without changes should run exactly
  400. as it did before.
  401. * v0.9.28 (2024-11-11)
  402. * Fix GitHub CI to install `uv` so `./run tests` works properly.
  403. * Mark Python3.13 as supported in package metadata.
  404. * Update dev package dependencies (note that the latest versions
  405. of coverage and pylint no longer work w/ Python3.8)
  406. * v0.9.27 (2024-11-10)
  407. * Fix typo in //README.md
  408. * v0.9.26 (2024-11-10)
  409. * [GitHub issue #82](https://github.com/dpranke/pyjson5/issues/82)
  410. Add support for the `strict` parameter to `load()`/`loads()`.
  411. * Significantly rework the infra and the `run` script to be
  412. contemporary.
  413. * v0.9.25 (2024-04-12)
  414. * [GitHub issue #81](https://github.com/dpranke/pyjson5/issues/81)
  415. Explicitly specify the directory to use for the package in
  416. pyproject.toml.
  417. * v0.9.24 (2024-03-16)
  418. * Update GitHub workflow config to remove unnecessary steps and
  419. run on pull requests as well as commits.
  420. * Added note about removing `hypothesize` in v0.9.23.
  421. * No code changes.
  422. * v0.9.23 (2024-03-16)
  423. * Lots of cleanup:
  424. * Removed old code needed for Python2 compatibility.
  425. * Removed tests using `hypothesize`. This ran model-based checks
  426. and didn't really add anything useful in terms of coverage to
  427. the test suite, and it introduced dependencies and slowed down
  428. the tests significantly. It was a good experiment but I think
  429. we're better off without it.
  430. * Got everything linting cleanly with pylint 3.1 and `ruff check`
  431. using ruff 0.3.3 (Note that commit message in 00d73a3 says pylint
  432. 3.11, which is a typo).
  433. * Code reformatted with `ruff format`
  434. * Added missing tests to bring coverage up to 100%.
  435. * Lots of minor code changes as the result of linting and coverage
  436. testing, but no intentional functional differences.
  437. * v0.9.22 (2024-03-06)
  438. * Attempt to fix the GitHub CI configuration now that setup.py
  439. is gone. Also, test on 3.12 instead of 3.11.
  440. * No code changes.
  441. * v0.9.21 (2024-03-06)
  442. * Moved the benchmarks/*.json data files' license information
  443. to //LICENSE to (hopefully) make the Google linter happy.
  444. * v0.9.20 (2024-03-03)
  445. * Added `json5.__version__` in addition to `json5.VERSION`.
  446. * More packaging modernization (no more setup.{cfg,py} files).
  447. * Mark Python3.12 as supported in project.classifiers.
  448. * Updated the `//run` script to use python3.
  449. * v0.9.19 (2024-03-03)
  450. * Replaced the benchmarking data files that came from chromium.org with
  451. three files obtained from other datasets on GitHub. Since this repo
  452. is vendored into the chromium/src repo it was occasionally confusing
  453. people who thought the data was actually used for non-benchmarking
  454. purposes and thus updating it for whatever reason.
  455. * No code changes.
  456. * v0.9.18 (2024-02-29)
  457. * Add typing information to the module. This is kind of a big change,
  458. but there should be no functional differences.
  459. * v0.9.17 (2024-02-19)
  460. * Move from `setup.py` to `pyproject.toml`.
  461. * No code changes (other than the version increasing).
  462. * v0.9.16 (2024-02-19)
  463. * Drop Python2 from `setup.py`
  464. * Add minimal packaging instructions to `//README.md`.
  465. * v0.9.15 (2024-02-19)
  466. * Merge in [Pull request #66](https://github.com/dpranke/pyjson5/pull/66)
  467. to include the tests and sample file in a source distribution.
  468. * v0.9.14 (2023-05-14)
  469. * [GitHub issue #63](https://github.com/dpranke/pyjson5/issues/63)
  470. Handle `+Infinity` as well as `-Infinity` and `Infinity`.
  471. * v0.9.13 (2023-03-16)
  472. * [GitHub PR #64](https://github.com/dpranke/pyjson5/pull/64)
  473. Remove a field from one of the JSON benchmark files to
  474. reduce confusion in Chromium.
  475. * No code changes.
  476. * v0.9.12 (2023-01-02)
  477. * Fix GitHub Actions config file to no longer test against
  478. Python 3.6 or 3.7. For now we will only test against an
  479. "oldest" release (3.8 in this case) and a "current"
  480. release (3.11 in this case).
  481. * v0.9.11 (2023-01-02)
  482. * [GitHub issue #60](https://github.com/dpranke/pyjson5/issues/60)
  483. Fixed minor Python2 compatibility issue by referring to
  484. `float("inf")` instead of `math.inf`.
  485. * v0.9.10 (2022-08-18)
  486. * [GitHub issue #58](https://github.com/dpranke/pyjson5/issues/58)
  487. Updated the //README.md to be clear that parsing arbitrary JS
  488. code may not work.
  489. * Otherwise, no code changes.
  490. * v0.9.9 (2022-08-01)
  491. * [GitHub issue #57](https://github.com/dpranke/pyjson5/issues/57)
  492. Fixed serialization for objects that subclass `int` or `float`:
  493. Previously we would use the objects __str__ implementation, but
  494. that might result in an illegal JSON5 value if the object had
  495. customized __str__ to return something illegal. Instead,
  496. we follow the lead of the `JSON` module and call `int.__repr__`
  497. or `float.__repr__` directly.
  498. * While I was at it, I added tests for dumps(-inf) and dumps(nan)
  499. when those were supposed to be disallowed by `allow_nan=False`.
  500. * v0.9.8 (2022-05-08)
  501. * [GitHub issue #47](https://github.com/dpranke/pyjson5/issues/47)
  502. Fixed error reporting in some cases due to how parsing was handling
  503. nested rules in the grammar - previously the reported location for
  504. the error could be far away from the point where it actually happened.
  505. * v0.9.7 (2022-05-06)
  506. * [GitHub issue #52](https://github.com/dpranke/pyjson5/issues/52)
  507. Fixed behavior of `default` fn in `dump` and `dumps`. Previously
  508. we didn't require the function to return a string, and so we could
  509. end up returning something that wasn't actually valid. This change
  510. now matches the behavior in the `json` module. *Note: This is a
  511. potentially breaking change.*
  512. * v0.9.6 (2021-06-21)
  513. * Bump development status classifier to 5 - Production/Stable, which
  514. the library feels like it is at this point. If I do end up significantly
  515. reworking things to speed it up and/or to add round-trip editing,
  516. that'll likely be a 2.0. If this version has no reported issues,
  517. I'll likely promote it to 1.0.
  518. * Also bump the tested Python versions to 2.7, 3.8 and 3.9, though
  519. earlier Python3 versions will likely continue to work as well.
  520. * [GitHub issue #46](https://github.com/dpranke/pyjson5/issues/36)
  521. Fix incorrect serialization of custom subtypes
  522. * Make it possible to run the tests if `hypothesis` isn't installed.
  523. * v0.9.5 (2020-05-26)
  524. * Miscellaneous non-source cleanups in the repo, including setting
  525. up GitHub Actions for a CI system. No changes to the library from
  526. v0.9.4, other than updating the version.
  527. * v0.9.4 (2020-03-26)
  528. * [GitHub pull #38](https://github.com/dpranke/pyjson5/pull/38)
  529. Fix from fredrik@fornwall.net for dumps() crashing when passed
  530. an empty string as a key in an object.
  531. * v0.9.3 (2020-03-17)
  532. * [GitHub pull #35](https://github.com/dpranke/pyjson5/pull/35)
  533. Fix from pastelmind@ for dump() not passing the right args to dumps().
  534. * Fix from p.skouzos@novafutur.com to remove the tests directory from
  535. the setup call, making the package a bit smaller.
  536. * v0.9.2 (2020-03-02)
  537. * [GitHub pull #34](https://github.com/dpranke/pyjson5/pull/34)
  538. Fix from roosephu@ for a badly formatted nested list.
  539. * v0.9.1 (2020-02-09)
  540. * [GitHub issue #33](https://github.com/dpranke/pyjson5/issues/33):
  541. Fix stray trailing comma when dumping an object with an invalid key.
  542. * v0.9.0 (2020-01-30)
  543. * [GitHub issue #29](https://github.com/dpranke/pyjson5/issues/29):
  544. Fix an issue where objects keys that started with a reserved
  545. word were incorrectly quoted.
  546. * [GitHub issue #30](https://github.com/dpranke/pyjson5/issues/30):
  547. Fix an issue where dumps() incorrectly thought a data structure
  548. was cyclic in some cases.
  549. * [GitHub issue #32](https://github.com/dpranke/pyjson5/issues/32):
  550. Allow for non-string keys in dicts passed to ``dump()``/``dumps()``.
  551. Add an ``allow_duplicate_keys=False`` to prevent possible
  552. ill-formed JSON that might result.
  553. * v0.8.5 (2019-07-04)
  554. * [GitHub issue #25](https://github.com/dpranke/pyjson5/issues/25):
  555. Add LICENSE and README.md to the dist.
  556. * [GitHub issue #26](https://github.com/dpranke/pyjson5/issues/26):
  557. Fix printing of empty arrays and objects with indentation, fix
  558. misreporting of the position on parse failures in some cases.
  559. * v0.8.4 (2019-06-11)
  560. * Updated the version history, too.
  561. * v0.8.3 (2019-06-11)
  562. * Tweaked the README, bumped the version, forgot to update the version
  563. history :).
  564. * v0.8.2 (2019-06-11)
  565. * Actually bump the version properly, to 0.8.2.
  566. * v0.8.1 (2019-06-11)
  567. * Fix bug in setup.py that messed up the description. Unfortunately,
  568. I forgot to bump the version for this, so this also identifies as 0.8.0.
  569. * v0.8.0 (2019-06-11)
  570. * Add `allow_duplicate_keys=True` as a default argument to
  571. `json5.load()`/`json5.loads()`. If you set the key to `False`, duplicate
  572. keys in a single dict will be rejected. The default is set to `True`
  573. for compatibility with `json.load()`, earlier versions of json5, and
  574. because it's simply not clear if people would want duplicate checking
  575. enabled by default.
  576. * v0.7 (2019-03-31)
  577. * Changes dump()/dumps() to not quote object keys by default if they are
  578. legal identifiers. Passing `quote_keys=True` will turn that off
  579. and always quote object keys.
  580. * Changes dump()/dumps() to insert trailing commas after the last item
  581. in an array or an object if the object is printed across multiple lines
  582. (i.e., if `indent` is not None). Passing `trailing_commas=False` will
  583. turn that off.
  584. * The `json5.tool` command line tool now supports the `--indent`,
  585. `--[no-]quote-keys`, and `--[no-]trailing-commas` flags to allow
  586. for more control over the output, in addition to the existing
  587. `--as-json` flag.
  588. * The `json5.tool` command line tool no longer supports reading from
  589. multiple files, you can now only read from a single file or
  590. from standard input.
  591. * The implementation no longer relies on the standard `json` module
  592. for anything. The output should still match the json module (except
  593. as noted above) and discrepancies should be reported as bugs.
  594. * v0.6.2 (2019-03-08)
  595. * Fix [GitHub issue #23](https://github.com/dpranke/pyjson5/issues/23) and
  596. pass through unrecognized escape sequences.
  597. * v0.6.1 (2018-05-22)
  598. * Cleaned up a couple minor nits in the package.
  599. * v0.6.0 (2017-11-28)
  600. * First implementation that attempted to implement 100% of the spec.
  601. * v0.5.0 (2017-09-04)
  602. * First implementation that supported the full set of kwargs that
  603. the `json` module supports.