Skip to content

Commit ad436ab

Browse files
committed
Add changelog and how-to migrate from 3.0.1 to 4.0.0 version
1 parent 839468d commit ad436ab

File tree

9 files changed

+981
-2
lines changed

9 files changed

+981
-2
lines changed

CHANGES.rst

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
.. _changelog:
2+
3+
Changelog
4+
=========
5+
6+
This document describes changes between each past release.
7+
8+
Version 4.0.0
9+
-------------
10+
11+
Released on December 9, 2025
12+
13+
This is a major release with significant breaking changes. Please see the :doc:`migration guide <howto/migration/4.0.0>` for detailed upgrade instructions.
14+
15+
Breaking Changes
16+
~~~~~~~~~~~~~~~~
17+
18+
**Python Support**
19+
20+
- Dropped support for Python 3.8 and 3.9
21+
- Minimum Python version is now 3.10
22+
- Added support for Python 3.13 and 3.14
23+
- Experimental support for Python 3.14 free threading
24+
25+
**Dependencies**
26+
27+
- Updated ``typeguard`` from 2.13.3 to 4.4.4 (major version change with breaking API changes)
28+
- Added ``pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0`` as required dependency
29+
- Added ``eval-type-backport==0.3.1`` for enhanced type evaluation
30+
- Added ``annotated-types==0.7.0`` for type metadata support
31+
- Updated ``typing-extensions`` requirement
32+
33+
**API Changes**
34+
35+
- **BREAKING**: Renamed ``JSONRPC`` constructor parameter ``service_url`` to ``path``
36+
- **BREAKING**: Added required ``version`` parameter to ``JSONRPC`` constructor (defaults to '1.0.0')
37+
- Changed ``enable_web_browsable_api`` to accept ``bool | None`` (enables in debug mode when None)
38+
- Modified import style from relative to absolute imports
39+
- Added explicit ``__all__`` exports to main module
40+
41+
**Types Module Restructure**
42+
43+
- **BREAKING**: Restructured ``flask_jsonrpc.types`` from single file to package with submodules:
44+
45+
- ``flask_jsonrpc.types.types`` - Core type definitions (String, Number, Object, Array, Boolean, Null)
46+
- ``flask_jsonrpc.types.methods`` - Method annotation types
47+
- ``flask_jsonrpc.types.params`` - Parameter type definitions
48+
49+
- Moved ``JSONRPCNewType`` to ``flask_jsonrpc.types.types``
50+
- Added new method annotation types: ``Summary``, ``Description``, ``Validate``, ``Notification``, ``Deprecated``, ``Tag``, ``Error``, ``Example``, ``ExampleField``
51+
52+
**Exception Handling**
53+
54+
- Modified ``JSONRPCError`` to pass message to base ``Exception.__init__()``
55+
- Changed default value assignment logic from conditional to ``or`` operator
56+
- Added explicit ``__init__`` methods to all built-in exception classes (``ParseError``, ``InvalidRequestError``, ``MethodNotFoundError``, ``InvalidParamsError``, ``InternalError``, ``ServerError``)
57+
- Added ``original_exception`` parameter to ``ServerError`` for better error tracking
58+
59+
**Configuration**
60+
61+
- Added new ``flask_jsonrpc.conf`` module with settings system
62+
- Settings can be overridden via Flask app config with ``FLASK_JSONRPC_`` prefix
63+
- Settings are auto-loaded during ``init_app()``
64+
65+
**Build System**
66+
67+
- Migrated build backend from setuptools to hatchling
68+
- Added support for Mypyc compilation via hatch-mypyc plugin
69+
- Updated cibuildwheel configuration for Python 3.11+ wheels
70+
- Added uv package manager support
71+
- Removed tox in favor of uv-based testing
72+
73+
New Features
74+
~~~~~~~~~~~~
75+
76+
**Method Annotations**
77+
78+
- Added comprehensive type-safe method annotation system using ``Annotated`` types
79+
- Support for method summary, description, tags, examples, and deprecation markers
80+
- Enhanced API documentation generation from annotations
81+
82+
**Enhanced Browse API**
83+
84+
- Complete redesign of the web browsable API interface
85+
- Added support for Markdown/rich text in method documentation with ``marked.js``
86+
- Integrated CodeMirror-based JSON editor for complex object editing
87+
- Added tag-based directory navigation for better API organization
88+
- Implemented auto-fill of default parameter values
89+
- Enhanced interactive method execution with better error display
90+
- Added middleware system for authentication and custom functionality
91+
- Support for custom dashboard templates in Browse portal
92+
- New favicon and improved branding
93+
94+
**OpenRPC Support**
95+
96+
- Added new ``flask_jsonrpc.contrib.openrpc`` module
97+
- Full OpenRPC specification support for API documentation
98+
- Automatic OpenRPC schema generation from method annotations
99+
- Integration with Browse API for OpenRPC-powered documentation
100+
101+
**Pydantic Integration**
102+
103+
- Native support for Pydantic v1 and v2 models as method parameters and return types
104+
- Automatic validation of Pydantic models
105+
- Enhanced type introspection for Pydantic models
106+
- Support for Pydantic ``BaseModel``, dataclasses, and TypedDict
107+
108+
**Type System Enhancements**
109+
110+
- Added descriptor system for enhanced type inspection (``flask_jsonrpc.descriptor``)
111+
- New function utilities module (``flask_jsonrpc.funcutils``)
112+
- Enhanced encoder support for complex types (``flask_jsonrpc.encoders``)
113+
- Better support for ``Annotated`` types from ``typing_extensions``
114+
115+
**Error Handling**
116+
117+
- Enhanced error handler mechanism with ``@jsonrpc.errorhandler()`` decorator
118+
- Better error propagation and tracking
119+
- Improved error messages and standardization
120+
121+
**Testing & Development**
122+
123+
- Added comprehensive example applications:
124+
125+
- ``examples/minimal`` - Basic JSON-RPC setup
126+
- ``examples/minimal-async`` - Async JSON-RPC support
127+
- ``examples/modular`` - Blueprint-based modular architecture
128+
- ``examples/multiplesite`` - Multiple JSON-RPC sites
129+
- ``examples/openrpc`` - OpenRPC integration example
130+
- ``examples/rpcdescribe`` - RPC Describe portal with authentication
131+
- ``examples/javascript`` - JavaScript client integration
132+
133+
- Each example now includes:
134+
135+
- Proper project structure with ``pyproject.toml``
136+
- Complete test suites
137+
- ``uv.lock`` for reproducible environments
138+
139+
**Documentation**
140+
141+
- Added comprehensive API documentation with Sphinx
142+
- New tutorial series covering basic to advanced usage
143+
- Pattern guides for authentication, factories, marshaling, and validation
144+
- Usage guides for batch requests, blueprints, errors, methods, parameters, and types
145+
- Deployment guide
146+
- Testing guide
147+
- All documentation now uses Pallets Sphinx theme
148+
149+
**Project Infrastructure**
150+
151+
- Migrated to ``uv`` for dependency management
152+
- Added pre-commit hooks with ``ruff`` for linting
153+
- Configured ``mypy`` and ``pyright`` for type checking
154+
- Added ``bandit`` for security analysis
155+
- Implemented GitHub Actions workflows for CI/CD
156+
- Added CodeQL analysis for security
157+
- Configured Dependabot for automated dependency updates
158+
159+
Improvements
160+
~~~~~~~~~~~~
161+
162+
- Enhanced logging integration with Flask's logging system
163+
- Better JSON-RPC site path and base URL handling
164+
- Improved blueprint registration with better URL prefix handling
165+
- Enhanced async support throughout the codebase
166+
- Better handling of ``None``/``null`` values in responses
167+
- Improved error messages with more context
168+
- Better support for batch requests
169+
- Enhanced notification handling (requests without ``id``)
170+
- Improved type checking and validation performance
171+
- Better support for complex nested types
172+
- Enhanced support for ``Optional`` and ``Union`` types
173+
174+
Bug Fixes
175+
~~~~~~~~~
176+
177+
- Fixed type checker for optional function parameters without default values
178+
- Fixed URN generator for method names
179+
- Fixed relative imports in modular examples
180+
- Fixed integration tests for async applications
181+
- Fixed browse API initial page state for scroll and viewport size
182+
- Fixed continue statements inside try/finally blocks for Mypyc compatibility
183+
- Fixed error message propagation to Exception base class
184+
- Fixed import errors in various submodules
185+
186+
Documentation
187+
~~~~~~~~~~~~~
188+
189+
- Added migration guide from v3.0.1 to v4.0.0
190+
- Updated README with new Python version requirements
191+
- Updated live demo URL to https://flask-jsonrpc.cenobit.es
192+
- Added comprehensive docstrings throughout the codebase
193+
- Enhanced code examples with type annotations
194+
- Updated copyright year to 2025
195+
196+
Deprecations
197+
~~~~~~~~~~~~
198+
199+
- Deprecated ``service_url`` parameter (use ``path`` instead)
200+
- Removed support for Python 3.8 and 3.9
201+
- Removed legacy ``types.py`` single-file module
202+
203+
Internal Changes
204+
~~~~~~~~~~~~~~~~
205+
206+
- Refactored site management system
207+
- Improved view and wrapper classes
208+
- Enhanced globals module for better state management
209+
- Refactored helper functions for better modularity
210+
- Improved test structure with shared test applications
211+
- Added comprehensive unit and integration test coverage (100% coverage target)
212+
- Better separation between sync and async test suites
213+
- Enhanced test fixtures and utilities
214+
215+
Version 3.0.1
216+
-------------
217+
218+
Released on previous date
219+
220+
.. note::
221+
For changes in version 3.0.1 and earlier, please refer to the git history
222+
or previous documentation versions.
1.77 MB
Loading
-1.12 MB
Binary file not shown.

docs/changes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changes
2+
=======
3+
4+
.. include:: ../CHANGES.rst

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
}
7979
singlehtml_sidebars = {'index': ['project.html', 'localtoc.html', 'ethicalads.html']}
8080
html_static_path = ['_static']
81-
html_favicon = '_static/flask-jsonrpc-icon.svg'
82-
html_logo = '_static/flask-jsonrpc-icon.svg'
81+
html_favicon = '_static/flask-jsonrpc-icon.png'
82+
html_logo = '_static/flask-jsonrpc-icon.png'
8383
html_title = f'Flask-JSONRPC Documentation ({version})'
8484
html_show_sourcelink = False
8585

docs/howto/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
=============
2+
How-to guides
3+
=============
4+
5+
Practical guides covering common tasks and problems.
6+
7+
8+
How to upgrade Flask JSON-RPC to a newer version
9+
------------------------------------------------
10+
11+
.. toctree::
12+
:maxdepth: 1
13+
14+
migration/4.0.0

0 commit comments

Comments
 (0)