Skip to content
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
wants to merge 59 commits into
base: master
Choose a base branch
from

Conversation

Zectbumo
Copy link

@Zectbumo Zectbumo commented Feb 6, 2014

I couldn't get CGI to work without this super class.

tcalmant and others added 30 commits May 22, 2013 09:43
- 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
tcalmant and others added 29 commits June 20, 2013 17:28
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants