From 41cfece382ff5330fd32cbccbf43e2d7a44cb70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Thu, 2 Oct 2025 00:36:35 +0200 Subject: [PATCH] Let `dump()` write `str` instead of `bytes` --- CHANGELOG.md | 3 ++- Makefile | 2 +- docs/conf.py | 2 +- requirements-readthedocs.txt | 2 +- setup.cfg | 2 +- src/VERSION.inc | 2 +- src/_legacy.pyx | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b12c41..f4219ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Changelog -**1.7.0 (2025-10-02)** +**2.0.0 (2025-10-02)** * Update for Python 3.14 and require at least 3.8 (by Edgar Ramírez, [#112](https://github.com/Kijewski/pyjson5/pull/112)) * Update to Unicode 17.0.0 ([#117](https://github.com/Kijewski/pyjson5/pull/117)) * Fix typing for `_SupportsRead` ([#118](https://github.com/Kijewski/pyjson5/pull/118)) +* Let `dump()` write `str` instead of `bytes` ([#119](https://github.com/Kijewski/pyjson5/pull/119)) **1.6.9 (2025-05-12)** diff --git a/Makefile b/Makefile index 21d28a8..2e6f5a4 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ src/_escape_dct.hpp: scripts/make_escape_dct.py python $< $@ pyjson5.cpp: pyjson5.pyx $(wildcard src/*.pyx) $(wildcard src/*.hpp) - python -m cython -f -o $@ $< + python -m cython --line-directives --cplus --force --output-file $@ $< prepare: pyjson5.cpp ${FILES} diff --git a/docs/conf.py b/docs/conf.py index 37097eb..8bb697e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,7 +42,7 @@ autosummary_generate = True intersphinx_mapping = { - 'python': ('https://docs.python.org/3.13', None), + 'python': ('https://docs.python.org/3.14', None), } graphviz_output_format = 'svg' diff --git a/requirements-readthedocs.txt b/requirements-readthedocs.txt index 4fe4fc0..f24bee6 100644 --- a/requirements-readthedocs.txt +++ b/requirements-readthedocs.txt @@ -1,6 +1,6 @@ # keep synchronous to pyproject.toml # keep synchronous to src/VERSION.inc -pyjson5 == 1.6.9 +pyjson5 == 2.0.0 # keep synchronous to requirements-dev.txt docutils == 0.21.* diff --git a/setup.cfg b/setup.cfg index 1fd95f0..4a3a850 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] # keep synchronous to requirements-readthedocs.txt # keep synchronous to src/VERSION.inc -version = 1.6.9 +version = 2.0.0 name = pyjson5 description = JSON5 serializer and parser for Python 3 written in Cython. diff --git a/src/VERSION.inc b/src/VERSION.inc index 70e66d2..8b78de0 100644 --- a/src/VERSION.inc +++ b/src/VERSION.inc @@ -1 +1 @@ -"1.6.9" +"2.0.0" diff --git a/src/_legacy.pyx b/src/_legacy.pyx index 74cf8d4..7c8455a 100644 --- a/src/_legacy.pyx +++ b/src/_legacy.pyx @@ -97,4 +97,4 @@ def dump(object obj, object fp, **kw): kw Silently ignored. ''' - encode_io(obj, fp) + encode_io(obj, fp, supply_bytes=False)