-
Notifications
You must be signed in to change notification settings - Fork 144
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
Added CGIXMLRPCRequestHandler as a super class. #26
Open
Zectbumo
wants to merge
59
commits into
joshmarshall:master
Choose a base branch
from
Zectbumo: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
- Remove spaces, ...
The dispatch_method given to _marshaled_dispatch and _marshaled_single_dispatch is now used instead of _dispatch, if given.
- No more reference to Unix sockets (maybe they'll come back later) - Fixed a typo in jsonclass, in the Python version comparison
- Removed tests about Unix sockets - Corrected a test using bad parameters
Passes all the tests from tests.py in both Python 2 and 3
- random_id() method replaced by str(uuid.uuid4()) => ensures ID uniqueness - JSON utility methods (jdumps, jloads) are defined according to what can be imported, instead of doing a test inside a single definition
- New project name: jsonrpclib-pelix (not yet registered)
Allows to use custom dictionaries, ...
- dump() returns the JSON-RPC dictionary instead of its string representation - dumps() calls dump() - same thing with load() and loads() - Fault.dump() is the dictionary equivalent of response()
- Takes a loaded dictionary as a parameter (jsonrpclib.load/s) - Returns a JSON-RPC dictionary (jsonrpclib.dump) - _marshaled_dispatch wraps _unmarshaled_dispatch (keeps its behaviour)
- Replaced a 'not id' by 'id not in (None, "")' - _unmarshaled_dispatch now throws a NoMulticallResult exception instead of returning ''
JSONTarget: raw data is stored in the feeding list, the conversion to string (if required) is done only once all data has been received. This avoids errors decoding splitted wide-characters.
* Removes the potential memory hog (history was never cleared) * Allows to have different instances of History for each ServerProxy * Tests updated
This should support any types of error responses, including: - `{..., "error": {"code": -42, "message": "spam"}}`, - `{..., "error": {"reason": "spam"}}`, - `{..., "error": {"what_happened": "spam"}}`, - or even `{..., "error": "spam"}}` Conflicts: jsonrpclib/jsonrpc.py
… to error.data Conflicts: jsonrpclib/__init__.py jsonrpclib/jsonrpc.py
Modifying jsonrpclib.config.content_type (string) By default, it stays to "application/json-rpc", as the JSON-RPC specification indicates.
Applied commits from https://github.com/dejw/jsonrpclib: - 53d38c3: Added tests for additional request headers feature. - 9e63239: Added test for notifications. - 0a3bbe6: Added test for nesting _additional_headers context. Tests have been modified to handle Python 2 / Python 3 compatibility
Version set to 0.1.5
Instead of filtering the __jsonclass__ entry, it is removed before the setattr() loop.
Python 2 has an io module, messing with StringIO
- Multiple clients/servers can have different configurations - Still a (shared) default configuration object: jsonrpclib.config.DEFAULT - Previous API should still work as-is: the new parameters have always been added in last position, with the DEFAULT instance by default. - The version all modified modules has been increased to 0.1.6
Fields of a bean loaded by jsonclass are also loaded through the same method. This allows to have beans containing beans.
Based on Tox, same as the iPOPO Travis configuration file.
- Allows to use the 'client("close")()' method to close the transport layer of a ServerProxy, even on Python 2.6 => Fixes joshmarshall#2 - Updated tests to _really_ close the transport layer (and not just to retrieve the closing method)
Also added supported Python versions to setup.py
Note that it seems that people don't declare the encoding in Content-Type so I'll just assume people want to use the encoding that the server uses internally :)
I couldn't get CGI to work without this super class.
I like Roland's answer "reason: transport and contents are independent. so all the transport here needs to know is the format of the contents, and that's just json." https://groups.google.com/forum/#!topic/json-rpc/6OXOOm4fcC8
Conflicts: jsonrpclib/SimpleJSONRPCServer.py jsonrpclib/jsonclass.py jsonrpclib/jsonrpc.py
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.
I couldn't get CGI to work without this super class.